Trigger archive rule from scoped application

Lithesh
Kilo Sage

I need to trigger an archive rule from my scoped application is there any way for that without allowing scope access.
Thanks in advance.

2 REPLIES 2

Community Alums
Not applicable

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.

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