How can we Auto populate Parent Data into a Child object by using Click to add Row "+" sign present in Skuid table?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Say for Example

I have a Contact Table --- I hit the '+' sign present on the table, a new row comes up ---- Now, I fill up the Lookup Field (In this Case Account) -- I want to map back some of the Account objects field the moment Lookup field is filled in. Currently I have added an action on Contact table in which whenever Lookup field is changed the value gets updated.

I am using (Account.Name in Contact Name say for Example) So my Syntax is -- Object__r.Name. This works with name but my problem is, I am not able to Map other values like Object__r.City , Object__r.Industry etc. It only map back Name to my contact field.

Can anybody help me with a way please. I dont want a button, I waana do it on the given "+" sign.

Thanks
Photo of Vaibhav

Vaibhav

  • 308 Points 250 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
You could add a model action on your table's object to save and re-query the table's model when the lookup field is updated.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,674 Points 20k badge 2x thumb
The issue you are running into is that Salesforce will only provide the Name field for any new Lookup/Master-Detail value. All the other related fields you would like to show, like Object__r.Industry, will only be available once the record is saved.

There isn't any need to requery to get this information in your table. Saving will make this information show in the table.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pats right.  Save the model and the related data will be brought back into the table. 
Photo of Vaibhav

Vaibhav

  • 308 Points 250 badge 2x thumb
Well, It worked. 

Thank you so much Rob Hatch,  Pat Vachon and Matt Sones for your valuable solutions and such a quick response to my problem.

Thanks
Vaibhav