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 :
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???
I have the same question (0)
  • Dynamics_User07 Profile Picture
    125 on at

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

    {Last Line -read here)

  • Ray Profile Picture
    1,537 on at

    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

    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);

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

#2
ManoVerse Profile Picture

ManoVerse 55 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 37

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans