Gen. Prod. Posting Grp in Req. Worksheet

cally.ong
cally.ong Member Posts: 2
Hi,

Just wondering if anyone had ever encountered when keying in a G/L account in Requisition Worksheet, the Gen. Prod. Posting Group is not populated in the worksheet. Even when the Gen. Prod. Posting Group is setup in the G/L card, this information is still not populated.

Need some advise. :)

Regards,
Cally

Comments

  • Arhontis
    Arhontis Member Posts: 667
    First of all, wellcome to mibuso...

    Secondly, make sure that you surely need it for your implementation because it is basicaly used when entering items and not G/L Account in the requisition worksheet...

    A way of testing it is to enter a line with G/L account and entering the Gen. Product Posting Group by hand and trying to post before altering the code...

    Then, if you are sure that the code should update that field when choosing a G/L Account then take a look the OnValidate trigget of the "No." field in the table 246 Requisition Line and add a line of code (in the G/L account part) like:
    CASE Type OF
      Type::"G/L Account":
        BEGIN
          GLAcc.GET("No.");
          GLAcc.CheckGLAcc;
          GLAcc.TESTFIELD("Direct Posting",TRUE);
          Description := GLAcc.Name;
          VALIDATE("Gen. Prod. Posting Group",GLAcc."Gen. Prod. Posting Group");//<-----add this line...
        END;