Jump to content

Order Entry transaction custom field not working


 Share

Recommended Posts

We are having an issue where one specific custom field for Order Entry transaction is not showing up in transaction detail in order entry screen or in the PDF. We are using Order Entry transactions for sales invoices. For some reason this happens only in production, and not in sand box environment. We use this SDK: https://developer.intacct.com/tools/sdk-php/

 
We have set it this way:
Field ID: SALES_REP
Data type: Text
Object: Order Entry transaction
Document type: Sales Invoice - Agency, Sales Invoice - Email, Sales Invoice Credit Memo, Sales Invoice - Affiliate

In the SDK we are setting it like this: 

$invoiceData->setCustomFields([ 'SALES_REP' => 'John Doe', ]);

We are sending 3 other fields and they all appear correctly in transaction details and PDF.

I noticed that there is another custom field with same name:
Field ID: SALES_REP
Data type: Text
Object: Invoice
Document type: (empty)
This field exists only in production, but I've been told that our Sage Intacct advisor does not think it has an effect on Order Entry/Sales Invoices, and it's something in API.

Any ideas where I should look into?

Link to comment
Share on other sites

I have to clarify that this was working properly in the past (and still is in sandbox). I was first fairly certain that duplicate custom field was the cause of the issue, but I've been assured that it wouldn't affect this.

Link to comment
Share on other sites

No, having the same name against a different object should not cause an issue.

You stated that SALES_REP was created against object "Order Entry transaction" - did you mean that, as it sounds like you want to create it against the detail which is the object  "Order Entry transaction detail"?

Link to comment
Share on other sites

Yep, we are using Order Entry transaction object. I could test using the Order Entry transaction detail in the sandbox, but at glance I didn't see way to use it via SDK: https://developer.intacct.com/api/order-entry/order-entry-transactions/

Checking the smart event/trigger is a great suggestion. I'll check with finance team.

Yep, we are setting multiple custom fields at once. Like this:

$invoiceData = new OrderEntryTransactionCreate;

// removed unrelated setters.

$invoiceData->setCustomFields([
'FIRST_FIELD' => 'John Doe',
'SECOND_FIELD' => 'John Doe',
'SALES_REP' => 'John Doe',
'OTHER_FIELD' => 'Joe Regular',
]);

 

Link to comment
Share on other sites

  • 2 weeks later...
On 5/23/2024 at 9:05 AM, Preston, Charlie said:

Another thing to check - is there a smart event/trigger that may be blanking the field out after update?

That's it! Somebody had set this smart event:

<update>
    <SODOCUMENT>
        <RECORDNO>{!SODOCUMENT.RECORDNO!}</RECORDNO>
        <SALES_REP>{!SODOCUMENT.CUSTOMER.CUSTREP.CONTACT.CONTACTNAME!}</SALES_REP>
    </SODOCUMENT>
</update>

It was effectively clearing out the SALES_REP field.

Thank you!

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...