Model Condition Question

  • 1
  • Question
  • Updated 3 years ago
  • Answered
New to Skuid: How to create Model Condition when user opens a Salesforce calender meeting, then Step 1 of Skuid project is that same event record? Custom button will trigger Skuid project.
Photo of TJBuice

TJBuice

  • 414 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
Huh? Not sure what you're asking.

If you're only asking how to set the condition value for a model, you could use the option of "Run Snippet then show popup" in the Source Properties. The snippet can run the javascript code to set the condition.

Not sure why how you'd set the model condition any differently then you could setting it by default in the model.
Photo of TJBuice

TJBuice

  • 414 Points 250 badge 2x thumb
Thanks Pat--more details (browser version):
User opens Salesforce event record from the Salesforce home page calendar. Custom button on Event record opens Skuid wizard. Step 1 of Skuid should display this same Salesforce event record. This is the condition I am confused on--how to relate the Activity Id from the Salesforce event record to the first page of Skuid. Hope that makes more sense.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
I see.

How is the button setup? Is it a URL or OnClick javascript button? Hopefully a URL. If so, then edit the URL to include a URL parameter that can be used in the Activity model in your wizard page.
Photo of TJBuice

TJBuice

  • 414 Points 250 badge 2x thumb
Just noticed this post was still open. As Pat mentions, the Event ID was added to button URL to ensure that same event record is passed to the Skuid page.
From the custom URL button on Event:
/apex/skuid__ui?page=Skuid_page_name_here&Id={!Event.Id}
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,426 Points 10k badge 2x thumb
TJ,

Check your Skuid page to see what parameter 'name' it expects.  Normally, when you create a parameter condition it expects 'id'...that is a lowercase 'id'.

In your URL above you are passing a title case 'Id' which WILL NOT match what the Skuid page is expecting.

Thanks,

Bill