We have a LWC,
mycomponent that will fetch custom metadata records, myCustomMetadataList and store them into a List variable within
mycomponent. When a user clicks on the Save button on this component, the component will update a Contact record with the data from the input fields on the LWC. There is an after update trigger that calls
MyTriggerHandler.myMethod(newContactList, oldContactList). Within the
myMethod(), the same custom metadata record list,
myCustomMetadataList is needed to do additional processing. The way the process works
- Can we pass
myCustomMetadataListthat was fetched from the LWC into the trigger such that
myMethod()can access the same
myCustomMetadataListvariable from the LWC without making a custom metdata query again?
- How can we read the
myCustomMetadataListvariable in the
myMethodif I wanted to get the
myCustomMetadatavalues, would I have to query again?