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

Issues with RelationShip (PartyList) Fields Not linking correctly

Open moinerus opened this issue 7 years ago • 3 comments

So far I have found 2 main types of relationship fields in dynamics these are LookUps, and PartyLists. The first works when you simply attach the entity as the value, the second is treated in exactly the same way in the code but the link is not created.

In this case is specifically for linking Calls to Contacts.

So I’ve been trying to debug this issue;

Please see the difference I’ve found between what the CRM produced when using the fields and what the framework produces.

JSON produced by Dynamics CRM

regardingobjectid (Type: LookUp) regardingobjectid":{"_visible":"inline-block","_noread":"none","value":"Gecko Labs","oid":"{F80F4224-2974-E611-80EF-5065F38B6471 }

to (Type: PartyList) [{"_visible":"inline","_noread":"none","value":"A main","oid":"{A8B4DA36-759B-E611-80F3-5065F38BD531 }","activitypartyid":"{7D90DB59-43A0-E611-80E9-5065F38AEA21}","otype":"2","img":"/_imgs/ico_16_2.gif ?ver=1303141240","otypename":"contact","style":"ms-crm-Lookup-Item","isprocessenabled":"True","callback":"openlui(new Sys.UI.DomEvent(event))"}]

XML call produced by framework

to (Type: PartyList) <b:KeyValuePairOfstringanyType> <c:key>to</c:key> <c:value i:type="b:EntityReference"> <b:Id>a8b4da36-759b-e611-80f3-5065f38bd531</b:Id> <b:LogicalName>contact</b:LogicalName> <b:Name i:nil="true" /> </c:value> </b:KeyValuePairOfstringanyType>

regardingobjectid (Type: LookUp) <b:KeyValuePairOfstringanyType> <c:key>regardingobjectid</c:key> <c:value i:type="b:EntityReference"> <b:Id>a8b4da36-759b-e611-80f3-5065f38bd531</b:Id> <b:LogicalName>contact</b:LogicalName> <b:Name i:nil="true" /> </c:value> </b:KeyValuePairOfstringanyType>

to (Type: PartyList) screen shot 2016-11-02 at 10 39 49

regardingobjectid (Type: LookUp) screen shot 2016-11-02 at 10 40 25

moinerus avatar Nov 02 '16 11:11 moinerus

@andymain good catch. We'll be adding support for Activity Party in one of the upcoming releases, stay tuned. There is some EntityReference code that I'm not happy about so we need to do some refactoring and that will be part of it.

georged avatar Nov 03 '16 00:11 georged

Any idea of timelines on this one? Might have to take a look myself.

moinerus avatar Nov 04 '16 13:11 moinerus

@andymain this may be triaged in the next month or two, but I would suggest you try tackling it yourself to speed the process. I would love to see a pull request.

wizardist avatar Nov 04 '16 13:11 wizardist