I’ve inherited a page with a lot going on, which is part of the complication of understanding.
I have a table with a row action that opens a drawer. Let’s say this table is related to model A.
Once the drawer opens, the drawer has (in this order):
-1. a button set component for Model A
-2. a table component for Model B
-3. a field editor component for Model C
-4. a responsive grid containing another field editor for Model C. In this field editor is the text field that I would like to access and validate.
I have added a new button set component in the responsive grid from 4. I set the Model to Model C (the model that has the field in it). I added ‘Id of record = Id of row in context’ to the context tab (blindly, since I’ve read that is required sometimes).
Currently, I am just trying to access the data in the desired text field since that is the first step to validating a character limit. I have been console logging the ‘params’ object when the button is clicked (via action framework).
I’ve worked my way through the object to params.context.component.context, not that I really understand the hierarchy, the data just looks right in the console. This seems to be about as far down as I can go, but the context row at this point seems to be Model A instead of Model C.
My question is, should it be Model C? and if so, where did it go wrong? If it should be Model A, as it is, what’s the best way to get to the related Model C data? I have Model C’s record id in Model A, but my understanding is that I need the row in Model C, not just the data.