Create change request declarative action not setting parent as incident

Debasis Pati
Kilo Sage

In serice operation workspace for incident there is a declarative action called 

"Create change request" when clicked on it it opens the change rfc page to select which type of change request i want to create either normal or emergency once i select anything and create a change request its parent should get filled as the incident number but it is not doing that ideally this should do right as we are creating the change from the incident.

Declarative action link
https://yourinstance.service-now.com/sys_declarative_action_assignment.do?sys_id=20aec8ab23323010148...

https://yourinstance.service-now.com/sys_ux_form_action.do?sys_id=64639c7a233230101488dc1756bf65f0&s...

@Ankur Bawiskar can you let me know what can be done to fix this issue?




1 ACCEPTED SOLUTION

@Debasis Pati 

that's OOTB behavior

g_form object only works if the field is present in that view

You can do this

-> let it be on form view i.e. workspace

-> populate it and then hide it

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

Ankur Bawiskar
Tera Patron

@Debasis Pati 

but CHG OOTB doesn't have INC as parent.

why you want that?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hello @Ankur Bawiskar ,
As i am creating this change from the incident i want to set the parent of the change request as the incident number.

@Debasis Pati 

in that case I believe you can write onLoad client script on CHG table and see the URL and then do string manipulation and set parent field

I am not sure if the above solution works or not

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ,
Can you please provide some dummy script example?