You need to sign in to do that
Don't have an account?
How to create a LWC to edit 5 fields with one button?
Hello folks,
I am new to Salesforce development. I have not created a LWC before. I am tasked with creating a LWC that will update 5 fields at one time on the Account object if the record meets a certain criteria (or else it's disabled). The values are preset, so they can be hardcoded. Can you please give me pointers on how to go about doing this? An outline would suffice, I have just created a shell of a LWC that has the button and the labels. I want to know where does the conditional logic go to make this LWC appear/disappear and other things I have to keep in mind.
Thank you.
Try The Below Code Please Mark It As Best Answer If It Helps
Thank You!
All Answers
Try The Below Code Please Mark It As Best Answer If It Helps
Thank You!
Charu Dutt,
Thanks a ton for the code! This was really helpful. I don't really need to display the fields on the component. I just need to show the button which will update fields in the background. Do I need to even mention them in HTML in that case?
I Think Yes It Is nesessary To Mention Them In The Component
Please Mark It As Best Answer If it Helps So It Can Help Others In Future.And It Motivates us To Give More In Community
Thank You!