Refresh parent page models data from within page include

  • 2
  • Question
  • Updated 3 years ago
  • Answered
I need a way to refresh the parent page model that has the page include when I click a button within the Page Include. Or the opposite, I need to have a button on my parent page that can save Model data on a model within the page include. Can either one of these be accomplished? 

I have a page include within a tab that saves a chunk of data to the same Case record as the parent page but it is too large to be contained in the parent page. When I save the edits in the Page Include I need it to update "Refresh" the models on the parent page.

Has anyone accomplished this, I have not been successful using skuid.model.updateData();?
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb

Posted 4 years ago

  • 2
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
You can do this by referencing the model in the action framework in the page include. Or vice versa.

The trick is that the models listed to choose doesn't include models from other pages. Doesn't mean you can't swap in the model name of your choosing in XML.

So create the action framework as if the model was on the same page. Choose a placeholder model name when adding the action in page builder. Save the page. Open the XML. Replace placeholder model name with the name of the model from the other page.
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
Not with 20500 lines, but I took one of my tabs set and made it an include. It had 7000 line alone so moving the edit and read only tab to includes got my base page down to 7000. Now that I know this trick above I will be moving a lot of popup creation/edit pages to includes instead of inline. Appreciate all your help, do you ever sleep? :)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
hehehehe... my job is pretty much all things Skuid nowadays. Used to be part of my day as I had a full time job, but I choose to do Skuid almost exclusively via freelance work working for myself. :D

You going to the training session in Feb?
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
I am trying to, but I doubt it I am right in the middle of trying to get salesforce live here I doubt management would let me loose.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I'm pretty sure that this is the part of the year Pat just wants to stay indoors as long as possible.  And what better way to pass the great white Canadian winter than do cool Skuid stuff! 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Yup. -11.2 farhenheit with the wind chill!
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
This helped me today! I also noticed that if the model names on the page include and in the parent page had the same name, no need to tweak the XML, although in some cases that might not be a good idea...