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
Irvin Gustavo  Madrid GranadosIrvin Gustavo Madrid Granados 

Error updating RunningUserId on dashboard record.

Hi everyone,

I am trying to update the RunningUserId in a dashboard trough apex, but I retrieve an "Field is not writeable" error.
Can somebody tell me how to update an dashboard record with apex.

Dashboard mydashboard = [select Title, RunningUserId,RunningUser.FirstName from dashboard where id = '01ZU0000000QRf0'];
mydashboard.RunningUserId= '005U0000003WmBs';
update mydashboard;
Andy BoettcherAndy Boettcher
You cannot update that field via Apex - you need to do it via the UI.