std change modify templates

jean-pauldehaas
Tera Guru

I`m trying to copy over the sample changes from the standard change template

jeanpauldehaas_0-1742913090417.png

To the modify template as soon as template to modify is selected

jeanpauldehaas_1-1742913117101.png

 

has anyone done this before ?

1 ACCEPTED SOLUTION

You'd need to make some heavy customisations to 'std_chg_glide_list_change_requests' UI macro. the sample change requests variable on the catalog item isn't a normal variable but a series of nested macros.

 

It also doesn't make sense to modify the standard change and include the sample change requests provided as part of the original proposal. This is because the modification needs to reflect recent change request usage, and allows the change management team to see recent success examples.

View solution in original post

6 REPLIES 6

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @jean-pauldehaas 

Please provide more details, there is some gap in your statement.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

if you go to standard changes - template management you have te Modify a standard change template.

in that form when you select template to modify, it should copy the sample change requests from that existing template into the sample change requests on the modify form

Hi @jean-pauldehaas 

Thanks for the detailed clarity. I checked on my PDI, and the sample change variable is not available, but I believe we can add it. However, we need to confirm if the variable called 'business justification' has been added to the item_option_new.do table.

You can check the same for the new template and try creating a new variable, then bring it onto modified templates as well.

 

AGLearnNGrow_0-1742914042963.png

 

AGLearnNGrow_1-1742914200097.png

 

 

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

i have the sample change requests already its a custom with label but i need to amend this script so it copies them over from the existing std change template:

 

     ajaxFunction_getTemplNCategoryForModify: function() {
        var tableNameProducer = this.getParameter('sysparm_tableName');
        var producerGr = new GlideRecord(tableNameProducer);
        var producerSysId = this.getParameter('sysparm_sysid');
        var addMandatoryFields = this.getParameter('add_mandatory_fields') + '';
        var ans = {};
        if (producerGr.get(producerSysId)) {
            ans.template = this._getTemplateValue(tableNameProducer, producerGr);
            if (addMandatoryFields === "true") {
                var fieldsAndVals = this._parseEncodedQuery(ans.template);
                this._addMandatoryFieldsToTemplateVals(fieldsAndVals);
                ans.template = this._formQuery(fieldsAndVals);
            }
            ans.catalog = j2js(producerGr.sc_catalogs);
            ans.category = j2js(producerGr.category);
            ans.templateName = j2js(producerGr.name);
            this._toXmlAndSet(ans);
        }
    },


    type: 'LKQ_StdChangeUtils'
});