You need to sign in to do that
Don't have an account?
SquirrelMaster
Button to verify fields populated help
I'm new to coding in Apex and wanted to see if A) This is even possible and B) if someone could point me in the right direction.
I'm trying to create a custom button located on the account.
What I want it to do is verify that the billing street, city, state, and zip are populated and if so, then I want it to set another field entitled Accounting Type to Vendor. If any aren't populated, I want an error to state it needs to be populated before it will switch to vendor.
Something like this would allow you to create a custom button. The button's type would be "Execute JavaScript". This uses the API to perform the update. To enforce the validation at the database level (for those using import files, etc), you still need a validation rule; this will only stop users from using the UI button.