The sames question applies to LookupPreFilters with a PropertyType of System.Boolean.
Since the SalesLogix data types are usually nullable like bool?, how do you correctly filter them, if the column in the database contains null? Should I initialize the whole column with 'F' and set the corresponding fields to a default value on creation or is there any hint on how to filter them correctly? Currently I'm trying to filter like this:
LookupPreFilter filterSalesOrderNotCreated = new LookupPreFilter(); filterSalesOrderNotCreated.CondOperator = "Not Equal to"; filterSalesOrderNotCreated.FilterValue = "True"; filterSalesOrderNotCreated.LookupEntityName = "Sage.Entity.Interfaces.ILicenseOrder"; filterSalesOrderNotCreated.PropertyName = "CreatedSalesorder"; filterSalesOrderNotCreated.PropertyType = "System.Boolean";
I'm going for not equal to true because I thought this includes being set to False or being set to null. But the resulting list will remain empty, altough there's no single LicenseOrder where the property is set to True.
So: how do you specify a LookupPreFilter filtering for nullable bools? Setting the PropertyType to System.Boolean? doesn't work either. |