on 08-08-2017 3:06 PM
Hello Everyone,
While adding / Updating JournalVoucher using SAPDIAPI, application is getting crashed !!! Please look into this issue & suggestion me some solution :-
The below line crashes while adding Journal Voucher ==> Property ==> "Primary Form Item"
objSDocuments.JournalEntries.Lines.PrimaryFormItems.CashFlowLineItemID = objHeader.PrimaryFormItemId; (Primary form Item)
SAP BUSINESS ONE 9.2 PL 08
SAPbobsCOM.JournalVouchers objSDocuments= (SAPbobsCOM.JournalVouchers)oCmpy.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers);
objSDocuments.JournalEntries.Series = Convert.ToInt32(objGeneralLedgerManager.GetSeries());
objSDocuments.JournalEntries.DueDate = dtPostingDate;
objSDocuments.JournalEntries.ReferenceDate = dtPostingDate;
objSDocuments.JournalEntries.TaxDate = dtPostingDate;
objSDocuments.JournalEntries.UseAutoStorno = BoYesNoEnum.tYES;
objSDocuments.JournalEntries.StornoDate = dtPostingDate.AddDays(1);
foreach (JHeaderLines objHeader in lstHeaderLines)
{
objSDocuments.JournalEntries.Lines.AccountCode = objHeader.AccountCode;
objSDocuments.JournalEntries.Lines.Debit = (Double)objHeader.Debit;
objSDocuments.JournalEntries.Lines.Credit = (Double)objHeader.Credit;
if (objHeader.PrimaryFormItemId > 0)
{
try
{
objSDocuments.JournalEntries.Lines.PrimaryFormItems.CashFlowLineItemID = objHeader.PrimaryFormItemId;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
objSDocuments.JournalEntries.Lines.Add();
}
string iDraftOrder = "";
int iError = objSDocuments.Add();
Some more details about the error : Please find the application / windows logs -
Hi Rahul,
One important thing, is it getting crashed every time or randomly it is crashing? Also is it specific to one particular environment or it is crashing everywhere.
There can be the issues while there is DI API version mismatch on client machines. For this, you can refer to SAP Note 861599.
Kind regards,
ANKIT CHAUHAN
SAP SME Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Ankit for your reply.
We have installed on SAP Hana on the server & I am doing the development on it during the debugging or execution of the app I am stumbling upon this error. One more thing when I set the value to primary form item @ that time, the error pops out.
Hi,
This appears to be the same issue as in SAP Note 2615423.
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.