Associating a supplier with a product via Web Services

SUGGESTED

Hi there,

I'm just getting started with X3 Web Services and after a false start trying to use the newer GQL API I too have fallen back to the more thoroughbred SOAP WSDL-based API. I am wanting to write a script that adds a supplier to ~3000 Products if they are not already a supplier of that product. To get started I have created a web service that reads the ITP object and passes the ITMREFBPSNUM with the object keys. It looks a bit like this;

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="">schemas.xmlsoap.org/.../">
  <soap:Body>
    <read>
      <callContext>
        <codeLang>{{code_lang}}</codeLang>
        <poolAlias>{{pool_alias}}</poolAlias>
        <poolId />
        <requestConfig>{{request_config}}</requestConfig>
      </callContext>
      <publicName>ZITPSUP</publicName>
      <objectKeys>
        <item>
          <key>ITMREF</key>
          <value>220010043</value>
        </item>
        <item>
          <key>BPSNUM</key>
          <value>TN100</value>
        </item>
      </objectKeys>
    </read>
  </soap:Body>
</soap:Envelope>

This web service is working ok and my script is able to use it to identify which of the 1000s of products are missing this supplier TN100. I now want to assign a supplier record (ITMBPS?) to each of these products but I'm unsure how best to achieve this. I have attempted to use the save action against this ITP object with a WS call akin to;

But my Web Service responds with;

  <messages>
  <type>3</type>
  <message>Insufficient Access Level</message>
</messages>

I then went on a bit of wild goose chase about assigning "Access Codes" and realised I didn't know what I was doing.

Can anyone see what I'm doing wrong and give me some pointers? The screen in X3 is the Product > Supplier tab > [add a line item] (see below screenshot);


Thank you in advance.

/David

Parents Reply Children
No Data