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
TehNrdTehNrd 

CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, A workflow or field update caused an error?

I am recieving this error when inserting a record with an Apex webservice that is invoked from a button on a page layout. I haven't been able to dig too deep into this issue but because this error is so generic I am not really sure where to start looking.

 

Has anyone encountered this error message before and if so what did you find to be the issue?

 

Thanks.

Message Edited by TehNrd on 03-16-2009 01:31 PM
Best Answer chosen by Admin (Salesforce Developers) 
jpwagnerjpwagner
I cannot reproduce as you describe it.  I'd advise checking your apex code.

All Answers

jpwagnerjpwagner

This message does catch quite a few errors, but a generic example is:

... 

for(Account a : Trigger.new){

  someList.add(a);

}

update(someList);

...

 

ignoring other potential issues, this would give that error.  workflows alone cannot cause this...

TehNrdTehNrd

Correct. This is being invoke with a DML statement.

 

It appears there is an issue that when inserting a Parent record that -> has workflow rules that -> have associated field updates that -> use a formula to perform the field update where -> the formula uses a roll up summary field.

Message Edited by TehNrd on 03-17-2009 03:56 PM
jpwagnerjpwagner
I cannot reproduce as you describe it.  I'd advise checking your apex code.
This was selected as the best answer
TehNrdTehNrd
It is not easy to reproduce as I myself have not created a simple use case to reproduce but deactivating these types of rules stopped this error.