I have a table. I want to open the record detail from a row action. I have the record detail set up in a separate page, so I am using a page include. I have tried a page include to the record detail page in a drawer and a popup. The problem is that the url parameters that I pass into my page include don’t have a row context. It is always displaying row 0 in the page include regardless of which row in the table I click. Is there a way to pass in row context into the url parameters of a page include?
Page 1 / 1
There probably is another way, but if you had to you could do it with javascript. See Moshe’s comment here: https://community.skuid.com/t/update-page-include-from-table-row-action
Thanks Matt!
This can be done with javascript
<br />//you can access any data from your row you need using params.row.fieldName<br />var oppId = params.row.Id;<br />panelsOnPage = skuid.component.getByType('includepanel');<br />//goes through all includepanels and returns the one in your context <br />//(additional filtering needs to be done if you have <br />//multiple pageincludes per context)<br />panelInContext = panelsOnPage.filter(<br /> <br /> function(panel) {<br /> <br /> return panel.context.row.Id == oppId;<br /> })[0];<br /><br />//set the query string and load the file<br />//like Moshe's code in Matt's comment<br />panelInContext.querystring='oppId='+oppId;<br />panelInContext.load();<br />panelInContext.querystring='oppId='+oppId;<br />panelInContext.load();
But I couldn’t use this since I couldn’t get models with conflicting names to save. Once you add an additional pageInclude onto the parent page, all models from previous pageIncludes with the same page source are dropped. See the idea to vote on it here.
https://community.skuid.com/t/include-a-page-multiple-times-on-a-page-dynamic-model-names
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.