How can I automatically load record that is being edited in squid model

  • 1
  • Question
  • Updated 2 months ago
  • Answered
When user clicks on Edit action from salesforce view, I am redirecting them to a squid page. How do I automatically populate the fields in skuid model, for the record that is being edited?
Photo of Fireveo

Fireveo

  • 240 Points 100 badge 2x thumb

Posted 2 months ago

  • 1
Photo of Toms Vineeth John

Toms Vineeth John

  • 428 Points 250 badge 2x thumb
You should use param id under the condition. So, select opportunity id under the condition and then select param id (see the first image). Also, ensure that your edit button pass the opportunity id to the Skuid model (see the second image)

(Edited)
Photo of Fireveo

Fireveo

  • 240 Points 100 badge 2x thumb
I am using a custom object so don't have an opportunity id under the condition. 
Photo of Fireveo

Fireveo

  • 240 Points 100 badge 2x thumb
Edit Action is redirecting from a visual force page so how do you pass the id in the query string?
Photo of Gregg Baxter

Gregg Baxter, Official Rep

  • 3,080 Points 3k badge 2x thumb
Hi Fireveo

1. Your Skuid page you want to redirect to should have a model that has a record ID selected along with maybe customer name, tel, etc. in its fields selection.
2. You need to set a condition on that model where you set the Field to Id, operator to '=', Content set to 'Page/URL parameter value. It will set this value to 'id' and set the condition as always on. A test to see if you have it correct if you preview this page it should ask you to select a record.
3. Save your page and make a note of your page name i.e. record_detail_view
4. From your button on your calling page insert this in the url and make sure you are exposing the record Id thus page and in context: /apex/skuid__ui?page=record_detail_view&id={{Id}}

Happy Skuiding.