Skip to main content

Posts

Showing posts with the label D635

D365 plugin retrive entity data

  Retrieve Entity record data into plugin var inputcontract = (localContext.InputParameters["Target"] as Entity).ToEntity<student_contract>(); // retrive entity data Account accountEntity = localContext.OrganizationService.Retrieve( Account.EntityLogicalName, inputcontract.student_Account.Id, new ColumnSet(new String[] { "student_eventseriesid" })).ToEntity<Account>(); // You can also set the value without entity context ["student_eventseriesid"] = accountEntity.GetAttributeValue<EntityReference>("student_eventseriesid")

D365 java script on load event change code

 This is very common that some times we need to set value into another field based on change event or into form load event. Normally we define the code into load event and into change event. We can replace the load event using fireOnChange(); if (formContext.getAttribute("studentid")) { formContext.getAttribute("studentid").fireOnChange(); } If this field value has change event then you do not need to define into load event. fireOnChange() event will work for load event.