Related list ui action button

Kusuma2
Kilo Guru

Hi All,

I would like to make the Button(Custom Button named"Relate" )  present in the Related list to be visible,    if the Related list has no empty Records.

If there are no records in related list(EMTY) I would like to hide that Button.

(Or)

Then button should be visible only when you select any of the records in the Related list.

 

Thanks,

9 REPLIES 9

Hi Aj,

Which is the field on Change Request which refers to the current table?

Is the name of column "parent" because in screenshot you have mentioned current.parent.sys_id?

Also can you share the code of script include?

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

 

find_real_file.png

 

 

find_real_file.png

Hi Aj,

Did you check you are getting the logs are not?

Also check whether correct sys id is coming?

Also check rowCount()

If it is 1 the button should be shown if not then hidden.

Also in your script include function you should have return false since if no record found the function won't return anything and may cause the code to break.

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

Hi Aj,

Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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

Hi Aj,

Any update on this?
Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.

Regards
Ankur

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