Hi
I am stuck with the problem . i have two entities A and B and no relation between two entities and had a field called (Destination code) which is single line of text in 2 entities ,Now i want to compare the value of Destination codes in two different entities.if the value matches i want to update that value to the lookup field in Entity B . i tried to do with workflow but it does not work for me ,so i am trying to do with java script .but don't know how to start ,Any suggestions would be helpful
Thanks
*This post is locked for comments
Hi Manikanta,
there was a similar question posted and i replied to it :community.dynamics.com/.../262740
Hi!
It seems like the business logic is not very clear. You normally should create relations for the entities to be able to compare. For requests you can use CRM RestBuilder or SDK.REST library.
If you want to do it via JavaScript using SDK.REST lib try the following:
1) For the required event to get a query for the entry you want to compare to the current one. Pull the value out of entity.
2) Compare it with the current value from the current entity.
Hope it helps
Please mark it As Answered or Verified if it did help you.
Thanks
Vlad
http://dynamicalabs.com/
Hi Manikanta,
As you described, you need to compare destination code value in another entity,you can do this easily with window application utility:
first to fetch all the records from entity A and get that destination code ,then make a fetch for entity B with filter condition on destination code, and pass destination code that get from entity A, if it match that destination code, then you have both Guid of entity A and entity B, so you can update the lookup values as you want, if not matched then it goes for next record to compare and update the lookup.
Thanks
Jasdeep singh
Hi Manikanta ,
it is not clear to me, please provide a full detailed example, like:
1) I have an existant account record with Destination code AAA
2) I create a new account record with Destination code AAA (or BBB)
3) I would like to ... before/after create/update ... etc.
Help us understand better your needs.
Thanks.
If you found the answer helpful, please mark as Verified
Join my network on LinkedIn Follow me on Twitter
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY
Independent Contractor
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156