- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 10:58 PM
Dear experts,
I would like to add a field which is the inherent risk rating result after the users have completed the risk assessment and the score will be reflected when they create a risk response task in the risk response form. I tried to create a new business rule which is as below. But it does not work, any suggestions to approach this matter?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2025 06:45 PM
Hi, so I tried and this is the script that is working for now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 12:11 AM
HI Shivalika, thanks for your reply but it still does not work for your solution provided.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 12:25 AM
Hello @ChuanYanF
No, I had sent corrected script after understanding whole logic here.
current.risk_assessment_instance.inherent score ( this field contains score) - //USE CORRECT NAMES
Copy this to current.inherent_score (This is the field to which you will copy above)
current.update();
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 01:02 AM
Ok sorry can you guide me through this I dont understand where should I input this corrected code of yours? In my business rule? But I shared the above modified script that is based on my understanding of your corrected logic as well. So where do I do wrong can you guide me through this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2025 02:12 AM
Hello @ChuanYanF
Please replace your code with below -
(function executeRule(current, previous /*null when async*/) {
// Access the inherent rating from the related risk record
var inherentRating = current.risk_assessment_instance.summary_inherent_risk_score;
// Set the desired field in the Risk Response task table to this value
current.u_inherent_risk_rating = inherentR
ating;
current.update();
Please check for exact fields risk assessment instance on response task form and replace the name of the name is incorrect.
This dot walking should definitely work.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2025 06:33 AM
I see what I was confusing with now, there is no risk assessment instance linked on the risk response form but just the risk is linked not the assessment, and the assessment is link to the risk separately. That is why it does not work