SmartBusinessEntityLookup
 
Forums / SmartComponent Library - Developer Forum / SmartBusinessEntityLookup

SmartBusinessEntityLookup

8 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Mar 2020
    Link to this post
    What is the best way to set the LookupDialogQueryString based on the value of another control? 

    For example, I have a control that I want to take the value and use when assigning the LookupDialogQueryString. I thought I could subscribe to the  "BeforeLookupDialogShown" but I don't seem to be able to do that in my form.

    What is the recommended approach when wanting to filter the results shown in the lookup dialog based on another control.
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    19 Mar 2020 in reply to Roger Blanchard
    Link to this post
    Can you please clarify, this here:

    "I thought I could subscribe to the  "BeforeLookupDialogShown" but I don't seem to be able to do that in my form."

  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Mar 2020 in reply to Mike Fechner
    Link to this post
    I added the method below to my form and then added VendorLookup:BeforeLookupDialogShown:Subscribe(OnBeforeLookupDialogShown) to my constructor. 

    METHOD PUBLIC VOID OnBeforeLookupDialogShown( sender AS System.Object,
                                                                                      e AS BeforeLookupDialogShownEventArgs ):
      
      RETURN.
     END METHOD.

    I am getting a compile error of "No accessible overload on BeforeLookupDialogShown
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Mar 2020 in reply to Roger Blanchard
    Link to this post
    Sorry,

    full error

    Multiple markers at this line - No accessible overload of OnBeforeLookupDialogShown in class VendorCombo has the signature required for the BeforeLookupDialogShown event. (14584) - ** C:\ProgressWrk\OspreyVer117102\OspreyHost\client\UserControls\VendorCombo.cls Could not understand line 197. (196)
  5. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    19 Mar 2020
    Link to this post
    Sounds like you're missing an USING statement. 
  6. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    Answered
    19 Mar 2020 in reply to Mike Fechner
    Link to this post
    Or maybe I am just a dumb ass!!

    My sender definition was not correct.

    I think I am spending too much time listening to news about this virus.

    Stay safe!!

    Thanks.

    METHOD PUBLIC VOID OnBeforeLookupDialogShown( sender AS Progress.Lang.Object,
                                                   e AS BeforeLookupDialogShownEventArgs ):
      
      RETURN.
     END METHOD.
  7. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    19 Mar 2020 in reply to Roger Blanchard
    Link to this post
    Same to you! Sounds like we all will be spending too much time in front of computers for a while.

  8. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    19 Mar 2020 in reply to Mike Fechner
    Link to this post
    That was my problem. Works great....thanks.
8 posts, 1 answered