XBond
XBond

Reputation: 250

Trying to delete a Miscellaneous Log Entry via eConnect - possible

I have a snippet of code that creates one or more Miscellaneous Log Entries via eConnect. If the code fails to create an entry, then all successfully created entries should be deleted.

E.g. (pseudo-code)

List<string> xmlDocs = new List<string>();

try
{
     for (int index = 0; index < entries.Count; index++)
     {
          // Create taPAMiscLogHdrInsert
          // Create taPAMiscLogLineInsert_ItemsTaPAMiscLogLineInsert[]
          // Create PAMiscLogExpenseType and set the fields to above
          // Generate the XML
          xmlDocs.Add(econnect.CreateTransactionEntity(connectionString, xml)
     }
}

catch 
{
     for (int index = 0; index < xmlDocs.Count; index++)
     {
          eConnect.DeleteTransactionEntity(connectionString. xmlDocs[index];
     }
}

The DeleteTransactionEntity call fails with 'Duplicate Misc Log Entry' which makes sense since the XML from the CreateTransactionEntity call contains HdrInsert nodes.

This leads me to believe that you cannot programmatically delete Miscellaneous Log Entries, but I thought I'd ask.

Anyone know if this is possible?

Upvotes: 1

Views: 119

Answers (0)

Related Questions