Rejections Template

edudiazedudiaz Member Posts: 39
Hi,

We have a high volume of daily purchase orders and we are using the Document Approval process to authorize them. The system is working great but purchasers are having a hard time knowing which orders have been rejected. Typically they get an e-mail notification stating that it has been rejected, but the e-mail does not make any reference to the order number. Where is the rejections template and what can I do to add this field in it? I only see the approval and overdue templates.

Thanks for your help,

Eduardo

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Did you check SendPurchaseRejectionsMail function in Codeunit Approvals Mgt Notification (440)?
  • edudiazedudiaz Member Posts: 39
    Hi Mohana, Thanks for your reply. As requested, I went to codeunit 440 and found the below code for Rejections. I am not a programmer but where and what would I need to add so that the PO number gets embedded as part of the e-mail subject or body.

    SendPurchaseRejectionsMail(PurchaseHeader : Record "Purchase Header";ApprovalEntry : Record "Approval Entry")
    SetTemplate(ApprovalEntry);
    Subject := STRSUBSTNO(Text007,Text010);
    Body := Text013;

    SMTP.CreateMessage(SenderName,FromUser,SenderAddress,Subject,Body,TRUE);
    SMTP.AddCC(Recipient);
    Body := '';

    Thanks for your help!
    ED
  • AlbertvhAlbertvh Member Posts: 516
    You could change the line
    Subject := STRSUBSTNO(Text007,Text010);
    to
    Subject := STRSUBSTNO(Text007,Text010) + ' ' + FORMAT(PurchaseHeader."Document Type") + ' : ' + PurchaseHeader."No.";
Sign In or Register to comment.