Error when adding data to linked table via NLWS.cusTable.create() | Community
Skip to main content
Marcel_Szimonisz
New Participant
April 7, 2022
Solved

Error when adding data to linked table via NLWS.cusTable.create()

  • April 7, 2022
  • 1 reply
  • 851 views

Hello All,

I have two table with 1:N relation set as follows:

 

When I add data manually via form where I add also data to the linked table everything works as designed. When I load the data via script using NLWS. create or Write method and assigning newly created id to the linked table record after i go the the table form view i get following error when i try to edit, delete, add any data to the set:

SCM 120008: unable to find key values for element 'xxx' (document with schema 'ctx')

 

 

 

 

<attribute advanced="true" label="Foreign key of 'Configuration' link ('id' field)" name="config-id" sqlname="iConfigId" type="long"/> <element label="Configuration" name="configuration" revLink="Variants" target="cus:Configuration" type="link"> <join xpath-dst="@id" xpath-src="@config-id"/> </element>

 

 

 

If I do not add the linked records I can add, edit and delete the data

 

Any hint or work around would be appreciated

 

EDIT: FORM that was used was wrong had to use type type="linkList" instead i used "link". Also had to create form for the linked table.

 

Marcel

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Marcel_Szimonisz

Hello @isahore  I have fixed it. I had form wrongly created. 

1 reply

isahore
New Participant
April 10, 2022

Hi @marcel_szimonisz,

If possible, can you share the code for the .create or .write method that you are using? It would help in understanding the cause of error, and possible fix.

 

Thanks

Marcel_Szimonisz
Marcel_SzimoniszAuthorAccepted solution
New Participant
April 10, 2022

Hello @isahore  I have fixed it. I had form wrongly created.