The CreatorCon Call for Content is officially open! Get started here.

how to restrict adding of npctasks in change when cab is approved

raj765_32
Tera Contributor

Hi can anyone please help me how to and what to proceed for below requirment :

i want to restrict adding of NPCTASKS to change record when change is approved by cab, only change manager group members can able to add npctasks to chnage record.

 

i.e

 

  • No one is able to add NPCTasks to Change that's already approved by CAB
  • Only CCB - Change Management group can add NPCTasks to Change that's already approved by CAB

 

4 REPLIES 4

Harsh_Deep
Giga Sage
Giga Sage

Hello @raj765_32 

 

Use BR before insert of NPCTasks and give the condition as

If change is cab approved then okay otherwise abort action.

Then check if the gs.getUserID() is the member of change manager then accept else abort action.

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

Thanks

can you please help me with the code, i have written br on task table and given conditon for change is approved, how would i aadd it to npctask and how would i restrict the users apart from change managars

Hello @raj765_32 

 

Use this

(function executeRule(current, previous /*, g*/) {

var change = current.name_of_reference_change_field;
//give condition to check cab is approved or not
    if (!gs.getUseID().isMemberOf('my_group')) {
        current.setAbortAction(true);
    }
})(current, previous);

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

Thanks

hi harsh my requirement is that approved change number  cannot be added in npctasks and only change managers can add even if its approved