Set new object property with Dynamics 365 using Alexa CRM toolkit

430 views Asked by At

I'm using AlexaCRM Toolkit for Dynamics 365, I added a new field for the entity lead (I created a custom field called new_wordpressid) so I can do the mapping with the lead created in wordpress and the lead in Dynamics 365, when I want to create a new lead using the following code lines:

$lead= $service->entity('lead');
$lead->firstname = 'john';
$lead->lastname= 'do';
$lead->new_wordpressid = '555';
$lead->create();

I get the following error:

enter image description here

Notice: Undefined property via __set() - lead does not support property: new_wordpressid in /var/www/clients/client348/web/wp-content/plugins/dynamics-amcham-crm/dynamics-amcham-crm.php on line 41 in /var/www/clients/client348/web/wp-content/plugins/integration-dynamics/vendor/alexacrm/php-crm-toolkit/src/Entity.php on line 261

Adding the new wordpress_id causes an error. How can I set the wordpress_id Without having any errors?

0

There are 0 answers