- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2021 02:42 AM
Hi All,
I am creating a new Document Record, when a custom table record gets closed. But I also want to create Document revision record associated to respective Document created. For this I used flow designer that triggers when a document record is created. This is creating new Document revision record, but is not showing any relation with Document record. How to create a document revision record associated to respective document record created.
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:13 AM
Are you attaching attachment on those fields after record creation.
You can write after update business rule on custom table, condition you can include
"field changes"
and then use that script to copy the attachment from custom table to revision table.
In business rule you have to get the revision record sys_id by glide record , i am assuming in your custom table you are storing "Document Revision" record , or storing custom table record in "Document Revision" form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 08:30 AM
Hi
1. On custom table, we have two file attachment type fields and I want only one of the attachments to be copied to Document revision table.
2. Where to write the above script you have provided? Do I need to write it in separate BR? Do I need to replace sys_id with anything? I want this to be dynamic because I need this to work for every custom table record that gets closed.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 11:28 PM
Hi
1. On custom table, we have two file attachment type fields and I want only one of the field attachment to be copied to Document revision table.
2. Where to write the above script you have provided? Do I need to write it in separate BR? Do I need to replace sys_id with anything? I want this to be dynamic because I need this to work for every custom table record that gets closed.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:13 AM
Are you attaching attachment on those fields after record creation.
You can write after update business rule on custom table, condition you can include
"field changes"
and then use that script to copy the attachment from custom table to revision table.
In business rule you have to get the revision record sys_id by glide record , i am assuming in your custom table you are storing "Document Revision" record , or storing custom table record in "Document Revision" form ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 07:54 AM
Hi
1. Are you attaching attachment on those fields after record creation?
The custom table record is completely different from document revision record. They don't have any relation. In custom table record, we are uploading attachments in those fields while the record in progress. And with BR we are creating Document record, once custom table record gets closed. Here I am updating Document Name as the custom record number, to find to which record it is related to. After creating document record, I am using flow designer to create document revision record associated to Created Document record. As we don't have any relation to Custom table and Document revision records, can we able to copy attachments?
Only thing having similar is, Custom table record Number is the Document Name. Could you please provide any script to achieve this?
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 08:17 AM
Are you doing it on personal instance? if yes please share the details, I will quickly help you.
If you want to connect or share screen please reach out to me on email below.
hvrdhn88@gmail.com