Adding filter in the production order status changes

mark_christsmark_christs Member Posts: 156
Dear All experts,
I need to know if I can add coding to be used as filter in the production order status form (Code # 99000914), so if I open it from a certain table, I can directly saw the status is equal to status in the table, I guess I must add the coding in the form -- onopen form(), before the buildform or after it or I must create a code in the variable tab of C/AL global..? your answers are expected so much. tks.


Rgds,
Mark

Comments

  • bbrownbbrown Member Posts: 3,268
    Set filter on the "Production Order" table then call report.

    Example 1:
    Record.SETCURRENTKEY(Key-field1, ...);
    Record.SETFILTER(Field, Filter);
    Report.XXX; // any user-defined function
    Report.SETTABLEVIEW(Rec)
    Report.RUN()
    There are no bugs - only undocumented features.
  • mark_christsmark_christs Member Posts: 156
    Dear All,
    To Brown, Tks a lot for your reply. you wrote:
    Record.SETCURRENTKEY(Key-field1, ...);
    Record.SETFILTER(Field, Filter);
    Report.XXX; // any user-defined function
    Report.SETTABLEVIEW(Rec)
    Report.RUN()

    You didn't mention where I must put the code, in the production order table or directly in this Code # 99000914 ( the form code). Indeed I can use change status in the function of production order (PPO, FPPO or RPO), but I wonder if I create a form with source table is production order or production order line, then I create a button with function is change status, so if currently in the line firm planned then in the system will appear changes production order status form (Code # 99000914) with the status in its header same as status in the line I mention.
    ...onpush()
    Form.run(form::"production order status change",prodorder);
    

    But with those coding, I only saw the form (Code # 99000914) with status simulated. that is the problem.
    COuld you answer me more clearly pls and the coding itselfs.


    Rgds,
    Mark
Sign In or Register to comment.