Error when updating custom fileds of an Account in a Script

Error when updating custom fileds of an Account in a Script

Hi Zoho community,

I have an issue in a script. This script is ran  when clicking on a button in the Account module ( display page).

I have the following code, to update 2 custom fields :

  1. newVals={ "Code" : "C0001", "Record_ID" : "123456"};
  2. r = zoho.crm.updateRecord(("Accounts"), "1678097000005771093", newVals);
But when I run the script, I have the following error :


 
.{"message":"You do not have the permission to edit this record or the \"id\" value you have given is invalid.","code":"401.2"}

  


I am sure the id value of the account is correct and I can edit this 2 fileds with my profile. What's wrong ? I have to pass the api token or something else ?