3

I have a test class, when i am excuting, getting the below error.

System.DmlException: Update failed. First exception on row 0 with id a07J0000006hjjbIAA; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Only Finance, or SalesOps can affect a change of status of an asset .: [Active__c]

I don't know how to fix this.

  • Please try to select tags specifically related to the question, this helps to attract people with the right knowledge. – Samuel De Rycke Jan 29 '14 at 14:27
5

This is a custom validation rule or trigger logic. You will need to adjust the rule or trigger appropriately to allow your validation to pass, or you will need to use System.runAs to run code as a Finance for SalesOps user; you will need to examine your system's configuration to determine which user to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.