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,...
Answered

Order Form Save error

(0) ShareShare
ReportReport
Posted on by 155

Hi,

I'm getting this message when I save an order in the unified interface. It does save the record if I click OK, but I would rather not have the message popping up.
There's an IFrame on the form, but this message appears when you click either of the save buttons.

Has anyone come across this?

pastedimage1598118545630v1.png

I have the same question (0)
  • Verified answer
    Wahaj Rashid Profile Picture
    11,323 on at

    Hi,

    Seems like you have a Java Script function which is trying to call onSave() while the form is saving.

    I suggest you review your logic and also take a look on preventDefault():

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/save-event-arguments/preventdefault

    Here is a similar thread:

    https://community.dynamics.com/365/unified-interface/f/unified-interface-forum/378396/saving-in-progress-dialog-on-jscript-save

    Let me know if this helps.

    Best.

    Wahaj

    (if it answers your query, please mark it as verified)

  • Verified answer
    LeoAlt Profile Picture
    16,331 Moderator on at

    Hi Partner,

    This is a front-end Script error message.

    Please check the following points.

    1.Check if there is any custom JS function on form onSave event and disable them.

    2.Check if there is any custom JS function contains saving function code which may effect the onSave event.

    3.Check if there is any custom workflow/Plug-in on the entity update event.

    Regards,

    Leo

  • A Wennerwik Profile Picture
    155 on at

    Hi, 

    I have this function on the OnSave event:

    Function CheckInvoiceDate(context)
    {
    var saveEvent = context.getEventArgs();
    var invoiceDate = Xrm.Page.getAttribute("abs_invoicedate").getValue();
    var todaysDate = new Date();

    if (invoiceDate !== null )
    {
    invoiceDate.setHours(0,0,0,0);
    todaysDate.setHours(0,0,0,0);
    if (invoiceDate < todaysDate)
    {
    alert("The Invoice Date is in the past! Please change it to either today's date or a future date.");

    saveEvent.preventDefault();
    }
    else
    {
    Xrm.Page.data.entity.save();
    }
    }
    }

    Things worked as normal as soon as I removed it. 

    This has been running without a problem in the Web Client, so it must be something in the Unified Interface (Wave 2) that doesn't like it.

  • Suggested answer
    A Wennerwik Profile Picture
    155 on at

    It's this that is the problem: Xrm.Page.data.entity.save();

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi Partner,

    Thanks for your information.

    Since you are using UCI, you could use "formContext.data.entity.save(saveOption)" instead.

    docs.microsoft.com/.../save

    Regards,

    Leo

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
ManoVerse Profile Picture

ManoVerse 130 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 117

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans