cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove Journal Voucher by SDK?

0 Kudos
523

Dear All,

I am using SAP B1 9.3 and I was imported JV to system with wrong information and now I really want to delete it back. So is that anyway to remove JV by SDK?

Noted: Here is my code

SAPbobsCOM.JournalVouchers oJV = (SAPbobsCOM.JournalVouchers)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers);

SAPbobsCOM.JournalEntries je = oJV.JournalEntries;
bool result = je.GetByKey(1);


I was error (Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt) when it runs to je.GetByKey(1)


Please help me...
Thanks
View Entire Topic
ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tony Soeun,

Unfortunately, Journal Voucher business object does not has any GetByKey() method. SAP Note 2277460 mentions the same issue.

Therefore, you need to delete those Vouchers from the SAP Business One Client itself.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support