Help with emulating the "New" button on a related list in SF here in Skuid for custom Objects

edited September 1, 2016 in Questions
Hi,

I'm trying to have the edit pages auto populate the lookup fields when I'm creating a child record from it's parent, very much the same way the create new button in the standard SF detail record pages' relate list section would behave. 

I found this post in the questions that alludes to this (link to page: https://community.skuidify.com/skuid/topics/how_do_i_build_a_create_new_record_page), but I struggled to get it to work.

I've tried quite a few url combinations and so far none have worked. The url directs to a wizard page that has 2 models (the parent and child). I tried setting up a number of condition cases between the two, or working with none, but so far no luck. 

Please help :)

Comments

  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    We need to expand on that post with a more detailed explanation. 

    The trick is to create a model with data about the parent object that has a condition  " id=Id from URL parameter"   If you pass the single URL parameter you  will  pull in whatever data you want about the parent object. 

    Then on the object you are creating new,  you build conditions "field from another model"  on this parent model.   This is how you can populate multiple items on the new record you are creating. 

    That's a brief answer on a Friday afternoon.  Let us know if it helps. 
  • edited September 2, 2014
    Thanks Rob.

    So it took me a bit of mental clarity to fully understand your response but I think I am finally on the right track.

    I'm now getting (with no special treatment to the "Redirect URL" box) the lookup field auto-populate.

    The only problem is, it's inserting the parent record's ID and not the record's name value. 


    Aaaaand I just figured out what was wrong. I simply needed to check and include those fields on the models in the object record I was creating. Thought I'd share that for all skuid future users who might struggle with this.

    I do feel this is worth a skuid tutorial
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    Thanks Ahmed.  AAALWAYS make sure your fields are in the model. 

    Sometimes I have actually make conditions on the New Record model on both the parent record Id and the parent record name in order for it to populate. 

    But I'm glad you got it working,  and I congratulate you on the mental clarity to follow my cryptic notes... 


  • edited September 2, 2014
    I suspect I might be getting a bit greedy here but...

    Is it possible to create child object records of the new object record I am creating (as per the above set up) and have the lookup field auto-populate as well within the same page?
  • Rob HatchRob Hatch 💎💎💎
    edited September 1, 2016
    That is absolutely possible. Just make models for the children records and give them a condition "field from another model" to pull in the ID of the parent record into the appropriate place.   Check out this tutorial that walks you through building a page where Parent and Child records are created on one page:  http://help.skuidify.com/m/components/l/109459-create-parent-and-child-objects-on-the-same-page
  • edited March 25, 2016
    HellO! I'm trying my hand at this for the first time. I have a custom object (Campaign URLs) related to campaign. I created a Skuid page to override the "new" button for Campaign URLs. 

    I created a VF page that calls my Skuid page and overrode the standard "new" button on Campaign URL with the VF page. 

    I'd like for the Campaign to be auto-populated when the new Campaign URL page loads. 

    I included the Campaign model in my page and set the Campaign reference field to the Campaign ID field from the other model. 

    But now I don't know how to pass the Campaign ID into the VF page to start.... So for now, my new Campaign URL page is grabbing the first campaign that loads in the model.... 

    Help!
  • Bill McCulloughBill McCullough 💎💎
    edited May 3, 2016
    Chelsea,

    What page are you starting from?  That is, do you have a list view of Campaign URL's (like a tab or table)?  Or do you have a page that shows details about a Campaign along with a table of Campaign URLs?

    Thanks,

    Bill
  • edited March 26, 2016
    Hi Bill. I'm starting from the standard page layout of the campaign and clicking the "new" button from the campaign url related list.
  • Bill McCulloughBill McCullough 💎💎
    edited May 3, 2016
    Chelsea,

    The 'new' button from the related list should be 'sending' the 'id' of the Campaign in the 'link' (URL) to open the new Campaign URL page.

    On your new Campaign URL Skuid page, change the condition on your Campaign URL model that references the Campaign Id from value that references your Campaign model to a 'Page/URL parameter value'.  In the example below I created a New Campaign Member Skuid page to show you what your condition will look like.
    image

    This should get you what you want.

    Thanks,

    Bill
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!