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 :
Microsoft Dynamics CRM (Archived)

moveNext() in branch BPM?

(0) ShareShare
ReportReport
Posted on by

Hello everybody!

Today I want know a single think.

"How we can move automaticily to the next branch stage?"

It's because If I make a condition that "all process fields" are "true", move to next Stage using 

Xrm.Page.data.process.moveNext();

But in this case, I need that when the user select in "status field", move to
next branch.

Example:

Stage1: Quilify - Stage2: Development ;

S1--> Identify Prior Client (Account),
Identify Second Cliend (Contac), Identify Needs & Identify Real Needs.

S2--> Proporse a Solution && Evaluated Agred.

Branch Stage (any stage have their branch) : On Hold Process

BS --> "Why process enter to "On Hold Process"".

So, in a hipoteticaly case we can have:
In a initial communitacion we know:
*We meet to Sr.Guillermo (Contact)
*The firm where he work "XX C.A"(Account).
*The frim inssuries (Client Need).
*In ondert to go Stage2, we make a investigation to know the real needs of the firm.

But while we make the investigation to get that,
the Sr.Guillermo call and told us that was fired from the company.
And there is when the process enter in "On Hold".
Because:
*We lose the contact.
*We don't know the new contact.
*We don't know if the new contact keep with the previus contact proyect.
---------------------------------------------
But with moveNext function in the field that open the branch stage (The branch weren't made
with JavaScript, I don't know if have any effect or not, but information will help) it
don't work.
The only way that I've to "jump" to the branch, is that the "all process field" were "true"
and how the branch oppened in the middle
S1-Branch-S2 (In the process view), it jump to Branch (I know that's wrong, but was funny
see that this "error" can jump to branch jajajaja).


 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    You can write js on onchange status field, if status="value" then in Successcallback function you can call Xrm.Page.data.process.moveNext();

    Thanks,

  • Community Member Profile Picture
    on at

    Hi Again Rid!

    A dude, I've seen information with "fire.Onchanged" or something like it, but I can't see information about "Onchange status field"; Do you know where I can find that? (Or maybe I've see it, but with other name jejeje).

    And Thanks for your info!.

    Extra dude!! In my process when the stage move back (S2+ -> S1) it give me two alert : dirtyForm and Succes (I need made 1 click to save, 1 to get "dirty" and 1 to go back). It's ok? or there is a problem.

    I'm using :

    if ( Xrm.Page.getAttribute("mk_reanudar_abandonar_5").getValue() == 850000000){

      Xrm.Page.data.process.setActiveStage("8fe9029a-e925-4224-97eb-f6603847a95b", function (estado) { Xrm.Utility.alertDialog(estado, null);})

    }

    And Thanks again for answer :3

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Maurizio,

    You can write the js and apply it on onchange event of status field on the form.

    Thanks,

  • Community Member Profile Picture
    on at

    Hello Rid!

    I've loocked by OnChanged Event and try put the Js, but it don't work (maybe because I don't know how work there to be honest).

    Could you give me  some indications?.

    For example, what I must write?

    In this case I wrote:

    var moveToNext;

    if (Xrm.Page.getAttribute("mk_on_hold").getValue() = false) {moveToNext = false;}

    if (moveToNext){

    Xrm.Page.data.process.moveNext();}

    and I've put in the specific field "On Hold" in OnChanged Event..... It's Oks?

  • Community Member Profile Picture
    on at

    ajax

  • Community Member Profile Picture
    on at

    What do you mean with Ajax? I've seen that it's like JS... but I don't undestood the function of this.

    Why Ajax and not JS? Can you explain?

    PD: Sorry for my later answer, I was out of internet there.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans