Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Suggested answer

How to link modal form to the parent form

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:"%"}});

  • Suggested answer
    NEWGuy Profile Picture
    NEWGuy 355 on at
    RE: How to link modal form to the parent form

    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.

  • Ray Profile Picture
    Ray 1,505 on at
    RE: How to link modal form to the parent form

    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:"%"}});

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans