Document Approval For Indent.

rranjanerprranjanerp Member Posts: 70
My client has to use Document approval functionality in Purchase Indent.
After Release --> send for approval request ..
I know indent is not the standard functionality in nav .
How can i use this. At present the functionality of Approve is used ,but not by using Document approval setup. How can i use Document authoriser if not using document approval . or
plz suggest which one will be easier by using document approval or not using.

Thanks..

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    That you have to discuss with your customer and based on their business requirement you have to give them..
  • rranjanerprranjanerp Member Posts: 70
    Can any one tell me why the P.o is automatically approved & released after i pres send for approval request ? though the approver id is other than user id.
    The code running in Send for approval request is "

    IF ApprovalMgt.SendPurchaseApprovalRequest(Rec) THEN;

    also if i change the approval setup many times than the next eror comes :
    There is no Approval Entry within the filter.

    Filters: Table ID: 38, Document Type: Order, Document No.: PO-00001.

    The error occurs when I try to Send an Approval Request from a Purchase Order.

    in code unit 439 approval management following code running iinside send purchase approval reqest .plz suggest where might be the problem , i m not a programmer.


    TestSetup;
    WITH PurchaseHeader DO BEGIN
    IF Status <> Status::Open THEN
    EXIT(FALSE);

    IF NOT ApprovalSetup.GET THEN
    ERROR(Text004);

    IF NOT PurchLinesExist THEN
    ERROR(Text015,FORMAT("Document Type"),"No.");

    TemplateRec.SETCURRENTKEY("Table ID","Document Type",Enabled);
    TemplateRec.SETRANGE("Table ID",DATABASE::"Purchase Header");
    TemplateRec.SETRANGE("Document Type","Document Type");
    TemplateRec.SETRANGE(Enabled,TRUE);
    IF TemplateRec.FIND('-') THEN BEGIN
    REPEAT
    IF TemplateRec."Limit Type" = TemplateRec."Limit Type"::"Credit Limits" THEN BEGIN
    ERROR(STRSUBSTNO(Text025,FORMAT(TemplateRec."Limit Type"),FORMAT("Document Type"),
    "No."));
    END ELSE BEGIN
    IF NOT FindApproverPurchase(PurchaseHeader,ApprovalSetup,TemplateRec) THEN
    ERROR(Text010);
    END;
    UNTIL TemplateRec.NEXT = 0;
    FinishApprovalEntryPurchase(PurchaseHeader,ApprovalSetup,MessageType);
    CASE MessageType OF
    MessageType::AutomaticPrePayment:MESSAGE(Text128,PurchaseHeader."Document Type",PurchaseHeader."No.");
    MessageType::AutomaticRelease:MESSAGE(Text003,PurchaseHeader."Document Type",PurchaseHeader."No.");
    MessageType::RequiresApproval: MESSAGE(Text001,"Document Type","No.");
    END;
    END ELSE
    ERROR(STRSUBSTNO(Text129,PurchaseHeader."Document Type"));
    END;
  • rranjanerprranjanerp Member Posts: 70
    Please Note that

    Text003 :%1 %2 has been automatically approved and released.
    Text001 :%1 %2 requires further approval.\\Approval request entries have been created.
    Text128 :%1 %2 has been automatically approved. Status changed to Pending Prepayment.
    Name ConstValue
    Text010 Approver not found.
    Text025 %1 is not a valid limit type for %2 %3.
    Text129 No Approval Templates are enabled for document type %1.

    Please suggest if code is mistaken or i m doing wrong approval setup? also plz confirm does it necessary to make all the user ids as windows login? i m not using any id as windows login.
    m wrking in nav2009R2 with sql server db.
  • sprashanthsprashanth Member Posts: 18
    rranjanerp wrote:
    Please suggest if code is mistaken or i m doing wrong approval setup?

    Please check the Approval Setup, Approval template for PO and approver id in the user setup, if these are properly configured then I recon you shouldn't face much trouble.
    rranjanerp wrote:
    also plz confirm does it necessary to make all the user ids as windows login?

    Windows login login is not mandate for approvals.
    Cheers,
    Prashanth.
Sign In or Register to comment.