OK button in BC

GnolGnol Member Posts: 2
edited 2021-06-28 in NAV Three Tier
Hello,
I have an issue when running a page using runmodal = lookupok
The source of the page is a temporary table
And when this table is empty the OK button is disabled
uzk5ny0cjwkg.png

Is there any way to enable it?

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,138
    When its empty, How come it makes a difference either its enable or not? you have cancel button to close it
  • GnolGnol Member Posts: 2
    edited 2021-06-29
    When its empty, How come it makes a difference either its enable or not? you have cancel button to close it

    There is a check
    If CloseAction = CloseAction::LookupOK then
        do something
    else
        cancel the process
    
    In this case this is a page that shows records with problems, if there is no problem records it should be possible to press ok and continue the scenario.
  • azharsaeedkhanazharsaeedkhan IslamabadMember Posts: 33
    edited 2021-07-26
    You cannot enable the OK button if there are no records.

    But a slight change to your logic can make it work fine
    If CloseAction = CloseAction::LookupOK then
      If not Record.IsEmpty then    
        do something
    else
        cancel the process
    
    Gnol wrote: »
    When its empty, How come it makes a difference either its enable or not? you have cancel button to close it

    There is a check
    If CloseAction = CloseAction::LookupOK then
        do something
    else
        cancel the process
    
    In this case this is a page that shows records with problems, if there is no problem records it should be possible to press ok and continue the scenario.

Sign In or Register to comment.