get the current sys_id on csm workspace in UI Builder component or data resource

anshul_jain25
Kilo Guru

Hi All,

 

how can we get the current sys_id on csm workspace in UI Builder component or data resource

I have created a contextual search on CSM workspace, where i am calling a Activity Component which should show activity of case table, i am able to get the details in static manner, mean if i give a sys_id of case then it is showing the correct details and for this to be dynamic i need to pass the sys_id of the ticket selected on the csm workspace , how can i pass it.

CSM Workspace where i have created a new contextual search

anshul_jain25_1-1667312308882.png

I am calling an Activity Stream Component from case table

 

anshul_jain25_0-1667312056036.png

When i am giving the sys_id directly then i am able to fetch the required details, now i have to fetch the sys_id of the ticket which is selected on workspace, how to do this. i tried adding some code under bind data and script but not able to write the correct script, can someone tell if this can be done, can i fetch the SYS_ID in update in sys_id field of component.

Thanks in Advance.

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

I'm saying put @context.props.sysId in below where you have sysID. This assumes your page parameter is "sysId".

Screen Shot 2022-11-02 at 8.16.31 AM.png

View solution in original post

6 REPLIES 6

@Michael Fry1 can you please let me know one more thing, this contextual side bar is now visible for all the tables, how can i hide for others and show only on INC and RITM table.

JHughes62
Tera Expert

@anshul_jain25 @Michael Fry1 - we also have the exact same issue, however when we add the @context.props.sysId to the sysId it still did not work. Any idea on what we could be missing?

We have created a post for this issue we are experiencing: https://www.servicenow.com/community/developer-forum/how-to-show-variables-from-a-submitted-record-p...