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] Attempt to de-reference null object if beginning Account Type is null #73

Closed sungysang closed 4 years ago

sungysang commented 4 years ago

Steps to reproduce:

  1. Go to Account with blank Type field.
  2. Press button.

Attempt to de-reference null object will be thrown.

Fix: Perform a check on the Type field before validating its value and throw a more helpful error message if it is null

Recommend checking various Type values as well as blank while testing.

sungysang commented 4 years ago

@Rodney-Zhu can you please test this?

rodney-zhu commented 4 years ago

@sungysang Test Passes for any Account that is not School. Error message is, "Invalid Account Type. Type needs to be school."

https://docs.google.com/document/d/1RxL7qWxqFB1iLfCXqiY_0Peu9NUZ7-ufXXkPaT3IEgo/edit?usp=sharing

Julian88Tex commented 4 years ago

Great job on dev @sungysang and great job on testing @Rodney-Zhu !

Closing this out since it is complete.