Error while creating a standard change through API

mayankkhurana
Tera Contributor

Getting this error 'Cannot convert null to an Object'  while creating a change through standard change API 

 

{

    "error": {

        "message""Cannot convert null to an object.",

        "detail""TypeError: Cannot convert null to an object. (sys_script_include.7b2c3918b713130096c3e4f6ee11a93d.script; line 27)"

    },

    "status""failure"

}

 

And the sysid I am getting is of a script Include StandardChangeTemplateSNC, Not able to track where this script include is getting called and what is the use of it?

Any help will appreciated..

4 REPLIES 4

Justin Hatfield
Tera Guru

Can you provide a sample payload that you're testing with?

I am just sending a standard change template as input 

https://<xyx>.service-now.com/api/sn_chg_rest/change/standard/{template_sys_id}

 

When I am trying the same template in another instance it is working fine and that 
OOB script include StandardChangeTemplateSNC exist in this instance as well..

mayankkhurana
Tera Contributor

I am just sending a standard change template as input 

https://<xyx>.service-now.com/api/sn_chg_rest/change/standard/{template_sys_id}

 

When I am trying the same template in another instance it is working fine and that 
OOB script include StandardChangeTemplateSNC exist in this instance as well..

 

Marco Moro
Tera Guru
  • Try first setting the system property "com.snc.change_management.core.log" to "debug" and reprocess your steps. Maybe you'll find some more insights in system log at the time of execution (as well as some errors which may allow you to trace down the causing error).
  • Can you create a standard change (in the UI) based on the desired template with the integration user successfully?
  • Check if the super class (ChangeProcess) has been modified/overridden regarding the method "
    getGlideRecord"
  • Check also if the current version (field_current_version) of your template (in std_change_record_producer) is available.