Model SOQL Generator for use in other appexchange apps. ie. Conga Composer

  • 3
  • Idea
  • Updated 4 years ago
  • Implemented
There are times where I'll need to recreate the model as a SOQL query in order to present the same data in something like Conga Composer. I know I can make the Query if Skuid can make the Model, but it would be so much faster to just copy and paste the Query.

Right now, I can force Skuid to show it to me by intentionally breaking the model in the XML. Then just need to know what to fix when I copy the SOQL query.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 4 years ago

  • 3
Photo of Moshe Karmel

Moshe Karmel, Champion

  • 8,646 Points 5k badge 2x thumb
Hey pat I know you don't like JavaScript but try this... Go to the live version of your skuid page, and open up the JavaScript console (Ctrl & Shift & J in chrome). Type " skuid.model.getModel('YourModelName').getSOQL()" and hit enter, that will give you the actual SOQL query behind your model.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Whoa .... cool! Thanks!
I don't yet like javascript. I will in the relatively near future. :P

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Be a great debugging tool if it could be added as a drop down list selector to any page to automatically open a popup and display this. Like a button with an hotkey combo that can be pressed so a popup can display a list of the models to choose from to perform "this skuid.model.getModel('YourModelName').getSOQL()"

Going to need to know how to pull the list of the models, display in a list or dropdown picklist (something), then select it in order to run javascript, lastly, display results in a template field.

Any thoughts?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pat,  the Javascript API executed in the console is a very powerful debugging tool.  Examples: 

- Get a list of models:  "skuid.model.map()"
- Each model can be expanded to show all the properties. 
- Shortcut for a specific model "skuid.$M('YourModelName')
- All the data in a model "skuid.$M('YourModelName').data
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
K. Now I'm certainly going to learn javascript. No need to make a custom javascript debug window. Sweet!!!
Photo of bp

bp

  • 220 Points 100 badge 2x thumb
Hi Pat, have you had any luck pushing the Model SOQL Query into Conga Composer?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
No. I haven't pursued this much more. The need to do so hasn't been great. I figure that it wouldn't be too hard, but it's the configuration of the Outbound message fields that would be tricky to manage. It would have to be a blank text field where the instructions to Conga would have to be created using javascript.