Mini Truckstop
Everybody knows who Tanguy “The XRM Toolbox” Touzard is. That’s right, a legend. But being a CRM legend does not mean knowing everything – it’s knowing when to ask the right questions.
Question
For one of my customers, it seems that when you are on a won Opportunity form, you can change BPF stage, whereas the opportunity is read only
Is this a known bug?
Answer
The answer comes from the authoritative source who shall remain anonymous:
This is by design and following is the rationale.
Business processes are across entities and hence can be updated irrespective of the participating entity’s record state.
For example, Lead – Opportunity – Quote process might have 2 stages for each entity and user can decide to close the opportunity at stage 1 itself. Now if system locks the process on closed opportunity stage 1 – it can never be moved to the quote stage.
Note that the entity fields present on the process stage are LOCKED for modification if the record is read only. This effectively means that the process can be update but the record cannot. Also for the closed records, processes are not assigned automatically.
Jscript can also modify a read-only record, if you put a Jscript onLoad of the form that alters a value, even if it’s read-only it will be modified, and shit will happen, when you try to leave the record it will ask if you want to save changes, and if you say ‘yes’ it will pop-up an error because you are trying to modifiy a read-only record = (.
That’s why jscript should always, prior to altering any values, check if the form is read only. Simple condition if(Xrm.Page.ui.getFormType() != 3) will prevent, as you say, “shit”, from happening.
And What about Business Rules? if we have rules that activate a field they will overpass there readonly
Hey Pedro, I don’t believe rules will run on closed opportunity. But then, again, I’ve been wrong many times before 🙂
Thanks for your Tip Mate.
My problem is that I want to stop user to go back to previous stage when Oppo. is closed/won and read only.
Can you please tell me how I can do this ?
Let me know,
Thanks in advnace.
I tested in v 9.1, and when you get to the end of the process flow, the last step is finish. Once the process flow has been finished, the user cannot go backwards in the user interface.
The tip you commented on was back before the recent refresh of process flows that allow for multiple flows per record.