create a parent record from a page

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Greetings, I am new to Skuid and am quite impressed by its functionality.

I am looking to build a replacement to the quickcreate button and am looking into skuid to enable our org to create contact records when needed. I've designed a page with an Account reference field. What I am looking to do with this field is to be able to create a record (this being the parent record) in the event that a search result turns nothing. This would be specific to non-person account. Would I have to create another page or what steps could I take to achieve.

Thanks again and hope it helps.
Photo of Medhanie Habte

Medhanie Habte

  • 90 Points 75 badge 2x thumb
  • amped!

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You could do all of this within one page.  You could have the contact form available by default.  The account ID box would allow selection.  Add a button to "create new account"  which would either expose a popup,  or create a new row in the New Account model and thereby expose a field editor for documenting the new account. 

You will need to conditionally render two buttons on your page.  
- If you have a new account - you will need to save the account - pass its ID to the contact model and then save it. 
- If you don't have a new account the button will need to bypass the account save. 

Cheers! 
Photo of Medhanie Habte

Medhanie Habte

  • 90 Points 75 badge 2x thumb
This may work, however what I am more interested in is the ability to create new accounts within the accountid reference results popup. As seen below. So in the event that no matching data is found, I could click on a create new account record within the Select Accounts popup (to which I can set up a page with fields and components to create such records that then render in the organization name)




My biggest goal with Skuid is to replicated and expand the QuickCreate  feature for creating contacts and accounts. Specifically, we're looking to integrate this function as part of a batch product inventory processing app that enables users to input items in batches. QuickCreate has been known to be a poor quality functionality, that skips validation rules and creates major gaps in data. However, if maximized, we find this functionality to be quite beneficial in enabling us to locate records and create new ones in batches as part of our platform.

I'd love to be able to use this in lieu of the standard Salesforce lookup for the vf pages we're using for our inventory processing app, we can search or create and once done, the lookup then reflects the contact record on hand.

I'll be happy to set up some time to discuss and would like to learn any best practices as well.

Hope it helps.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yup. A "new record button" has been often requested as a really cool addition to our reference field search lookup table.  Unfortunately it is not in place today. 

You should look at this solution Jack Sanford came up with that replicates this functionality.  https://community.skuidify.com/skuid/topics/how-to-allow-search-for-existing-accounts-before-adding-...

Essentially you replicate the whole popup table as an action.  Row actions on the table move the selected row into the underlying reference field (and close the table).  Another button on the table is used to define new records.   Setup is a little challenge,  but certainly feasible. 
Photo of Medhanie Habte

Medhanie Habte

  • 90 Points 75 badge 2x thumb
This idea might suffice, thanks again. I'll definitely check it out. Hopefully someday the feature will be available.