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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

How to link modal form to the parent form

(0) ShareShare
ReportReport
Posted on by 355

Hi,

I have created a custom button and placed it on Dashboard sub-grid of Entity1, On click of that button I am opening a new form of Entity2 but I could not link them both on Save&Close of the Entity2 Form. There is no link in between both the entities.

I tried retrieving the Id of the selected record from the view and updating on Save&Close of the form(which opens on button click) 

Is there any way we can relate both Entity1 and Entity2 so that I need to update Entity1 fields on Create of Entity2 record? Please see the code I have used to open the form and suggest me. Thanks for your help!!

Xrm.Navigation.navigateTo({pageType:"entityrecord", entityName:"new_entity2", formId: "3EA65162-956E-4C11-B65D-5183FD891656", formType:2}, {target: 2, position: 1, width: {value: 50, unit:"%"}});

  • Ray Profile Picture
    1,537 on at

    Hi,

    navigateTo() method has a parameter callered: createFromEntity, you can use this parameter.

    sample link should be like this:

    Xrm.Navigation.navigateTo({pageType:"entityrecord", entityName:"new_entity2", formId: "3EA65162-956E-4C11-B65D-5183FD891656", createFromEntity:{entityType:"new_entity1", id:"9b998990-c416-ed11-b83f-00224856d931", name:"DisplayName"}}, {target: 2, position: 1, width: {value: 50, unit:"%"}});

  • Suggested answer
    NEWGuy Profile Picture
    355 on at

    Hi R@y,

    Thank you for your time in answering to my query above. By adding 'CreateFromEntity' and 'Relationship' I managed to get the expected output. Many thanks for your help on this.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Travis South Profile Picture

Travis South 54

#2
Syed Aqib Raza Profile Picture

Syed Aqib Raza 42

#3
ParthPatel249 Profile Picture

ParthPatel249 33

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans