Hi, I have to export bill from My Application to Sage 50 Accounting. I am able to add bill but not able to get entered Invoice ID. I have to get inserted invoice Id. Sample Code: PurchasesJournal purJourn = SDKInstanceManager.Instance.OpenPurchasesJournal(); purJourn.SelectTransType(0); // invoice purJourn.SelectAPARLedger(sSupplier); purJourn.InvoiceNumber = sInvNum; purJourn.SetJournalDate(sInvDate); purJourn.SetItemNumber(sItemNum, iLine); purJourn.SetDescription(sItemDesc, iLine); purJourn.SetQuantity(Math.Round(dQty, 4), iLine); purJourn.SetPrice(Math.Round(dItemUnitPrice, 4), iLine); purJourn.SetLineAmount(Math.Round(dItemTotal, 2), iLine); purJourn.SetTaxCodeString(sTaxId, iLine); purJourn.SelectPaidByType("Pay Later"); //purJourn.SetLineAccount(MakeAccountNumber(5200).ToString(), iLine);// 5200 is Purchase Good if (sProjectName != "") { try { // allocate projects purJourn.SelectProject(sProjectName); ProjectAllocation projAlloc = purJourn.AllocateLine(iLine); projAlloc.SetProject(sProjectName, 1); try { projAlloc.SetPercent(100.0, 1); } catch (SimplyNoAccessException) { // can't allocate by percent, allocation by amount projAlloc.SetAmount(dItemTotal, 1); } projAlloc.Save(); } catch { } } if (sMemo.Length 39) sMemo = sMemo.Substring(0, 39); AdditionalInfo addInfo = purJourn.DoAdditionalInfo(); addInfo.SetAdditionalComment(sMemo); addInfo.Save(); var returnValue = purJourn.Post() Here I found true/false value, but i need to return Id of entered Jounral. Please can you please tell me how do I get inserted Invoice Id so that i can perform further action. It every time return true/false value. I am using Microsoft Visual Studio using c#. Thanks Sandeep
↧