Account Validation Rule creation for Breadwinner
6 min
background this article is related to the "use of flows and validation rules " article you may wonder why invoices are missing from breadwinner, or why your salesforce account lists invoices below it, even though the 7 breadwinner 'total' fields on the account are blank this may be because you have enabled salesforce account validation or marked a salesforce account field as "required" salesforce validation rules, or required field rules, are preventing breadwinner from syncing and causing data degradation this means some invoices will not appear in salesforce, or aggregate 'total' fields will be inaccurate validation rules / required fields you might have a validation rule that prevents staff from creating a salesforce account without specifying the country, or the phone number, or populating custom fields or a field marked 'required' this is one way to ensure data integrity but these rules also prevent breadwinner from creating salesforce accounts imagine someone creates a new invoice for a new contact in xero when breadwinner sees this new xero contact for the first time, it creates a salesforce account from that xero contact first, it checks for a salesforce account with the same spelling; if none is found, it creates a salesforce account and issues the invoices under that account if you have rules in place, breadwinner will try to create the account, but will fail and as a result, the invoice won't be brought in, and your totals in salesforce will be inaccurate solution the solution to this is one of the following disable the field required rule (or the validation rule ) and replace it with page layout required fields this only works for validation when it prevents a field from being blank page layout required fields do not apply to records created by breadwinner add a second level of validation that specifies and description does not contain "created by breadwinner "this will allow breadwinner to create the account because the validation is only enforced on records that aren't created by breadwinner (we add text to the description of every salesforce account we create) please note that this will not help for salesforce accounts you created before installing breadwinner abandon validation entirely it's a wonderful idea, but sometimes staff will just enter any old value into a field to save the record we worked with a client who had the phone number field required staff just put in their employer's phone number effectively rendering the validation worse than useless, as it created incorrect data rather than blank data to view what validations exist on your salesforce accounts in classic, go to setup > customize > accounts > validation rules in lightning, go to setup > platform tools > object and fields > object manager > account > validation rules seeing the required fields takes a bit more work, since salesforce doesn't list them but you can go to accounts > fields, click an individual field, and see if it's required breadwinner status log if you go to the breadwinner tab and click on the sub tab status log (also referred to sometimes as the error log), you will see any errors that occurred in the last 30 days this log will show you which field(s) in question and causing the issue the video below provides an overview of the status log (the video shows xero, but this is the same if you have breadwinner for quickbooks online)

