SDK ALLOCATED CREDIT NOTE NUMBER

SOLVED

I am in the process of implementing credit note integration with Sage 200 Evolution. How can I get the allocated credit note number back after creating the credit note in Sage? What is the name/member type holding the allocated credit order number?

Parents
  • +1
    verified answer

    Once you have created your credit note, you need to call the process method, which returns the credit note number, as shown below

     Customer lvCUstomer = new Customer("00001");
     CreditNote cn = new CreditNote();
     cn.Customer = lvCUstomer;
     ...
     cn.Save();
     OrderDetail cNoteDetail = new OrderDetail();
     cn.Detail.Add(cNoteDetail);
     
    GLAccount detailGL = new GLAccount("1000101");
    cNoteDetail.GLAccount = detailGL;
    cNoteDetail.Project = proj;
    cNoteDetail.TaxType = new TaxRate("13");
    cNoteDetail.Quantity = 1;
    cNoteDetail.ToProcess = 1;
    cNoteDetail.UnitSellingPrice = 199.99;
    cNoteDetail.Discount = 0;
    cNoteDetail.Description = "CNote Description";
    
    cn.Save();
    String lvCreditNoteNo = cn.Process();

    you can then do what you wish with the credit note number

Reply
  • +1
    verified answer

    Once you have created your credit note, you need to call the process method, which returns the credit note number, as shown below

     Customer lvCUstomer = new Customer("00001");
     CreditNote cn = new CreditNote();
     cn.Customer = lvCUstomer;
     ...
     cn.Save();
     OrderDetail cNoteDetail = new OrderDetail();
     cn.Detail.Add(cNoteDetail);
     
    GLAccount detailGL = new GLAccount("1000101");
    cNoteDetail.GLAccount = detailGL;
    cNoteDetail.Project = proj;
    cNoteDetail.TaxType = new TaxRate("13");
    cNoteDetail.Quantity = 1;
    cNoteDetail.ToProcess = 1;
    cNoteDetail.UnitSellingPrice = 199.99;
    cNoteDetail.Discount = 0;
    cNoteDetail.Description = "CNote Description";
    
    cn.Save();
    String lvCreditNoteNo = cn.Process();

    you can then do what you wish with the credit note number

Children