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
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
Comment