Hello everyone,
I would like to assign a security role to a Team A during a Business process flow. Then I would like to remove it. I meet some difficulties. Indeed I don't know the JavaScript function to assign a security role to a Team. Do you have any idea?
Here is my code:
function OnLoad() {
// *** Whenever the stage changes trigger an onchange function
Xrm.Page.data.process.addOnStageChange(stageOnChange);
}
function stageOnChange() {
var stage = Xrm.Page.data.process.getActiveStage();
var stageName = stage.getName();
if (stageName=="S1") {
//Team A get security Role 1
} else if (stageName=="S2") {
//Team A lose securit Role 1
}
Thanks a lot,
Léo









