Announcement

Collapse
No announcement yet.

General Error, adding a Charge

Collapse
X
 
  • Filter
  • Time
Clear All
new posts

    General Error, adding a Charge

    I copied the API sample for adding a new account and it worked perfectly.

    I based adding a new charge to a contract on this code, altering only the MapBuff and DataBuff strings. It fails with the unhelpful "general error". I am pretty sure I am not setting a field that is required.

    Here are the buffer assignments.

    MapBuff = "'" + Chr(13) + "," + Chr(13) +
    + "FLDSLPCARDID," + Chr(13)
    + "FLDSLPSOURCERECID" + Chr(13)
    + "FLDSLPSLIPDATE" + Chr(13)
    + "FLDSLPITEMID" + Chr(13)
    + "FLDSLPQUANTITY" + Chr(13)
    + "FLDSLPPRICE" + Chr(13)
    + "FLDSLPDESC" + Chr(13)
    + "FLDSLPBILLKIND"

    DataBuff = "'CRD63SUPH3XNYTNBIE4E',
    'BCTHWOXYRPLB7D8CUWCI',
    '8/15/2018',
    'ITM2N6S1ZPMY3FXINTXD',
    '10',
    '12.34',
    'ZZ Test from API',
    'B'"

    The account, contract and item RecID are all correct. I tried adding "12:00" to the date but that had no effect.

    Are quotes required for all values of all types? Any special formatting for data like dates?

    -- Craig

    Re: General Error, adding a Charge

    Thank you for posting and great that it worked for you.

    In regards to the code sample below, we currently see two glitches.

    First one is an uneeded extra comma - here FLDSLPCARDID,

    The second is that instead of using FLDSLPSOURCERECID you should be using FLDSLPBCRECID to link to the relevant Contract.

    Hope this helps.

    Comment


      Re: General Error, adding a Charge

      Thanks so much. I stared at that code for a long time not seeing the extra comma.

      Comment

      Working...
      X