Tony Korhonen Posted May 22 Share Posted May 22 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 More sharing options...
Tony Korhonen Posted May 22 Author Share Posted May 22 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 More sharing options...
Tony Korhonen Posted May 22 Author Share Posted May 22 Because we have another custom field with the exact same name, I'm wondering if the custom field should be namespaced. What are your thoughts? Link to comment Share on other sites More sharing options...
Preston, Charlie Posted May 23 Share Posted May 23 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 More sharing options...
Preston, Charlie Posted May 23 Share Posted May 23 Another thing to check - is there a smart event/trigger that may be blanking the field out after update? Link to comment Share on other sites More sharing options...
Preston, Charlie Posted May 23 Share Posted May 23 Sorry, bit of brain dump as things occur to me - are you setting more than one custom field....are you making a single call to setCustomFields? If you want to supply more code, happy to have a look. Link to comment Share on other sites More sharing options...
Tony Korhonen Posted May 23 Author Share Posted May 23 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 More sharing options...
Preston, Charlie Posted May 24 Share Posted May 24 Silly question - can you see the custom field through the UI? If not, is the field activated? Link to comment Share on other sites More sharing options...
Tony Korhonen Posted June 1 Author Share Posted June 1 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! 1 Link to comment Share on other sites More sharing options...
Recommended Posts