Parent/Child form field undefined

This error has been happening today on a child form in our ordering system:
image

The OrdNum field connects to the Title field in the parent. Both exist, and both have non-null contents.

Is this another issue caused by a recent MS update? I rolled back the most recent one after the "Unknown error" problem with New child forms.

Update: This is the console info

spform.js:53 [SharePoint Forms] SPFormSubmissionError: An error has occured while submitting the form to SharePoint.
at new t (https://forms.plumsail.com/widget/1.0.7/spform.js:42:95107)
at e. (https://forms.plumsail.com/widget/1.0.7/spform.js:103:62829)
at https://forms.plumsail.com/widget/1.0.7/spform.js:103:55097
at Object.next (https://forms.plumsail.com/widget/1.0.7/spform.js:103:55202)
at s (https://forms.plumsail.com/widget/1.0.7/spform.js:103:53943) FormManager:SaveForm

Hello @njones,

How do you open the child form? Is it opened from the Edit/New parent form?

Do you have any custom code in the child form? Does the OrdNum field is a required field?

Hi mnikitina

Thanks for your reply

The child form is accessed from an "Add New Item" button on the list control.

The issue is with the New parent form - custom code in the child form checks the parent form to get the Order Number (in the Title field in the parent) and then copies that into the OrdNum field on the child.

The parent form has not yet been saved, so the Order Number is set to "ORDNUM" until it is saved.

OrdNum is not a required field in the child list, but it is the field that links to the parent form.

When I try to save the child form, this is what the console shows:

Update: I keep getting this message in the console:
Access to XMLHttpRequest at 'https://waconatm.officeapps.live.com/apc/trans.gif?2d3f697da985862a5891ef444beae738' from origin 'https://MYSITE.sharepoint.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Hello @njones,

There is no need to set the lookup parent with custom code. The child Items will be bound automatically once the parent item is saved.

Please remove the code that sets the OrdNum field and test the form.

1 Like

Thank you mnikitina

I don't understand why the code worked (and was needed) but now it's not required - but it works!

@njones,

The code was never needed to bind child to parent. Maybe you've used it in edit form....

Anyway, I'm glad it is working now)

1 Like