Skip to main content

Hi Team,

I have created a custom field on Customers screen.

 

Is there any feasibility to get this field under Field Name drop down, under Export Filtering tab, on Entities screen, for Customer entity. To control the customer export based on this checkbox.

As if this checkbox is checked, those customers only should Prepare & Process.

 

This I am trying to achieve on build 20.221.0021.

@vivekm unfortunately filtering based on custom fields is not supported in 2020r2 version.

In 2021r2 we added filtering support based on the Attributes and also custom fields, but only string custom fields.

Please check if you can update to 2021r2, since 2020r2 is not supported anymore. 


Thank you @smarenich for the inputs, will check with team for upgrade, if client agrees.

One more request @smarenich can you please suggest the best possible way to customize this, to get custom field for filtering, if it is possible.

 

 


@vivekm I would recommend this way

	public class BCCustomerProcessorExt : PXGraphExtension<BCCustomerProcessor>
{
PXOverride]
public FilterResult FilterExport(IMappedEntity record, Func<IMappedEntity, FilterResult> baseHandler)
{
FilterResult result = baseHandler(record);

if (record?.Local?.SyncID != null && result.Result == FilterStatus.None)
{
PXSelect<PX.Objects.AR.Customer,
Where<PX.Objects.AR.Customer.noteID, Equal<Required<PX.Objects.AR.Customer.noteID>>>>.Select(Base, record?.Local?.SyncID);

if(PX.Objects.AR.Customer.<CustomFeld> != true)
return new FilterResult(FilterStatus.Filtered, "Customer is not enabled for BigCommerce");
}

return result;
}
}

 


Thank you @smarenich for the details, will try with the suggested code piece.


Reply