Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Directing users to per...
Sales forum
Suggested answer

Directing users to perform specific actions

Posted on by
Hi there,
 
First time posting in the community. As a rookie D365 administrator/designer, I researched as much as possible beforehand but couldn't find the right solution. 
 
My ultimate goal is to direct the user to save an Opportunity record before proceeding to additional tabs.
 
When the lead is qualified, the Opportunity record is auto-created. The user will fill out details on the opportunity record and sometimes proceed to other stages (AKA /Tabs/ labeled according to the BPF Sales Stage)
 
Before they proceed to additional tabs, I would love to have an on-screen prompt to tell them what to do. If this isn't feasible then using the show/hide method would suffice. I'm not super familiar with Java and still learning how to best us the /Events/ feature within a field. 
 
Any help or suggestions would be greatly appreciated!!
 
-TB
 
  • Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Directing users to perform specific actions
    Hi Tim,
    Has the issue been resolved?
    Have there been any updates? Please feel free to ask me any questions you may have!
    If it has been resolved, can you mark the response as an answer?
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Directing users to perform specific actions
    Hi Partner,
    If you need, you can refer to the following steps to use js on the opportunity form:
    1.Js code:
    function onload(executionContext) {
        var formContext = executionContext.getFormContext();
        // Register event handler on Process Stage Change
        formContext.data.process.addOnStageChange(onStageChange);
    }
    
    function onStageChange(executionContext) {
        // Show notification
        Xrm.Navigation.openAlertDialog({ text: "You need save current opportunity before moving stage "  });
    
    }
     
    2.New web resource:
    3.Go to Opportunity > Form > form properties:
    --Add this web resource:
    --Add two functions to onload event:
    4.Save and publish.
    I hope you can mark my answer verified if it is helpful! If you have any questions, please feel free to contact me.
    Regards,
    Leah
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Directing users to perform specific actions
    Hi Partner,
    1.You said: My ultimate goal is to direct the user to save an Opportunity record before proceeding to additional tabs.
    Auto-save feature can help you without any coding.
    --Auto-save helps app users focus on their work without having to manage saving data in the form.
    --By default all main forms for Updated tables and classic tables will have auto-save enabled. After a row is created (initially saved), any changes made to a form will automatically be saved thirty seconds after the change is made. 
    2.other stages (AKA /Tabs/ labeled according to the BPF Sales Stage)
    --Is this the one marked on my screenshot?
    1)addOnStageChange
    -- it will be called when the business process flow stage changes
    3.an on-screen prompt:
    1)openAlertDialog 
    --Displays an alert dialog containing a message and a button.
     
    Please refer to the following link, which provide one code example:

    I hope you can mark my answer verified if it is helpful! If you have any questions, please feel free to contact me.
    Regards,
    Leah

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans