cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Document option

Former Member
0 Kudos

Hi Experts,

In order to purge a contract using the Delete Document option under Document button on toolbar, the following criteria have to be met:

  • The current date is later than the value in the End Date field on the Header page.
  • The current date is later than the value in the Retention Date field on the Header page. (There must be a value in this field, and it must be in the past, in order to delete the document.)
  • The agreement is not flagged as perpetual.
  • The agreement can be deleted only if its subagreements are deleted.

However, when the four conditions are met, we still can't delete and get the attached error message:

We have custom contract validation scripts and saved scripts. Once we inactivate these two scripts, we are able to delete the same contract. Just curious to find out how we can bypass these scripts when trying deletion or what in our script could cause this?  I've check the logs, error are thrown from validation scripts, but it does not make sense to trigger validation script and saved scripts when deleting a record, doesn't it?

Thanks

Yang

Accepted Solutions (1)

Accepted Solutions (1)

former_member190023
Contributor
0 Kudos

Hi Yang,

Indeed, both Validation and Saved scripts will be triggered when trying to cancel/delete the document. The scripts will not take the 'action' into account, but the document lifecycle.

You could bypass the validations by checking for doc.getFieldMetadata("DELETED_AT").get(doc) in your scripts.

Regards,

Bogdan

Former Member
0 Kudos

Hi Bogdan,

I believe you mean to check whether doc.getFieldMetadata("DELETED_AT").get(doc) is null, right?

I just tried it works!  Thanks very much

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi experts,

After deleting contracts using the Delete Document option, is there a way to retrieve the e.g. the master agreement IDs that has been deleted?

As we have requirement for notifying downstream system that this MA has been deleted from Sourcing. Any suggestions on how to publish deletion update to downstream?

Thanks