Skip to main content

I am trying to get my Skuid  new contact page to act more like the default salesforce page. In my Skuid page, I need to billing address to be copied to the contact when I select the account I want this contact to be related to. 
b9327e0153dd7902764dd2c56c873c31ae4bb4ea.png

Thanks for your help.
Andy

This forum post shows how to prepopulate Account ID in the new contact record.  

Moving Address information is a very simple extension of what is described in that post. 


Rob,
I saw this one. This talks about creating a contact from the account page. I am creating a new contact from the ‘Create New…’ drop down on the left and I do not have the accid in the URL to use. I need to dynamically get the address when the related account is selected.

Does this make sense?

Thx
Andy


Yup. There is a new action type in the model you can use.


In my pic, I’m using the RECON__Client__c field to look to see when it’s been updated. Set this up on your NewContact model.


Create another model called CurrentAccount with one Condition of Id= Specified value, default off. In actions above, you’d then set the ID based on the AccountId of the NewContact model. Query the CurrentAccount model.


Then you’d have everything setup to update field values of the NewContact Model with values from the CurrentAccount model. You’ll need to use mustache to access it. ie. {{$Model.CurrentAccount.data.0.MailingStreet}}


Lemeno if I lost you and I’ll throw a video together later.


Pat,

Thanks for the help, but I am not following completely.

I have the 2 models Contact and Current Account and tried to follow along.

On Contact:




And for CurrentAccount I have:


am I on the right track?


A video would be great. If you can not do this, not a problem as I will continue to try this and reach out to support if I get stuck.


Thanks

Andy


The first one of your actions needs to be “Activate and Set Value of Model Condition”  (Which requires you to have set up a filterable condition on the Current Account model.   The value passed should be {{AccountId}}  from the Contact model. 

Then with the condition set, the CurrentAccount model gets requeried, so it has the right data,  and you can move over data into the Contact model. 

You are so close… 


Rob,
Still not getting it… Do you have few minutes to bring me the rest of the way home?
Andy


Rob,

Getting closer. My problem now is what is the syntax to pass the street from the Current Account Model to the Contact model?? I can pass a static value using ‘the update a filed on row(s)’ action, so I know ‘the activate and set value of Model Condition’ works.


So Close I can taste it.


{{$Model.CurrentAccount.BillingStreet}} or {{$Model.CurrentAccount.data.0.BillingStreet}} ???


Here is the model












{{$Model.CurrentAccount.data.0.BillingStreet}}  should work so long as BillingStreet is the Account model and it has a value.


Got it. After I activate the condition, I needed to query the model to get the data to pass.

Thx Pat and Rob!