web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Updating Parent Relation when creating a new Child record

(0) ShareShare
ReportReport
Posted on by 5

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.

 pastedimage1668680492534v1.png

 

We feed the Client Engagement ID to Canvas App with recordID parameter. This parameter is set to Var1 onStart of App.

            Set(Var1,Param("recordId"));

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:

If(IsBlank(ThisItem.'Client Engagement'),

LookUp('Client Engagement',Advice=GUID(Var1)),

ThisItem.'Client Engagement')

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 Save Button on New Record create form like below:

 

If(!IsBlank(Filter('Client Notes', 'Client Engagement'.Advice=GUID(Var1))),

SubmitForm(Form2),(

Patch('Client Notes',

      Defaults('Client Notes'),

      {   Name: DataCardValue5.Value,

          'Note Type': DataCardValue2.Selected.Value,

          'Note Text': DataCardValue3.Value,

          'Client Engagement':LookUp('Client Engagement',Advice=GUID(Var1))

      }

)));

 

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.

Thanks in advance for all your response,

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 47 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
Pallavi Phade Profile Picture

Pallavi Phade 32

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans