RangerMSP Business Automation for successful ITs


Go Back   RangerMSP Forums > RangerMSP Software Discussion Forum (CCRM)

Thread Tools Search this Thread
 
August 15th, 2018, 11:42 AM
CraigYellick
 
Posts: 53
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
 
August 16th, 2018, 06:05 AM
Support Team
 
Posts: 7,528
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.
 
August 16th, 2018, 06:50 AM
CraigYellick
 
Posts: 53
Thanks so much. I stared at that code for a long time not seeing the extra comma.
 





All times are GMT -6. The time now is 03:05 PM.

Archive - Top    

RangerMSP - A PSA software designed for MSPs and IT Services Providers
Forum Software Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.