To fix “portal account owner must have a role” Error in Salesforce Community Unit Test
In Salesforce, if you’re trying to run Unit Test with a Non-Role user, which includes part of creating Portal / Community User test data, the following error will be occured, that is because the portal account’s owner does not have a role to be assigned. System.DmlException: Insert failed. First exception on row 0; first error: […]read more
To fix MIXED_DML_OPERATION error(setup and non-setup objects) in Salesforce
The following error will be occured if you’re trying to perform DML operation on both setup and non-setup objects in the same transation.` MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): CustomObject__c, original object: User:  ` Here is the sample code that can […]read more
You must be logged in to post a comment.