Icon/Picture in Record producer - facing issue for updating all record producers at a time

sri vijaya
Tera Contributor

Hi

we have 100+ record producers , so for icon/picture in record producer we want to update all of them at once

so created business rule and fix script 

and followed this process

  • Attaching the image in any one record producer
  • Now going to sys_attachment table and copying the sys id of the above step  
  • Attaching the sys id in both business rule and fix script to run

However this is working fine for us but as these are instance dependent activity as these are manual steps for each instance, so here when one record producer is moving from instance to other with other development activity/for any issue then sys id of icon is changing everytime which is image is missing everytime

so to avoid this is there any other solution to update image/icon in all record producers at a time?

@Ankur Bawiskar @Dr Atul G- LNG @Chaitanya ILCR @J Siva 

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@sri vijaya 

you can query in sys_attachment with table_sys_id i.e. sysId of that record  producer and not with sysId

SysId of attachment record will change but sysId of record producer will be same as you will be migrating.

So once you update that part then no manual activity required and simply run fix script

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

@Ankur Bawiskar 

can you little brief me more about this "you can query in sys_attachment with table_sys_id i.e. sysId of that record  producer and not with sysId"

srivijaya_0-1750155864493.png

I am understanding that field called "table sysid" should be place in this sys id place?

 

@sri vijaya 

can you share the complete script?

in the 1st point you mentioned you are adding picture to 1 record producer

in the 2nd point you mentioned you are picking the sysId of sys_attachment from step 1

That's what I mentioned, in 2nd step don't rely on sysId of sys_attachment from step 1 as it will change in next instance, instead query sys_attachment with table_sys_id=Record Producer 1SysId

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

sri vijaya
Tera Contributor

@Ankur Bawiskar 

srivijaya_0-1750156354996.png

This is complete fix script, Here in 14 line adding the sys id of the sys attachment sys id (which is added as first step)