Prompt Share - Product Registration Controller #44
craigathon
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Prompt Asked in Einstein Sidebar
Create an apex class named ProductRegistrationController with an @AuraEnabled Apex method called "registerProduct" that collects the following fields as an object class named ProductRegistration:
firstName
lastName
streetAddress
city
state
postalCode
email
phone
serialNumber
modelNumber
purchaseDate
All fields are required. For any fields where validation fails, return an error message listing them out.
After passing validation, map the field to a custom object named Product_Registration__c and insert the record.
The Result
Thoughts
Beta Was this translation helpful? Give feedback.
All reactions