function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lorant DobrondiLorant Dobrondi 

Dynamically populate some record fields based on another fields while creating a new record

Hello!

I have a custom object, where our Sales Reps log their daily work, client visits, holidays etc. (basically it's a timesheet for their activities)

The custom object has an Account field, where they select the Account that the activity was related to. There's also a Country field. I would like this Country field to be pre-populated with the selected accounts country.
So when they create the record, and set the Account, I want the Country field to update as well, by taking the Country field of the selected Account.

Can this be achieved without a screen refresh? I don't want to have validation rules or workflows here, since I would like this to happen seamlessly.
It's basically an AID for the Sales Reps, it helps them create the new records, HOWEVER the field can be manually changed, if an activity was in a different country.