Updating Parent Relation when creating a new Child record
There are two entities which are Client Notes and Client Engagement on CDS and there N to 1 relationship between them. We’ve created a Canvas app which lists the Client Notes linked to Client Engagement on Dynamics. Also you can create a new Note record linked to selected Client Engagement record on Dynamics.
We made that relation and calling the Page created by Canvas App with the code below. The code is written on onload of the Client Engagement form.
We feed the Client Engagement ID to Canvas App with recordID parameter. This parameter is set to Var1 onStart of App.
Whenever a new Note record is created, it is linked to parent Client Engagement record with the DataCard on Canvas app. This Datacard combobox is on the new Note form.
Default property of Combobox Datacard is:
We’re having performance issue on Canvas app , it happens on different areas, it sometime happens when saving the data , sometimes deleting the data, sometimes going back to main screen, etc..
I’ve monitored the app and seen that DataCard which is for parent Client Engagement fetching all data first and this is really big data in the system. When I get rid of Datacard combobox from Form, performance is back to normal.
I want to find a way to link the new Note record with Parent Client Engagement record without using Datacard.
I used PATCH function onSelect event of SaveButton on New Record create form like below:
If I switch from Gallery view of Notes to New Note Create Form, I’m not able to get Parent record’s ID while using patch and updating record. Hence newly created Notes are not linked to any parent Client Engagement. How can I get parent record ID when I am creating a new child record?
Or Could you advise something to improve performance even if I use Datacard for parent record relation? I read articles about how to improve performance of canvas app and applied some changes, made good progress but still it is not acceptable level.