Current Request sys_id on ui action

Vaishali 11
Tera Guru

How to get the sys_id of a current request in an ui action which is running on the task table?

 

 

 

Thanks,

Vaishali

16 REPLIES 16

Vaishali 11
Tera Guru

Any suggestions on this?

Hi @Vaishali 11 ,

 

UI Action Script:

 

getREQId();

function getREQId() {

if(current.sys_class_name='sc_request'){

current.sys_id.toString();

}

 

or

 

if(current.getTableName()='sc_request'){

current.getUniqueValue().toString();

}

}

 

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

Hi Reshma,

 

I have tried the above scripts but it's not working.

Please find the screenshot of the ui action script I created for your reference:-

Vaishali11_0-1671539066290.png

Hi @Vaishali 11 ,

 

Yes, it was my mistake getUniqueValue() is client-side function.