Salesforce Exam Questions

How should the Digital Developer resolve this issue so that the error message is displayed on the ad

The following code ensures that an address ID CANNOT be used if it is already in use by another address in the customer’s address book. There is a problem with the code. The error message for an invalid address ID is never shown to the user on the form field.

How should the Digital Developer resolve this issue so that the error message is displayed on the address ID form field?

A. addressForm.invalidateFormElement(“addressid”);
B. addressForm.addresssid.invalidateFormElement = true;

C. addressForm.invalidateFormElement(addressForm.addressid);

D. addressForm.addresssid.invalidateFormElement();