You need to sign in to do that
Don't have an account?
CK_Young
how can i make the result.isSuccess()==false
how can i make the result.isSuccess() to be false?
i wan to test (result.isSuccess()==false)
forexample
Stirng updateflag = false
Account[] newAcct = new Account(name = 'Acme', billingcity = 'San Francisco');
for(Database.upsertResult result:Account) {
if (result.isSuccess()==false){updateflag ==false};
}
if (result.isSuccess()==false){updateflag ==false};
}
should work.
The only way it will return a false is if your insert/update fails. This could be done by leaving a required field blank or if there is a value that triggers a validation rule. It depends on what you are trying to do and how your system is setup.