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
Marked : Yes
Transporter Bill Entry : No
Screen Shots are as follows
Can some help me to solve this issue other way ??
I would ask why you are using the SETRANGE command - would it not be simplier to loop and set the “Transporter Bill Entry” to TRUE.
to filter out the “Transporter Bill Entry” (TRUE) records.
Yes I understand but you are calling the fuction with a small set of selected records so will it impove the preformance - have you considered doing a MODIFYALL.
With your original code, try:
IF FINDSET(TRUE, TRUE) THEN BEGIN
But I’m bothered about the filters.
Forget about the filter.
Imagine you have two types of chicken. Red ones and green ones. Now you select a number of chicken and your task is to have them all green. So just paint them all to green. Nothing happens when you paint a green chicken, but red chickens will get green.
Just forget about the filter and call the MODIFYALL.
In general it is not an issue to change ALL records in a small set of records. It might be an issue when permanently changing ALL records in a table.
use SETSELECTIONFILTER with a local variable of the type “Sales Shipment Header” instead of REC.
This will prevent the filter from being applied to the Record variable so you don’t need to “RESET” the variable. Just call a CurrForm.UPDATE(FALSE) after the function call.
Yes I understand. if I don’t use the function RESET, the FORM is filteres with the Field Filter Marked : Yes Transporter Bill Entry : No.
I want to solve this issue without using the RESET Function. Is it possible ?