Jump to content

Recommended Posts

Posted

I'm adding a comment in our API to update a sales order line. (SODOCUMENTENTRY)

https://developer.intacct.com/api/order-entry/order-entry-transactions/#update-order-entry-transaction-legacy

Here is the Postman example

<function controlid="{{$guid}}">
        <update_sotransaction key="Sales order-SO-11XXXXX">
          <updatesotransitems>
            <updatesotransitem line_num="1">
              <memo>Testing1234</memo>
            </updatesotransitem>
          </updatesotransitems>
        </update_sotransaction>
      </function>

 

Ideally we would like to use a number of query methods. However from the SDK it looks like the only one implemented.

https://github.com/intacct/intacct-sdk-php/blob/a59195f2592f4c790cd9d156bffe69983b9a3387/src/Intacct/Functions/OrderEntry/OrderEntryTransactionLineUpdate.php#L57

 

Is this correct?

 

Thank you

 

Miles

Posted

Following up...

Is this the correct way to update line entries??

 

$guid = uniqid();

$sop = new OrderEntryTransactionUpdate($guid);
$sop->setTransactionId("Sales order-" . $sop_number);

$sopLineEntry = new OrderEntryTransactionLineUpdate();
$sopLineEntry->setLineNo($line_number);
$sopLineEntry->setPrice($price);

$sop->setLines([$sopLineEntry]);


$response = $this->_intacct_client->execute($sop);

 

Is there a function that will output the XML before executing it?

 

Thank you

  • Members
Posted
Just now, Miles Hart said:

Following up...

Is this the correct way to update line entries??

 

$guid = uniqid();

$sop = new OrderEntryTransactionUpdate($guid);
$sop->setTransactionId("Sales order-" . $sop_number);

$sopLineEntry = new OrderEntryTransactionLineUpdate();
$sopLineEntry->setLineNo($line_number);
$sopLineEntry->setPrice($price);

$sop->setLines([$sopLineEntry]);


$response = $this->_intacct_client->execute($sop);

 

Is there a function that will output the XML before executing it?

 

Thank you

Yes all of the SDK's support logging: Sage Intacct SDK for PHP | Sage Intacct Developer

Posted

Thank you Louis,

I did some deep debugging and found the PHP SDK requires you set the ItemId & Quantity as well as the price then it seems to start working. Otherwise it nulls these and the update says successful and doesn't update, so I'm presuming it either sets a new line somewhere...
 

<updatesotransitems>
  <updatesotransitem line_num="4">
    <itemid/>
    <quantity/>
    <price>300.02</price>
  </updatesotransitem>
</updatesotransitems>

I'm also seeing this is a very slow update. If I run the Postman against SageIntacct Update Order Entry Transaction (Legacy) example, I'm seeing 28 seconds....?

Posted

Another update... & summary

 

1. 

https://github.com/intacct/intacct-sdk-php/blob/master/src/Intacct/Functions/OrderEntry/OrderEntryTransactionLineUpdate.php

 

On line #60 & #64 there is a "writeNull" is set to true, which is putting in the extra XML elements. Is there a reason for this? I'd like to remove them as these are causing a null element and breaking the Sales Order.

 

2. Can someone explain the 15 second delay to update a line?

 

Thank you

 

Miles

×
×
  • Create New...