Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Business Rule to update Work Notes from a scoped application

Wayne Richmond
Tera Guru

Hi team. I have created a record producer in a scoped application that updates a custom field called additional_details. I have been asked to copy everything from the additional_details into Work Notes when the record is created. I figured I would just create a Business Rule that ran on insert to copy additional_details to work_notes. However, when this didn't work, I found an article or doc explaining you can't acheive this across scopes. 

How else can I copy additional_details to work_notes?

I've tried creating a Cross scope privilege record from my scope to global (table \ task \ write \ approved), but that didn't work

I tried direct from the script field where I set the additional_details field

I can get it to work via an onChange Client Script, however, it doesn't work when the record is created

Thanks

1 ACCEPTED SOLUTION

Wayne Richmond
Tera Guru

I got this working in the end via a Business Rule, I just had to change the "script":

(function executeRule(current, previous /*null when async*/) {

	current.work_notes.setDisplayValue(current.additional_details);

})(current, previous);

 

View solution in original post

6 REPLIES 6

SumanthDosapati
Mega Sage

Hi,

Can you share what script did you try with BR.

Sure, although I'd hardly call it a script!

(function executeRule(current, previous /*null when async*/) {

	current.work_notes = current.additional_details;

})(current, previous);

When: before (have also tried after)

Insert: true (also tried Update)

If you try and use filter conditions, work_notes isn't available 

 

This link might help you. It has different requirement but that should probably solve the issue.

 

Regards,
Sumanth

Wayne Richmond
Tera Guru

I got this working in the end via a Business Rule, I just had to change the "script":

(function executeRule(current, previous /*null when async*/) {

	current.work_notes.setDisplayValue(current.additional_details);

})(current, previous);