Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Refresh the Opportunity subgrid on Contact on create of a opportunity record through JS

Posted on by 1,017

Hi,

Based on one condition when user creates a opportunity record through the sub grid that is on contact form, I would like to refresh the sub grid through JS.

Please  advise the JS code to achieve my criteria

Thanks!

  • Suggested answer
    Adarsha MG Profile Picture
    Adarsha MG on at
    RE: Refresh the Opportunity subgrid on Contact on create of a opportunity record through JS

    Hello James,

    Since you wanted to refresh the sub grid , Its better to have a code on the Opportunity sub grid present in the contact form.

    you can also have a try writing the same js to refresh the Opportunity form and cross verify once .

  • yify Profile Picture
    yify 1,017 on at
    RE: Refresh the Opportunity subgrid on Contact on create of a opportunity record through JS

    Hi Adarsha,

    Where should I place the script in?

    Is it in the contact form where the opportunity subgrid is on or on load of the opportunity form?

    Please advise.

  • Suggested answer
    Adarsha MG Profile Picture
    Adarsha MG on at
    RE: Refresh the Opportunity subgrid on Contact on create of a opportunity record through JS

    Hi Partner,

    In order to refresh we have an OOB feature which ,

    Asynchronously refreshes and optionally saves all the data of the form without reloading the page.

    docs.microsoft.com/.../refresh

    Syntax :

    formContext.data.refresh(save).then(successCallback, errorCallback);

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans