Skip to main content

Hi we have Contact object and Contact_method__c as child to Contact. for each contact we display the Contact method as related list using table. We have used Contact model and ContactMethod as another model. When I use + icon to add new contact method record and click on save, it throws me error saying parent Id and record type is not set. how do I set these data points for a child. a quick help is highly appreciated

Anshul,

Can you give some more details (or screenshots) of your model and page setup? Do you not want to display parent id and record type in the table and fill them out there, or do you want the parent id and record type to match that of the contact displayed on the page? If you are only showing one contact record but multiple contact method records, there’s a way to fill out those fields on the contact method on the backend:

You could use model actions to fill out those fields by adding an action to the contact method model. For the action, when a new row is created on the contact method model, you could update the parent id and record type of that model by looking at the contact model using global merge syntax. For example, for the parent id field it might be something like {{{$Model.ContactModelName.data.0.Id}}}. This pulls the id from the first row of the Contact model, which is why I said this would only work if you’re only looking at one contact record.


Thank you very much@amy Dewaal. I was able to figure that out after some struggle but appreciate your response and setting values as global merge.


@Amy Dewaal A follow up question:  When I use + icon to add new contact method record for a related contact, I need some picklist values to come based on Record type restriction. for my Contact Method Object we have record type, Email, Phone and Address. for a contact Details page, we have 3 related table, each for one record type of Contact method. When i click on this + icon in table to create new records, I want pick list values to respect configuration. since We are setting record type ID on model action, it shows Default record type pick list values.

what I have done as workaround is override metadata on field and set picklist source to manual and added Picklist entries. the problem with this approach is if later we add more values to picklist, we have to come here and change this configuration. if somehow we can respect picklist values based on recordtype that would be great.


Anshul,

What version of Skuid are you on? Ordinarily Skuid respects dependent picklists so I’m wondering if a bug is causing you issues.


we are on 9.3.4


Anshul,

Just to double check, do you have dependent picklists based on record type set up in Salesforce? Is the issue that the picklist is not correctly showing according to the record type, or is it that the contact method row doesn’t have the right record type associated with it (so the right picklist values aren’t showing)?


HI Amy, 

it is—>  Is the issue that the picklist is not correctly showing according to the record type
          —> what I have done, run an action on model when a new row is created, this action updated fields on  row specifically record type. after doing this I would i assume picklist respect the record type restriction/dependency.

As I stated, I have work around in place, but I was trying to figure out what is best way or If I am doing something wrong.

Thank you again.


Anshul,

If you wouldn’t mind you might try updating to Brooklyn Iteration 5, available from the Skuid Releases Page. I’m not positive that the dependent picklist issue existed in the version you’re currently on, but I know it’s come up recently and should be fixed in Brooklyn Iteration 5. 

As a reminder, Salesforce does not allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!