Today’s Learning 📚
Today I focus on managing to learn and understand the Dynamics 365 Web API.
The problem I was trying to solve was.
Parent entity or table (new reference by Microsoft) and when a look up field was populated we need to pull some properties into equivalent fields in the parent table from that Lookup record we just associated.
Ok, that said in technical jargon, what it basically need is:
We need to copy field from the record in the look up field into field in parent record when load() or save() events.
👀 Why you ask?
In Dynamics 365 in order to make some calculations in form all field need to present in that form.
Now the Web API
Microsoft Dynamics 365 is for me one of the best alongside Salesforce one of the best documentation out there, simple and with examples really cool.
Pseudocode runtime in order was:
💢 Use formContext getting form context
💢 Load LookUp field using Xrm.Page.getAttibute(“FIELDNAME”);
💢 if Statements checking if LookUp field contains data