Skip to Content
0
Former Member
Apr 28, 2015 at 08:36 AM

Update ProductTrees_Lines - specific position

31 Views

Hi everybody,

I want to update a specific position in ProductTrees_Lines with B1if scenario. For example I have a product tree for masteritem with 3 entries.

masteritem

1. detail item1, 2 pcs

2. detail item2, 3 pcs

3. detail item3, 4 pcs

Now I want to update position 2 with 100 pcs.

So my update structure for B1 object call (object id 66) looks like this:

<QueryParams>

<Code>masteritem</Code>

</QueryParams>

<ProductTrees>

<row />

</ProductTrees>

<ProductTrees_Lines>

<row/>

<row>

<ItemCode>detail item2</ItemCode>

<Quantity>100.0</Quantity>

</row>

<row/>

</ProductTrees_Lines>

In fact I need to list the <row>-tags proper to the positions. Isn´t there a easier way by using something like <childnum> (which is the name of the field in the database describing the position of the productTree_line), so I don´t have to list all <row>-tags (reducing the xml I need to write)?

Using <childnum> leads to an error. And I can´t find a adequate field in the object description for object id 66.

Any suggestions?

Best regards

Benjamin