Disable A column of lines On Basis of Header

seemaseema Member Posts: 17
edited 2004-09-17 in Navision Attain
Hi Everybody,

I want to disable a column for a particular Blanket order only when an option field at Header of that order will have a particular value. How can I do this. Pls suggest.

Thanks in advance,
Seema

Comments

  • FPulsfortFPulsfort Member Posts: 43
    Hi Seema,

    I hope i understand you correctly.
    If you want to disable a column in the subform, you can do it in the OnAfterGetRecord-Trigger of the Subform. There you can do a GET of the right Haeder-Record and set the Column visible = TRUE or FALSE as the value of your option-field says.

    Hope this helps.

    Regards,
    Frank
  • ajayjainajayjain Member Posts: 119
    On after get record

    IF Status = Status::Released THEN
    CurrForm."Order Date".EDITABLE(FALSE)
    ELSE
    CurrForm."Order Date".EDITABLE(TRUE);
    Ajay Jain
    UK
  • sggsgg Member Posts: 109
    Try any of the following Options on the sales line subform:

    OnAfterGetRecord

    1.

    SalesHeader.GET("Document Type","Document No.");
    CurrForm."No.".EDITABLE (SalesHeader.Status=SalesHeader.Status::Open);

    ======================================

    2.

    SalesHeader.GET("Document Type","Document No.");

    CASE SalesHeader.Status OF
    SalesHeader.Status::Open :
    CurrForm."No.".EDITABLE(TRUE);
    ELSE
    CurrForm."No.".EDITABLE(FALSE);
    END;

    you could also use the CASE option when there are more than 1 options

    =================================

    3. If the Options are More than 2 then Try

    SalesHeader.GET("Document Type","Document No.");

    IF SalesHeader.TestField IN [SalesHeader.TestField::Value1, SalesHeader.TestField::Value2,...] THEN
    CurrForm."No.".EDITABLE(FALSE)
    ELSE
    CurrForm."No.".EDITABLE(TRUE);
    Sunday, Godwin G
  • seemaseema Member Posts: 17
    Hi Everybody,

    Thanks for your solutions. But you know with these solutions, the column of that subform will get disabled for every order Whereas I need to do it only for that particular order whose status is "Closed" or as soon as the status is changed to closed.

    Pls tell me if there is some solution.

    Thanks and Regards,
    Seema
  • seemaseema Member Posts: 17
    Hi Friends,

    Hey it got solved.

    I created two functions in Subform to disable and enable the line and By calling these functions from Header - onAfterGetRecords on basis of status.

    Anywayz Thanx alot,
    Seema Gupta
Sign In or Register to comment.