Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Community Advisor

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')

Marcel_Szimonisz_1-1649316831849.png

 

 

 

 

<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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

2 Replies

Avatar

Level 4

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

Avatar

Correct answer by
Community Advisor

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