How to solve it???

RanaRana Member Posts: 123
Hi All,

I have created a field ( "Transporter Bill Entry", Boolean) in the table Sales Shipment Header ( ID 110 ). And add this field on the FORM Posted Sales Shipments ( ID 142 ). This form is non-editable .

I have aaded a command Buttan ( Function ) on this FORM and Call a CodeUnit Function to modify this field. Every thing is working.

But when Click the Command Buttan the form is FILTERED by the

Field Filter


Marked : Yes

Transporter Bill Entry : No


Screen Shots are as follows

1



2.


3



I want to remove the filter.
Is there any other way to solve this issue??

Thanks

Answers

  • MBergerMBerger Member Posts: 413
    In the code where you call your function, declare another variable of the same record type as REC ( let's call it RecToChange ). Then use
    Currform.SetSelectionFilter(RecToChange) ;
    CMFMgt.EditTransportbillEntry(RecToChange) ;
    
  • ara3nara3n Member Posts: 9,256
    Make sure you add CurrForm.update(false);
    Currform.SetSelectionFilter(RecToChange) ;
    CMFMgt.EditTransportbillEntry(RecToChange) ;
    CurrForm.update(false);
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • RanaRana Member Posts: 123
    Thanks both of u... it works fine \:D/
  • kapamaroukapamarou Member Posts: 1,152
    Just to add this:

    When you say

    Rec.SETRANGE(SomeField); <-- (without specifying a value for the field)

    it removes any filter applied on the specific field...
  • ara3nara3n Member Posts: 9,256
    the only issue is that you don't know what field the user has filtered on.

    I guess you could do

    Rec.reset; to remove all the fields.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.