Record Producer to create change request OR change task?

emyrold
Giga Expert

I have a requirement where we are trying to present a single front-end to users and then based on a question/answer we will either generate a new Change Request and new change tasks.   Or we will only need to create a new change task where the parent is an existing Change Request.

I was thinking I was going to be able to accomplish this with record producers but am not seeing how it can be done since the record producer item needs to be defined against a predetermined table.

I saw a thread on the community where Mark Stanger suggest a Wizzard but this was back in 2008....

I started poking around Wizards and they seem very convoluted compared to record producers.

I have already built about 30 Catalog Items with all the correct variables, client scripts, ui policies; all tested and client is happy with.   I was hoping I could just mimic what I did on the Catalog side in a record producer so I can have a consistent front end experience for their users and then be able to address their change management requirements.

Any ideas / suggestions?

10 REPLIES 10

Thank you Pradeep, and thanks to Victor RuizI also watched your video...   🙂


Victor Ruiz
Tera Guru

Here's a good video covering 'Wizards' by some stranger in the community :   Ask the Expert: Live Chat | Wizards


Kalaiarasan Pus
Giga Sage

You can still use record producers but point it to task table and then depending on the type of request, create corresponding request (change request or change task)


Just to add, this would be the skeleton record producer code if you go via record producer route ..



current.setAbortAction(true);




if(producer.request_type== 'Change Request')


  {


  var request_CR = new GlideRecord('change_request');


  request_CR.initialize();


  request_CR.short_description = producer.short_description;


  request_CR.insert();


}


else


  {


  var request_CT = new GlideRecord('change_task');


  request_CT.initialize();


  request_CT.short_description = producer.short_description;


  request_CT.insert();


}



Please note, if you want the variable editor to be present on the change request, you will either need to insert the variables manually in the question_answer table or use change_request table on the record producer...


Thank you Kalaiarasan,



Much appriciated...!



-e