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
Vinod KumarVinod Kumar 

A workflow or approval field update caused an error when saving this record.

Hi all,

I am trying to update all records through scheduling job daily. Records are not updating and throwing this error mesaage "A workflow or approval field update caused an error when saving this record. Contact your administrator to resolve it". Why i am getting this error message? how to resolve this error?





Suresh RaghuramSuresh Raghuram

check with workflows that are firing on field updates , Is there any field related to your task and the workflow .


If this answers your question , make is as solution

Vinod KumarVinod Kumar

hi suree,

         I have one object with the name application. I am trying to update all the records of that object at that time it is throwing error message "A workflow or approval field update caused an error when saving this record. Contact your administrator to resolve it. Division undefined: []" . Why i am getting this error? Application object having some workflow rules with the field update action. I am trying to upadte xyz field with abc field. abc is a formul field it is returning value null. i am updating xyz field with null, i think that reason only i am getting this error. Is this correct or not, if it is correct how to resolve this issue. Please let me know.


Suresh RaghuramSuresh Raghuram

being it is a formula field i think u can not update it, And also check with profiles do you have access to all the fields you are using

Vigneshwaran LoganathanVigneshwaran Loganathan
Hi Vinod Kumar,

It may seems crazy but.. I have the same situaion now where you were.. Could you tell the solution if u remember.

Santosh Kumar Sriram_2310Santosh Kumar Sriram_2310

I just ran into this issue and figured the solution for the same. 
So if you are using a formula field on the approval process's entry criteria and if the formula throws "#Error"  or NULL, then there are chances that you will hit upon the "Divisions Undefined Error".
So the solution is to either treat a value as blank as per this knowledge article -
or associate a error value which we can bucket and ignore.

Hope this helps!
salesforce snehalksalesforce snehalk
@Santosh Kumar Sriram_2310, thanks for providing this solution. It worked for me. I checked all Formula fields assoiated with the Object I am using in Test class. I changed default values of formula fields to "Treat blank fields as blanks" if previously they are set to "Treat blank fields as zeroes".
It was really troublesome issue and from the error its very difficult to figure out the root cause. So, again thank you so much for helping me out with it.
Tushar Padole 3Tushar Padole 3
To solve this issue  follow below step
1) you need check which is field update or insert in Record. With help of System.debug  statement  you can find also of some extra field just like formula field
Example: List<Account> acclist=[Select Id From Account limit 1];
2)after check  those field where is this field used 
    setup->Object manger -> Account(object) -> open field information -> after open then click button 'Where is this used' -> check which formula field used that field and check those field  datatype is  formula. if datatype is fomulat then   if division operation is perform  then that In formula that used variable  value come or not 
Example: a = null, b = null
            c=a/b -> occur error Division undefined: []