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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans