Wizard Component - Button Action - Redirect to URL - not passing URL field (blank)

  • 1
  • Question
  • Updated 5 years ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Outdated/not worth keeping.

I need to pass the URL from the WebPT Records field (see below) - to the WebPT wizard button - so that I can point the Redirect to URL action appropriately. Every time I try it, it directs me to a blank page.

Photo of Griffin Brown

Griffin Brown

  • 2,818 Points 2k badge 2x thumb
  • fine

Posted 5 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 53,128 Points 50k badge 2x thumb
Hi Griffin, 

I would have assumed that putting {{{Web_PT_Records__c}}} as your "URL" would have worked, but I tried it out, and I realized that we're not passing in the context of the Event popup into these merges, so currently Skuid doesn't know which Event record to grab that URL field off of.

I went ahead and fixed this in Skuid core, so that the next release should work as you'd expect, but in the meantime, here's how to do it with a JavaScript Snippet:

1. Change your WebPT button to have Action Type "Custom".
2. For Snippet Name, put goToWebPTRecords
3. Go into the "Resources" tab in your Skuid Page, and add a new JavaScript Resource.
4. Set the Resource Location to Inline (Snippet).
5. Set the Resource's Name to goToWebPTRecords
6. Set the Resource's Body to the following, replacing the Url Field Name with whatever your Web PT Records field name is actually:

var URL_FIELD_NAME = 'Web_Records_PT__c';
var params = arguments[0],
   context = params.wizard.context;
   url: '{{{'+URL_FIELD_NAME+'}}}',
   row: context.row,
   model: context.model,
   window: 'blank'

This conversation is no longer open for comments or replies.