Skip to main content

Hi all,


I have already searched a lot of threads related to this subject (including Zach’s great post here), and so while I know it has already been covered, I am still not quite getting the results I need…although I think I’m very close.


I want to auto-populate a contact lookup field on a wizard page, which is accessed from clicking a button on a custom skuid contact detail page, as per below:



As you can see in the URL, I have passed through the contact ID and contact name, so I think my issue is in configuring the URL parameter conditions needed to auto populate the contact field.


On the wizard page, I have a single Encounter model pulling in the necessary fields from a custom detail object called Encounter_c that uses the Contact object as it’s master.


Here are the conditions that I have set on the wizard page’s Encounter model:



I would be super grateful is someone could take a look and let me know what may look wrong.


Many thanks in advance!


Conlan

HI Conlan,  here’s what jumps out at me:

For the Id condition, you don’t have to use the Contact_r.id field, you should use the Contact__c reference field in the Encounter object itself, because this field also stores the Contact Id.

See if changing that works. As far as the name condition goes, it should be on the Contact__r.Name field and then just make sure that you have that field included in your Encounter model.


Yes, that did it! I knew I was close, but just didn’t know what else to tinker with. Thanks Anna!


This is a slight change of topic, but on the same thread of passing the contact ID via URL.

Within this same Encounter wizard, I have a ‘Back to Client Profile’ button (screenshot above), which I want to be a cancel button that redirects the user back to the contact detail page.

Since I successfully passed the contact ID to the wizard, I thought I would just need to use the following as my redirect url to get back to the contact detail page: 

https://skuid.na15.visual.force.com/apex/skuid__ui?page=Sample_Contact_Detail_Page&id={{Id}}

However, when testing this, the contact detail page loads correctly, but without any record…below is the url that came up when I tested…as you can see the specific contact ID did not pass back

https://skuid.na15.visual.force.com/apex/skuid__ui?page=Sample_Contact_Detail_Page&id=

Any ideas why the specific ID does not pass back?


Yay, glad to hear it!


It looks like your “Back to Client Profile” button is a Wizard step button?  I think it’s attaching itself to the Encounter model instead of the Contact model.  try changing that URL to …&id={{$Param.Id}}  where Idis the name of the parameter that’s passing in the contact’s id.


Ok, great!

I had been playing around with the {{Param.id}} global merge variable previously, but couldn’t get it to work right.

Using your suggestion to add it to the end of the full URL worked great, with just one minor change that I had to make for it to function correctly:

I had to use {{Param.id}} —> not capitalizing i.

Works great now, thanks again Anna!


Hooray! You’re welcome!