Trigger archive rule from scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 01:23 AM
I need to trigger an archive rule from my scoped application is there any way for that without allowing scope access.
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2023 01:38 AM
Hi @Lithesh ,
The reason that the record estimate is always 0 and the destroy rule, when executed, does not delete any archived records, is the value for the column: Archive [sys_archived] is not set when the records were first archived.
The obsolete warning message "Function nowDateTime is not allowed in scope <name>. Use GlideDateTime instead: new GlideDateTime().getDisplayValue() when an archived record (scoped table) is re-archived" (not affecting re-archiving) was already fixed in Orlando (obsolete PRB1364685/KB0780320).
However, if there is a destroy rule specified for the archive table, it may not work, as the value of sys_archived field is not set (Ref. KB0780321).
The archived records that are to be deleted/destroyed are identified based on the calculation of the date time value in the column: Archived [sys_archived] (of the archived record) and the duration specified in the column: Archive Duration [archive_duration] of the corresponding Destroy rule. As the value in the column: Archive [sys_archived] is not set when the record was first archived, the Destroy rule will not be able to identify the archived records to be deleted.
NOTE: For Paris and later, the before insert business rule will not work . In order to remove the archived records manually, create a case for SN Technical Support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2023 06:03 AM
Hi @Community Alums , Thanks for the response however My question is whether we can trigger the archive rule on-demand in the custom application if so, how?
Regards,
Lithesh