Skip to main content
Nintex Community Menu Bar
Question

Invalid Reference Id" error when creating records in a child table"

  • July 9, 2024
  • 8 replies
  • 1 view
  • Translate

Forum|alt.badge.img+9

I have a page containing a “parent” model called “Workshop” and a table beneath it where users can create rows for “Workshop Attendance”. When users click the green plus icon in the table, it fills in the parent record automatically in the lookup field (Excellent!). However, when I do so and save the page, it throws the error “Invalid Reference Id: Workshop” and no child records in the table are saved. What am I’m missing?

Did this topic help you find an answer to your question?

Forum|alt.badge.img+9
  • July 9, 2024

Peter, I ran into this a week or so ago. Does the workshop attendance model have a filter on the Id of workshop as a url param ? Is the field Workshop_Id__c in the workshop attendance model ?

Translate

Forum|alt.badge.img+9

Nope, I have neither of those situations. I do have the Workshop_Attendance__c.Workshop__c field (the lookup from attendance to workshop) on the model, and it shows up in the table fine. FYI, I have lots of models on this page, actually, one of which is a Class, whose ID is passed to the page via URL (Workshop has a lookup to Class).

Translate

Forum|alt.badge.img+13

Peter, can you send us the XML for this page?

Translate

Forum|alt.badge.img+9

Emailed to you & Anna - Thanks!

Translate

Forum|alt.badge.img+13

Peter, Can you try reordering these two Conditions in your Workshop Attendance model:

<conditions logic="1 OR 2"> <condition type="modelmerge" value="" field="Workshop__c" operator="=" model="Workshop" enclosevalueinquotes="true" mergefield="Id"/> <condition type="blank" value="null" field="Workshop__c" operator="=" enclosevalueinquotes="false"/> </conditions> 

You should be able to reorder just by dragging in the Builder. We think that the issue here is that, when new your users click to create a new Workshop Attendance record, Skuid is (helpfully) using the Conditions in your Model to pre-populate the new records’ “Workshop__c” field with the corresponding Workshop’s Id. But, because you have OR logic here, and because of the order of the Conditions, Skuid is first using the Model Merge condition, then it is overwriting the value with null. So, switching the order of your conditions should change this! We’ll see if there’s some way we can make this not happen in a future version of Skuid.

Translate

Forum|alt.badge.img+9

I wasn’t able to drag/drop conditions, but i just deleted the first one and recreated it, emulating the same thing, and now it works. Thanks! And yes, this should be pointed out / documented or worked around so builders don’t face this. I would never have figured that out.

Translate

Forum|alt.badge.img+13

Glad it worked - and, definitely agreed about us changing to make it so that this doesn’t happen.

Translate

Forum|alt.badge.img+2

I’m running into the same error, but I only have one condition: I have two very similar pages, on different objects but with the same approach & condition, and one works while the other gives me the “Invalid Reference Id” error. I tried deleting and re-creating the condition (just in case something was off/odd), but no joy.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings