Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to dynamically change the prefix of incident according priority.

Vinayak Patil
Tera Contributor

How to dynamically change the prefix of incident, according priority.

When priority is 1 then Incident number will be INC123.

When priority is 2 then incident number will be ABC123.

 

1 REPLY 1

NityaB161013953
Mega Patron

Hi @Vinayak Patil,

Dynamically change Incident number prefix based on priority

  • Priority 1 → INC123

  • Priority 2 → ABC123


⚙️ Option 1 – After Insert BR (simple & quick)

  • Create After Insert Business Rule on incident.

  • Script updates the prefix after record creation:

     
    var prefix = current.priority == 1 ? 'INC' : 'ABC'; var numPart = current.number.replace(/\D/g, ''); current.number = prefix + numPart; current.update();

Easy to implement
⚠️ Causes a second update after insert