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,...
Suggested Answer

Problem with real-time workflow running on record creation - Unified Interface

(0) ShareShare
ReportReport
Posted on by 10

Hello

Our company is in the process of transitioning to the unified interface as such we are running a sandbox instance with unified interface enabled.

One issue I am facing is the behaviour when creating a new quote record from an opportunity.

Previously in the legacy web client, when creating a quote record using the '+' button within the quote grid of the opportunity form, a record would be created and saved to the database, various real time workflows would trigger on record creation and input data onto the form fields from source fields on the parent opportunity / account records.

However, with unified interface enabled this behaviour is different, now when clicking the '+' button to create a new quote, a draft quote form appears, similar to the draft form that is presented when creating a new opportunity / account. The workflows that trigger on record creation to input data do not trigger (I would guess this is due to the record being a draft and not a complete record yet) and we are left with some system mandatory fields that cannot be completed manually (revision ID) to name one. As such the quote record cannot be saved in this state. 

To troubleshoot this, I have tried the following:

Disabled custom JavaScript that is present on the quote entity (Both in legacy and UI) Behaviour is the same.

Created a new workflow with a single step to update a field on record creation with dummy data - does not trigger.

Configured the existing workflows to run on demand, triggered on the draft record using flow button - presented with a 'Not supported' error - Error code: 0x80040315

Configured the existing workflows to run as background workflows - do not trigger.

The goal would be to get the previous functionality back to the legacy web client view, although I am open to a workaround should one provide similar behaviour.

Ideally if anyone has any advice to further troubleshoot this, or a solution from their own experience that would be great.

I have the same question (0)
  • Suggested answer
    Carlos Eduardo Fontolan Profile Picture
    on at

    Hello Rusty,

    I tried to reproduce the behavior that you mentioned, subgrid quote on UCI, but couldn't it. In my organization when I try to create a record was created successfully.

    Some questions:

    What is the version of your organization? - You can validate it using orgname.crm.dynamics.com/.../default.aspx

    Do you use a custom form to perform it? - Are the forms having some customization on fields or codes?

    If using a vanilla organization, do you have problems, maybe you can use some javascript codes:

    - To save record - formContext.data.save(saveOptions).then(successCallback, errorCallback); Reference: docs.microsoft.com/.../save

    - To re-load form - Xrm.Navigation.openForm(entityFormOptions,formParameters).then(successCallback,errorCallback); Reference: docs.microsoft.com/.../openform

    - To call workflow (in this case the record need to created) - Xrm.WebApi.online.execute(request).then(successCallback, errorCallback); Reference: docs.microsoft.com/.../execute.

    Let me know if the information above could help you.

  • Rusty Jake Profile Picture
    10 on at

    Hello

    Thankyou for your reply.

    I have created a test script to use for the purpose of saving the form and refreshing on a form load in an effort to get the record to be 'created'.

    We are using a custom quote form with custom fields. 

    an example of the script:

    var entityFormOptions = {};
    entityFormOptions["entityName"] = "quote";

    function alertSaved() {alert("Record Saved");}
    function alertNotSaved() {alert("Record Not Saved");}
    function alertRefresh() {alert("Record Refreshed");}
    function alertNonRefresh() {alert("Record Did Not Refresh");}

    formContext.data.save(1).then(alertSaved, alertNotSaved);
    Xrm.Navigation.openForm(entityFormOptions).then(alertRefresh,alertNonRefresh);

    Whilst I get the alert text for the save and the refresh, it appears that the form does not actually save.

    I get the feeling I am missing something to trigger a genuine save event.

    pastedimage1587550558932v1.png

  • Suggested answer
    Justinjose Profile Picture
    2,707 on at

    Hi Rusty Jake,

    Could you try the below save examples

    To save data on the form, you can call save() without any arguments, like this:
    
    formContext.data.save();
    
    
    If you need to pass arguments for saveMode, pass it as an object with properties:
    
    formContext.data.save({
        saveMode: 1
    });

    Thanks
    Justin Jose

  • Rusty Jake Profile Picture
    10 on at

    Hi

    I have tried with no arguments under formContext.data.save(); however the record still does not save on load.

    Do you know if mandatory fields would prevent a scripted save?

    Many thanks

  • Carlos Eduardo Fontolan Profile Picture
    on at

    Hi Rusty,

    Yes, mandatory fields could prevent save record.

  • Justinjose Profile Picture
    2,707 on at

    Hi Rusty,

    Yes, mandatory fields will prevent a scripted save.

    Have you fixed above workflow issues?

    Thanks

    Justin Jose

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 61

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 52 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans