Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

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
Kilo Patron

You should be able to pull that from @context.props.sysId <- where sysId should be on your page parameter. Type it exactly has you have it on the parameter.

HI Michael,

I did the same way but it is taking the sys_id of the first INC number not the current INC, please see below more details.

I have created a data resource, where i want to get the sys_id:

anshul_jain25_0-1667378839739.png

then this i am calling this data resource in component, but it is not bringing right value, what can be the mistake here.

anshul_jain25_1-1667378983241.png

 

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

Thank you very much, i was missing the configuration on the page, now i was able to achieve it,