The actual configuration doesn't allow you to have a different prefixes for each type of CR object.
You will need to add a mod and a spl file.
Content of "z_manage_cr_prefix.mod" file : (You will need to replace **SEQUENCE** with the trigger sequence that suits your needs. You may want to go around 1000 to avoid a conflict with OOTB triggers)
OBJECT cr {
TRIGGERS {
POST_VALIDATE z_manage_cr_prefix() **SEQUENCE** FILTER(EVENT("INSERT"));
};
};
Content of z_manage_cr_prefix.spl file :
cr::z_manage_cr_prefix(...) {
if(this.type =="I")
{
this.ref_num="I" + this.ref_num;
}
if(this.type == "P")
{
this.ref_num="P" + this.ref_num;
}
if(this.type =="R")
{
this.ref_num="R" + this.ref_num;
}
}
Place the two files under site\mods\majic and then restart SDM
And since this code will run "POST_VALIDATE" on Insert, it is normal that the ref_num is not formatted when you initialize a request/incident.
When hitting new incident :
After saving the ticket :
Yeah i know, a green icon on a purple background looks terrible. My colleague was applying changes in Prod thinking he was in DEV so we had to colorize the DEV env