Filter Form by "Salesperson Code"

Prototype1Prototype1 Member Posts: 37
Hi Guy's
Hopefuly you can help me with a filtering problem. I use a CodeUnit to filter the Sales List(Form 45). I put the Code below after the OnRun:-

lrecSH.FILTERGROUP(10);
lrecSH.SETRANGE("Document Type",lrecSH."Document Type"::Quote);
lrecSH.FILTERGROUP(0);
lfrmSalesList.setHideNewDocButton(TRUE);
lfrmSalesList.SETTABLEVIEW(lrecSH);
lfrmSalesList.RUN;

I would like to also filter by "Salesperson Code" but I can't find the correct code. Any suggestions or pointers to previous questions greatfully received.


Thanks

Comments

  • matttraxmatttrax Member Posts: 2,309
    Prototype1 wrote:
    lrecSH.FILTERGROUP(10);
    lrecSH.SETRANGE("Document Type",lrecSH."Document Type"::Quote);
    lrecSH.FILTERGROUP(0);

    Add the following code
    lRec.SETRANGE("Salesperson Code", codeToFilterOn);
    

    where codeToFilterOn is the variable (or field) that contains your salesperson code.
  • Prototype1Prototype1 Member Posts: 37
    Thanks for the quick responce.
    Works perfectly.
    I think I was trying to be to clever......!
Sign In or Register to comment.