I have a model querying Contact and a table + drawer that pulls from that model. I would like users to be able to edit fields on a given contact’s account. I’m using the standard AccountId lookup field to add these account fields to the Skuid page, but they can’t be edited (only viewed) when using the page.
Is there a way to make them editable?
In the attached screenshot, the highlighted fields are the Account fields and the single “Default Event List” checkbox is on the Contact (which is editable). The two account checkboxes are accessed as “Account.No_Solicitations__c” and “Account.Postal_Mail_Opt_Out__c” in the model.
Best way I have found is to add a row action that opens the record you want to edit in a pop up or sliding panel. You will need a separate model based on the object in the look up. Your row action will first activate and set the value of a condition on that model limiting it to the appropriate ID. Then requery the model, then open the pop up to display a table or field editor on the model.
I decided to go with your popup approach. The edit button in the “Account Info” section queries the Account model and sets a condition to use just the ID of the current row’s parent account. This actually works perfectly. When I click “Save & Close” the Account model is saved (and the individual account record is updated), but the row I launched it from is not updated.
How can I update that row when the popup is closed to reflect the changes made in the popup?
I’ve tried to query the model powering the table in the “Actions on Close” for the popup, but it doesn’t seem to force a refresh on the page. I also tried to do the same from the actions in the “Save & Close” button.