help needed

Discussion in 'Requests' started by mutharasan, Dec 5, 2013.

    
  1. mutharasan

    mutharasan Member


    Dear All Experts,

    In sales voucher i have created one new number field and i have given 100 in that field. I want to increase by one as 101 in next sales voucher like voucher number. please give me sample code or guidance.

    Thanks in Advance.
     


  2. Taufeeq Shaikh

    Taufeeq Shaikh Active Member


    Mr Mutharasan you need to set value at field level through formula as below :-


    Just try it am not sure

    [Field : your field]

    Set as : If $$Number:mad:@NoOfVouchers = $$Number:"0" then "100" +
    else @@NoOfSVCurrentVouchers + 1
    Set Always : Yes
    Storage : UDFNO

    [System: Formula]

    NoOfVouchers: $$CollectionField:$UDFNO:1:CurrentSalesVouchers
    CurrentSalesVouchers: $VoucherTypeName = "Sales"
     


  3. Taufeeq Shaikh

    Taufeeq Shaikh Active Member


    Sorry above post was wrong :-


    [Field : your field]

    Set as : If $$Number:mad:@NoOfVouchers = $$Number:"0" then "100" +
    else @@NoOfVouchers + 1
    Set Always : Yes
    Storage : UDFNO

    [System: Formula]

    NoOfVouchers: $$CollectionField:$UDFNO:1:CurrentSalesVouchers
    CurrentSalesVouchers: $VoucherTypeName = "Sales"
     
    mutharasan likes this.


  4. mutharasan

    mutharasan Member


    Dear Taufeeq Shaikh,

    Thank you very much for your reply. it is working but the number does not increase. it is showing same number in subsequent sales vouchers. But my requirement is the number should be increase by one like voucher number. if is it possible please reply me.

    Thanking You
     


  5. Taufeeq Shaikh

    Taufeeq Shaikh Active Member


    Dear Mutharasan kindly upload the code so that i can rectify and verify it.
     


Share This Page