php-crm-toolkit icon indicating copy to clipboard operation
php-crm-toolkit copied to clipboard

Update MultiSelectPicklist.MultiSelectPicklistControl from API not being updated on Dynamics 365

Open maulik-vinchhi opened this issue 5 years ago • 4 comments

Hello Team,

I am using the crm toolkit to update Dynamics fields when they are being updated on my other CRM HubSpot. It is working fine for normal text fields or simple drop-downs on Dynamics. But, when I tried to update a MultiSelectPicklist.MultiSelectPicklistControl type of field which we are using for linking various values on lead for Brands, it is not being updated Via API and for normal fields we are able to update and receiving response with updated values when we call the update function, while for this field there is no response and it seems like using normal update function we are not able to update this kind of custom fields.

Can you guys tell me what will be the solution to this? how to update this kind of field value using API? Thanks

maulik-vinchhi avatar May 30 '19 07:05 maulik-vinchhi

Hi @maulik-vinchhi

I'm not sure if SOAP version supports multi-select picklists at all, we didn't test it specifically. But if it does not stop the request then the value to submit would be a comma-separated list of values, e.g.

$foo->bar = '1, 2, 3, 5, 8';

Have you tried that?

Thanks George

georged avatar May 30 '19 23:05 georged

Hi @georged Yes, I have already tried that and other ways as well see them below: $foo->bar = '1, 2, 3, 5, 8'; $foo->bar = '1'; $foo->bar = '1; 2; 3; 5; 8'; $foo->bar = array('1, 2, 3, 5, 8');

But for all type it returns the response like this `[vin_brands] => Array ( [Value] => Array ( [XML] => <c:value xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" i:nil="true"></c:value> [FormattedText] => )

[Changed] => 

)`

Also, when I check on Dynamics the values are not being updated, so it seems it is not working. Please check above response and let me know if you need more details

Thanks

maulik-vinchhi avatar May 31 '19 10:05 maulik-vinchhi

Hi @maulik-vinchhi

we checked the code and multi select optionset has been added to Dynamics 365 after we released the toolkit. Since the current toolkit relies on SOAP that has been deprecated, we probably are not going to fix it. Instead, we recommend that you take a look at https://github.com/AlexaCRM/dynamics-webapi-toolkit. That's the toolkit based on Web API and any bug fixes and maintenance efforts will be directed at that one.

Of course, feel free to fork the current toolkit and apply the fix - we are still open to pull requests.

Thanks George

georged avatar Jun 03 '19 09:06 georged

Hi George,

Could you please have a look on following issue? https://github.com/AlexaCRM/php-crm-toolkit/issues/90

Thanks, Ziya

ziyaindia avatar Jul 05 '19 03:07 ziyaindia