Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Wait till Modal form is Saved

(0) ShareShare
ReportReport
Posted on by 125

Hi All,

I have used the follwing function to Open model form by sekecting record from subgrid. The issue is I need the details of the field of this popup form to execute the next line but it is not stopping till Save and the next line of code is getting executed once we just open the form.

Below is the fuction to open modal form

function openRecordFormInPopup(selectedRecordId)
{
       
        var prodId== selectedRecordId.slice(1, -1);
       
        var pageInput = {
        pageType: "entityrecord",
        entityName: "sd_enityprod",
        entityId: prodId
        };
        var navigationOptions = {
        target: 2,
        height: { value: 100, unit: "%" },
        width: { value: 100, unit: "%" },
        position: 1
        }
        parent.window.Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
          function success() {},
          function error() {}
             );
       
}
How Can I execute the next function call after this form is not saved..Can anyone please modify it???
  • Dynamics_User07 Profile Picture
    125 on at
    RE: Wait till Modal form is Saved

    Hi Ray,

    Thanks for your reply.

    Sorry for not giving proper information

    Actually My Next call is below line which retrieve the realted record from saved Modal form.

    But it is getting called just after the pop is opened and not able to fetch the record

    Xrm.WebApi.online.retrieveRecord("sd_enityprod", productId, "?$select=cvt_eSignature").then(

           //     function success(result) {

           //         console.log(result);

           //         cvt_eSignVal = result["cvt_eSignature"]; // Text

           //     },

           //     function(error) {

           //         console.log(error.message);

  • Ray Profile Picture
    1,489 on at
    RE: Wait till Modal form is Saved

    You can call your next function in the successCallback and errorCallback, in your case is function success(){} and function error(){}.

    Here is an example:

    Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
    function success(result) {
    alert("Here is a success callback");
    },
    function error() {
    alert("Here is an error callback");
    }
    );

  • Dynamics_User07 Profile Picture
    125 on at
    RE: Wait till Modal form is Saved

    How Can I execute the next function call after this form is saved..Can anyone please modify it???

    {Last Line -read here)

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Eugen Podkorytov Profile Picture

Eugen Podkorytov 106

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

Overall leaderboard

Product updates

Dynamics 365 release plans