How to create record in another table by business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 03:25 AM
Hello
we have two table "Entities" and "Assessment"
We want record should be generated in "Assessment" table when we submit a form in "Entities" table .So how to do it from business rule?
Thanks & Regards
Shraddha Desai

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 03:30 AM
You can simply create an After Insert Business rule on Entities table.
Now in the script, you can GlideRecord the Assessment table and insert the information that you want.
Sample code:
var gr= new GlideRecord('u_test');// assessment table name
gr.initialize();
gr.field_one= value1;
gr.field_two=value2;
gr.insert();
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2023 03:34 AM
gr_fieldone and gr_fieldtwo are the values from assesment tables ??
and what is value defiend for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2022 06:04 AM
It sounds like GRC. You want a new assessment? Or an assessment instance based on the entity where you are?
In case of an assessment, you can make use of the GRCAssessment utils. Something like :
new global.AssessmentUtils().checkRecord(current, current.attestation);
var total = new sn_grc.GRCAssessmentUtils().assessItem(current);
See also BR : Attest control after PER is closed