Hello there!
I've a dude about with the status notification: "dirtyForm".
I've look that it's when the Stage didn't save the changed and got a move (Previuos or Next).
I've got that error when I used the function:
Xrm.Page.data.process.setActiveStage("8fe9029a-e925-4224-97eb-f6603847a95b", function (estado) { Xrm.Utility.alertDialog(estado, null);})
It's a example of my CodeList. It's for move to the first Stage when the user select the option for that.
When I saved (my script is in OnSaved Event). So I must used 3 click for active it: *1° Clik Saved Form *2° Click Show "dirtyForm" *3° Click Show "Success".
Before my dude, I'll explain my idea and code (I've tried make some arrows xD):
------Stage7: Close------
^^^^
///////
--------Stage8: On Hold ----------- ----Stage7: Close---
//////// ^^^^ ^^^^
vvvvvv /////// ///////
[[[[[ Stage1:Start ---> Stage2--->Stage3--->Stage4-->Stage5 ]]]]]-->Stage6: Win
Like you can see, I've a process with five stages, where:
*If the process is Oks, we can keep moving until winning the lead.
*If the process isn't Oks (We Lose), we can skip to Stage7:Close (by branch).
*If the process got trouble, we can Skip to Stage8:On Hold. And:
-If the trouble was fixed, we must come back to Stage1:Start
-If the truble got worse, we must close the lead (Go Stage7:Close).
And there are some information of the "building of my code":
*To make Stages7-8 I've used Branch Stages by Dynamic 2016 options.
*Any Stage (1-5) has their activation branch var (on_hold1 , on_hold2,...) to move to their branch stages with similar name (We have 5 "Stage8: On Hold").
*Stage8 has their activation var to move to Stage1 or Stage7.
So for example, If the process get problem in Stage2 and in the next week it fixed:
Stage1: Oks -->Stage2: Troubles / "on_hold2":Yes -->Stage8: Fixed / "fixed":Yes -->Stage1
My following dudes are:
1) It's a normal? (Get dirtyForm and afther success)
2) If the problem is that the form don't saved. How can I solved it? (I tried used saved function before the setActiveStage and nothing happened).
3) In the example. How can I delete the values in the vars "on_hold2" and "fixed" when the process came back to Stage1? (I've tried used setValue and nothing happened).
4) In any case...it's oks move to the first stage with this?? or there we have a special function for it?
---------
For your time Thanks you and renember please, I'm new in JavaScript, I've tried this script with much help in the forum, so I don't will undestad your answer if you told me:
"read the library in microsoft"(I've already read it and it's bad for consulting xD!). "use ajax and done"(???).
"use the real function to saved" (and don't give the code...).
"Bro I don't know, but maybe it's magic" (be serius please).
"Use the special addition in the ............and .........."(much expert information that assume that I know JavaScript and CRM2016 like if I born with it xD [Not details for new users :c]).
"Use the function "jumping_stage1" and done" (Where you get that?? I don't see any information of it...)
"You'll try debbuging and solved by yourself" (Yeah...I'll do but I don't have Visual Studio License for install a debugger :c [If you know any trial that I can use, It'll help ^^]).
PD: Yes, I know that I sound very stricted... but in previous post I've got some answered like that.
PD2: If you need all the Code, I'll pasted the link of a post where I pust the full code.
*This post is locked for comments