auto assign incident number onsubmit instead of onload of incident form

subrat
Kilo Contributor

auto assign an incedent number onsubmit of incident form instead of assigning onload?

1 ACCEPTED SOLUTION

Inactive_Us1474
Giga Guru

Hi Subrat,



Yes you can auto assign an incident number onsubmit instead of onload.


Just go to Navigation filter << sys_properties.list << Search for glide.itil.assign.number.on.insert and set it to true.



Note: Make sure you don't uncheck the Dynamic default of the number from Dictionary of the table.



Thanks,


Akhil



Hit Like/Helpful/Correct, if applicable.


View solution in original post

12 REPLIES 12

subrat
Kilo Contributor

thank u soo much akhil for d quick response..


Welcome


hello bro..


Actually i need to modify only on incident form not change,request etc.


did u get it?


Hi,



The property will allow you to modify the number field for every table.


Actually if you modify the number field that comes from task table so every table extending that inherits the properties.


If you even uncheck the default value from the number field , it would apply to all the tables using that field.



So , as a workaround I would suggest to write two client scripts on incident table.


First an onload client script :


function onLoad() {


    //Type appropriate comment here, and begin script below


    g_form.setValue('number','');


}



Second an onsubmit client script:


function onSubmit() {


  //Type appropriate comment here, and begin script below


  var g1="INC" + Math.floor(Math.random()*1000+1);


  g_form.setValue('number',g1);


}



Thanks



Hit Like/Helpful/Correct, if applicable.


Thanks again bro.