- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 05:56 AM
Hi Experts,
I was trying to attach the files of incident record to record producer on click of UI button.
I've tried 'GlideAttachment.copy()' which helps only from record to record, but not record to form.
Can you please advise, how to make this work.
Thanks in advance..!!
Regards,
Naveen.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 07:43 AM
do this
1) create a string variable on record producer and give it higher order
2) pass the incident record sysId from URL parameter when you redirect user to record producer
3) use onLoad catalog client script and get that URL parameter value and set it in variable and hide it
4) then use Record producer script to copy attachment
GlideSysAttachment.copy('incident', producer.variableName, 'target_table', current.sys_id);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 12:57 AM
Hi @Ankur Bawiskar ,
Could you please help me with the solution or any other references.
Regards,
Naveen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 01:39 AM
So you are redirecting user from incident record to record producer and want the file to be copied on that?
Once copies what should happen next? Usually the files will get attached to target record of that record producer
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 01:52 AM - edited 10-09-2023 01:53 AM
Hi @Ankur Bawiskar ,
Please find the below responses..!!
So you are redirecting user from incident record to record producer and want the file to be copied on that? - YES
Once copies what should happen next? - I was trying to show the user with pre-filled data in record producer variables and attach the files of the incident record to record producer.
User fills the additional information and required data in RP (Record Producer) variables and submit the request.
Our Motive : To show the attachments of Incident record in to Record producer while loading the RP from UI action button.
Regards,
Naveen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 01:58 AM
what's the motive of showing the files on record producer?
Did you try g_form.getUniqueValue() for portal?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader