lovinghouston / lwcgoogleplacesbutton

Adds a Lightning Web Component to create Google Place Listings (currently hardcoded to type "church") as a Salesforce object (currently hardcoded to a custom object named Church_School_Partnership__c).
3 stars 1 forks source link

[Bug] Surface all errors to Button Message Error on LWC #88

Closed Julian88Tex closed 4 years ago

Julian88Tex commented 4 years ago

Recently, LH reached out and let us know that there are some instances where clicking the button produced no results and error messages. It's been identified that this is caused by a standard Salesforce error being thrown (process builder process, field filter, validation rule, etc.) but is only viewable in logs and not button. As an admin, it is important to know when an error occurs so they can take steps to prevent it or work around it.

Steps to Reproduce:

  1. Log into Partial Sandbox
  2. Open Debug Console in a separate tab
  3. In first tab, navigate to Account "Black El" : https://lovinghouston--partial.lightning.force.com/lightning/r/Account/0011N00001qzT38QAE/view
  4. Click "Find Closest Churches" button

Results:

Expected Results:

ACs Given a process exists that would cause an error when creating Account/CSP records (example "CSP Update") When I click the "Find Closest Churches" button Then appropriate Salesforce error message displays next to button

Given a validation rule exists that would cause an error when creating Account/CSP records When I click the "Find Closest Churches" button Then appropriate Salesforce error message displays next to button

Given a lookup field filter exists that would cause an error when creating Account/CSP records When I click the "Find Closest Churches" button Then appropriate Salesforce error message displays next to button

Given a required field setting exists that would cause an error when creating Account/CSP records When I click the "Find Closest Churches" button Then appropriate Salesforce error message displays next to button

Julian88Tex commented 4 years ago

@sungysang great job! It works <3