Create Dynamic Table Using Lookup Associated to Field Editor Component

I don’t know if it’s possible to do this in Skuid, but thought I would ask the experts.  

Use Case:
I have a field editor component that allows users to capture specific information related to exiting a client relationship.  Part of that process requires the users to include a list of all account numbers and corresponding balances that are associated to the relationship.  I think the best way to do this is to have a Table included as part of this process so the user can perform a lookup against existing data and select the accounts to be included in that table.  Those accounts will then display along with the other information captured in the field editor.  Is there any way to accomplish this so the users don’t have to go find and then manually type this information into a text field?  The table would need to be dynamic as there is no set number of accounts that might be part of the client relationship.

Thanks in advance for any advice you might be able to provide!

Paul,

Are you working with Skuid on Salesforce?  If so, it sounds like you need a junction object between the object that holds your client relationship data and your account numbers.  You would set the model for your table to have a condition for the client relationship data master detail lookup to be the current record.  The account number master detail lookup would allow your users to search for an account number to ‘link’ to the current client relationship.  You would add rows to add more account numbers.

Let me know if that makes sense.

Thanks,

Bill

Hey Bill.  Thanks for picking up the challenge!  The Client (Salesforce Account) record that is at the heart of this has an existing relationship to the Account Details object where records for each account number associated to the client resides.  That being said, do you think a junction object is still necessary?

Paul,

I don’t think you need a junction object.  I think I need to better understand what your data model is.

Please let me know if this is right:

  • You have Accounts and Account Details.  You can have many Account Details related to one Account.
  • The Account Details are where you store an account number and a balance.
  • Now you want to enter a ‘transaction’ record.  Let’s call it an Invoice.
  • You lookup the Account on the Invoice and now you want to include a copy of all Account Detail records that are ‘linked’ to that Account as part of the Invoice.
Thanks,

Bill

Close.  Here’s the path.  The standard Salesforce Account record holds the core of the client information.  When a client is ending their relationship with us, there is an exit process the sales associate must go through.  As part of gathering the information related to the exit, they complete a “questionnaire” of sorts.  This is stored in a separate object.  As part of that questionnaire, they must include a list of the client’s account numbers and any balances associated to those accounts.  That information resides in a separate object and there can be multiple account numbers per client.  I want the users to be able to perform a lookup to the account details object so they can “build” a dynamic table that is part of the questionnaire where that table includes the account numbers and their associated balances.  And I want to do this all on a single form/popup.  Am I reaching too high on this one?

Help us understand further:

You want the user to be able to select an Account (client) and see a table of all the Account Details for that Account (client)?
And then you want the user to be able to select which of the available Account Details get included in your “Questionnaire”?

Is the “Questionnaire” object related to the either of the other objects?

Thanks for responding Matt.  I know this is a crazy use case.  I want the user to be able to add rows to a table in the Exit Interview form (Questionnaire) by performing a lookup against the Account Details object.  For instance, if account number 123456 was part of the exiting relationship, the user would perform a lookup on account number 123456 and from the results, be able to add that account number to the table in the Exit Interview form.  With the selection of that account from the search results, it would add a row to the table that includes the account number and (if one exists) the outstanding balance on the account.  The user would continue this process until all of the accounts associated with the Exit are listed in this table.

The table is tied via lookup to the Account object.

Paul,

You can definitely do what you want to do.  Based on what you have said, I think you can just add an Account Lookup field from the Questionnaire to the Account (I think you probably already have this).  Then I would just load a table with the Account Detail records that are ‘child records’ to the same Account.  Just add other fields that you want the user to complete.

To load the table, add a model action to your Questionnaire model.  Have it trigger when the Account Lookup field is changed.  The next action is to Activate and Set the Condition on your model for the Account Detail table.  Set the ‘account lookup’ from this object with the Id from the Account Lookup field on the Questionnaire, then query the Account Detail model.  Make sure your Save button saves both the Questionnaire and Account Detail models.

Thanks,

Bill

Thanks for the suggestion Bill!  I’ll give that a shot and see if I can make that work.