Jump to content

Joe Donahue

Members
  • Posts

    4
  • Joined

  • Last visited

Reputation

1 Neutral

Personal Information

  • Job Title
    Software Architect
  1. Not sure what you hit with the smart rules, but I moved the ref id line and it went through without error. Wouldn't have thought to try that! Great catch and thank you very much!
  2. Louis, I made the recommended change to the formatting of the receiveddate element. In addition, I was able to enable logging and capture the XML messages. Surprisingly, the updated format looks correct, but I am still getting the exact same error message. <function controlid="0be78e3c-47d1-4fed-ac0c-ee9a201ababc"> <update_otherreceipt key="4090"> <refid>Mateo Receipt - 256749</refid> <receiveddate> <year>2024</year> <month>01</month> <day>06</day> </receiveddate> <receiptitems> <updatelineitem line_num="1"><amount>10.00</amount></updatelineitem> </receiptitems> </update_otherreceipt> </function> Response control status failure - XL03000003 XML Parse schema error: Error 1871: Element 'receiveddate': This element is not expected. Expected is one of ( description, supdocid, currency, exchratedate, exchratetype, exchrate, customfields, inclusivetax, receiptitems ).. Line: 1, column: 0. [Support ID: 4plML%7EZbfbRWEcBW86HZp32_DNJwAAAAo]
  3. Louis, thank you for the quick reply and the information. This seems to correlate with my approach, but I'm still getting the same message back that receiveddate "is not expected." I don't immediately have access to the XML output but will see what I can do. Is it possible that the error message is coming from the SDK? I noticed that AbstractOtherReceipt calls this field ReceiptDate and not receiveddate. It may not be related, but I wonder if passing this through the SDK hits a layer of validation before it actually generates & sends the XML. https://intacct.github.io/intacct-sdk-net/class_intacct_1_1_s_d_k_1_1_functions_1_1_cash_management_1_1_abstract_other_receipt.html
  4. Our project uses the .NET SDK to post data to Intacct. When functionality is not available in the SDK, we build a custom wrapper using the .NET SDK AbstractFunction tools. In this scenario, we can create OtherReceipts using the existing SDK object (Intacct.SDK.Functions.CashManagement.OtherReceiptCreate). Since no corresponding object exists for updating an OtherReceipt, we built our own by implementing AbstractOtherReceipt. You can see from the code below that I have attempted to include "receiveddate" which is valid according to the API documentation for update_otherreceipt. However, when I run this, I get an error message: Response control status failure - XL03000003 XML Parse schema error: Error 1871: Element 'receiveddate': This element is not expected. Expected is one of ( description, supdocid, currency, exchratedate, exchratetype, exchrate, customfields, inclusivetax, receiptitems ).. Line: 1, column: 0. [Support ID: WMQJV%7EZbKYbWEYBRH6qXb4YLP5fwAAAAY] This works as expected if I remove the "receiveddate" line. Am I structuring this correctly, or is the list of fields that I get back the only fields that I can update? public class OtherReceiptUpdate : AbstractOtherReceipt { public int RecordNo { get; set; } public OtherReceiptUpdate() : base() { } public OtherReceiptUpdate(string controlId = null) : base(controlId) { } public override void WriteXml(ref IaXmlWriter xml) { xml.WriteStartElement("function"); xml.WriteAttribute("controlid", ControlId, true); xml.WriteStartElement("update_otherreceipt"); xml.WriteAttribute("key", RecordNo, true); xml.WriteElement("refid", TransactionNo); //xml.WriteElement("receiveddate", TransactionDate, IaXmlWriter.IntacctDateFormat); xml.WriteStartElement("receiptitems"); if (Lines.Count > 0) { foreach (AbstractOtherReceiptLine line in Lines) { line.WriteXml(ref xml); } } xml.WriteEndElement(); // receiptitems xml.WriteEndElement(); // update_otherreceipt xml.WriteEndElement(); // function } } Thank you! Joe Donahue
×
×
  • Create New...