Help on "Email After Save" Code

Discussion in 'Free Source Codes' started by kishan_raval, Apr 26, 2019.

    
  1. kishan_raval

    kishan_raval Member


    Dear Developers,
    I created code for sending mail after saving sales voucher, but it's not working with "prevent duplicates" option ON in sales voucher type, please help me fix it
    Code file is attached

    Thanks in Advance
     

    Attached Files:



  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [#Form: Sales Color]
    Option : SendAutoEmail : $$InCreateMode

    [!Form : SendAutoEmail]
    On : Form Accept : Action : Mail Report
     


  3. kishan_raval

    kishan_raval Member


    Dear Mr. Amit Kamdar,
    Thanks for the reply, But after changing code as per yours, now nothing is happening, please do check at your side
    and i forgot to say that it's not working with ewaybill option on in statutory,
    otherwise it's working fine
     
    Last edited: Apr 26, 2019


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Dear Mr. Raval,

    Am unable to check, because I do no have similar data structure or company to try.

    However if it creates problem in CREATE mode, then you can try it in ALTER mode. In create mode, the data is not yet saved, hence other Control/Conditions like "prevent duplicate number" etc might be preventing it, as it has not been executed yet.

    Also you might study the "Print after Save", which works.... so you can use the same methodology.
     


Share This Page