CheckBox Filter in Purchase order ax 2012 R3

Hi

Here i have one customized form is there. in that form when i check the checkbox i need to filter the POStatus::Received only its working fine me.

When i uncheck the check box i need to filter the All POStatus data its not working

Please suggest me any one and check the code if anything is wrong correct me.

Modified() code

public boolean modified()
{
boolean ret;

if(CheckBox.value() == NoYes::Yes)
{
purchtable_ds.NonPOFilter();
}
else if(CheckBox.value() == NoYes::No)
{
PurchTable_ds.removeFilter();
}
ret = super();

PurchTable_ds.executeQuery();

return ret;
}

Have a look at InventQuarantineOrder form. (see how the view ended checkbox works)

Hi

i found the solution.

public boolean modified()

{

boolean ret;

if(CheckBox.value() == NoYes::Yes)

{

purchtable_ds.NonPOFilter();

}

else if(CheckBox.value() == NoYes::No)

{

//purchtable_ds.removeFilter();

PurchTable_ds.query().dataSourceName(“PurchTable”).clearRanges(); // i added this line its working

}

ret = super();

PurchTable_ds.executeQuery();

return ret;

}

Thanks for giving reply

You don’t have to do that. Just call the executeQuery in that method and handle applying ranges in executeQuery method. Have a look at below methods.
\Forms\InventQuarantineOrder\Data Sources\InventQuarantineOrder\Methods\executeQuery
\Forms\InventQuarantineOrder\Methods\showComplete

OK kranthi,

i will try and update you.

Thanks