How to stop "Risk Assessment" on change record to create a record on Assessment Table.

nirwan_ritik
Tera Contributor

On Change Request record, users do risk assessment by clicking on the button "Risk Assessment". This is creating a assessment record on Assessment Instance Table (asmt_assessment_instance). 

I want to let users take the assessment, BUT, I don't want the record getting created on the asmt_assessment_instance.

 

Kindly help me with this 🙂

 

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@nirwan_ritik There are two ways you can tackle this.

1. Cleanup using a scheduled job: You can do a clean up of Assessment Instance Table (asmt_assessment_instance) table via a scheduled job. When the job will run it will delete the records if they are older than a certain duration.

2. Via Business rule: Create an onBefore Insert business rule on Assessment Instance Table (asmt_assessment_instance), in script use 

current.setAbortAction(true);

 

Hope this helps.

Hi Sandeep,

Actually I don't the Risk Assessment to even create the record on the Assessment table. Kindly help me with any leads.

Thanks.

@nirwan_ritik In this case the business rule approach I suggested should work for you. Give it a try.