Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Account acc = new Account(Name='Test Name');
- if (acc.Do_Not_Contact__pc == false) {
- System.debug('DNC is false');
- } else {
- System.debug('DNC is true');
- }
- insert acc;
- acc.Do_Not_Contact__pc = true;
- update acc;
- System.DmlException: Update failed. First exception on row 0 with id 001W000000fFiVbIAK; first error: INVALID_FIELD_FOR_INSERT_UPDATE, Account: bad field names on insert/update call: Do_Not_Contact__pc: [Do_Not_Contact__pc]
- acc.Do_Not_Contact__pc = 'true';
- acc.Do_Not_Contact__pc = true;
- acc.Do_Not_Contact__c = true;
Add Comment
Please, Sign In to add comment