Using a wizard, can I automatically populate a field in 'Step 3' using an input entered into a different field in 'Step 1'?

  • 1
  • Question
  • Updated 5 years ago
I have a lookup field (Project__c) on an Account which links to another Account. Once this lookup is entered into Step 1 of a wizard I'd like this to automatically populate an Opportunity field (Project__c) with the same value (and which links to the same record) - can Skuid accomplish this?

I'm currently doing it in a visualforce page using javascript on a button click. It's pretty ghastly.
Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Louis,  This is definitely doable.  Here are a couple of ideas.

You could do a one page "New account and opportunity" creation page where the selected account was passed into the new opportunity items so that when saved the connection was created. 

You could do a wizard, where account information was collected on one page and opportunity was collected on the second page.  Getting the account name to show in the opportunity wizard step (which happens before the whole wizard item has been saved) might be a bit tricky - but I'm sure we could do somthing.  

Or you could create two completely different pages.  One for capturing the new account,  and a second - that carried AccountId as a parameter in order to prepopulate data - for creating the new opportunity.  The redirect connection with AccountId in the parameter would be used to pass the correct Account ID to the Opportunity page. 

Let us know if you need more detail or help with these. 
Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb
That's great thanks! I think I'll probably go for the first option - I'll let you know if I have any troubles. Thanks!
Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb
Hello again,

I've nearly sorted this. I've got a Skuid page which creates an account/opportunity/contacts and links to a parent account (using a lookup - not actual parent account field).

I have 2 issues:

1)

I want to launch the Skuid page from the parent account Skuid page using a button which then passes the parent account ID into the wizard (which is now just one page). Is this possible? My wizard page has a model for the parent account and a condition linking it to a url parameter - I just don't know if it's possible to pass the parent account url through to the wizard page from a button on the parent account.

2) I have a condition in the wizard that sets the record type of the opportunity to a particular value (which works great on saving the record) but this condition does not limit the opportunity stage picklist to values associated with that record type prior to saving. This is not a big issue as can always be edited after the save - just wanted to see if this was possible.




Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb
Actually - I think I've solved issue 1:

I created a redirect button which linked to the new page and, like magic, it seems to pass the url into the new page:

/apex/skuid__UI?page=[customwizardpage]

Still happy for any thoughts on the second issue.

Cheers!



Photo of Louis Skelton

Louis Skelton

  • 4,878 Points 4k badge 2x thumb
Oops - actually, I think the passing of the URL was just a fluke when tested. This fixes it:

/apex/skuid__UI?page=[customwizardpage]&Id={{Id}}