You need to sign in to do that
Don't have an account?

How to write unit test for Salesforce organizations with required custom fields
Hi,
In the unit test of my AppExchange application has the following code segment to create an account to test the bahaviour of the application.
Account newAccount = new Account();
newAccount.name = 'OPRO_TEST';
Database.insert(newAccount);
This unit test worked fine with any Salesforce organization which does not have custom fields which have required attribute set to true in the Account salesforce object. This kinds of unit test fails when there are such custom fields in the Salesforce organization.
Do you have a solution for this kind of problem ?
Thanks
Viraj