How to Create Ui action in csm workspace

instance
Tera Contributor

I am new to Servicenow. 

My requirement to create Case Record from incident table Using Ui action .( in Csm workspace)

i have Created a ui action named : Case.

On creating a New record and saving --> the Ui action button get enabled.

On clicking the Case button it is redirecting the Pop up window with new case record .

but in the case Record Parent Field i need to populate that particular incident number automatically how to do this.

 

i have done till the pop up window . i dont know how to do this -->case Record Parent Field i need to populate that particular incident number automatically

1611a.jpg

 

Ui action in workspace client script:

var url ='/sn_customerservice_case.do?sys_id=-1&sysparm_query=incident%3D'  +'&sysparm_view=workspace';;

g_modal.showFrame({
title: getMessage("Create case"),
url: url,
size: 'lg',
height: '380px',
autoCloseOn: 'URL_CHANGED',
})

 

help me with your script for that incident case relationship

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@instance  

try this

var url ='/sn_customerservice_case.do?sys_id=-1&sysparm_query=incident%3D' + g_form.getUniqueValue() +'&sysparm_view=workspace';;

g_modal.showFrame({
title: getMessage("Create case"),
url: url,
size: 'lg',
height: '380px',
autoCloseOn: 'URL_CHANGED',
})

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

 

Ui action in workspace client script:

var url ='/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=de45c412c312310015519f2974d3ae1b&sysparm_query=incident%3D'  +'&sysparm_view=workspace';;

g_modal.showFrame({
title: getMessage("Create case"),
url: url,
size: 'lg',
height: '380px',
autoCloseOn: 'URL_CHANGED',
})

 

but i am working with create case for record Producer

when incident record is created and then uisin ui action the create case for record producer is popup.

1611a.jpg

 after filling this details the case record is created.

1611b.jpg

 but i need to create a relationship between the case and incident table where incident is the parent one , how to do that, i dont know how to do that. please help me @Ankur Bawiskar 

@instance  

what's your exact requirement?

1) to create case from incident form using UI action in workspace and populate the parent field of case with incident reference? 

If yes then do this

var url ='/sn_customerservice_case.do?sys_id=-1&sysparm_query=parent=' + g_form.getUniqueValue() +'&sysparm_view=workspace';;

g_modal.showFrame({
title: getMessage("Create case"),
url: url,
size: 'lg',
height: '380px',
autoCloseOn: 'URL_CHANGED',
})

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

requirement @Ankur Bawiskar