We have the requirement to add a range on the Warehouse type as not Transit for a specific role
I tried to modify the addFilterPaneRanges() method, updatedesign method
But it didnt work.
//protected void addFilterPaneRanges()
//{
// next addFilterPaneRanges();
// QueryBuildDataSource InventLocationDS = InventLocation_ds.query().dataSourceName(InventLocation_ds.name());
// SysQuery::findOrCreateRange(InventLocationDS, fieldNum(InventLocation, InventLocationType));
//}
// QueryBuildDataSource InventLocationDS = InventLocation_ds.query().dataSourceName(InventLocation_ds.name());
// SysQuery::findOrCreateRange(InventLocationDS, fieldNum(InventLocation, InventLocationType));
// CoC
// next updateDesign(_mode);
// if(_mode == InventDimFormDesignUpdate::Init)
// {
// isFormOpenedWithDynalink = (InventSum_DS.query().dataSourceName(InventSum_DS.name()).dynalinkCount() > 0)
// || (InventTable_DS_DS.query().dataSourceName(InventTable_DS_DS.name()).dynalinkCount() > 0)
// || (InventDim_DS.query().dataSourceName(InventDim_DS.name()).dynalinkCount() > 0)
// || (InventBatch_DS.query().dataSourceName(InventBatch_DS.name()).dynalinkCount() > 0);
// if(!isFormOpenedWithDynalink)
// {
// InventLocationDS = InventDim_ds.query().dataSourceName(InventLocation_ds.name());
// SysQuery::findOrCreateRange(InventLocationDS, fieldNum(InventLocation, InventLocationType));
// }
// }
Hello Raj,
Can you tell if you got errors or if nothing happened? Was the code as copied above also disabled by the comment indicators? It looks like
Have you used the debugger to check if the coding is executed? It looks like you add a range, but no filter value for the field InventLocationType.
Note that you can use extensible data security (XDS) for achieving your requirement. You can then create a security policy which will add the query constraint which can be linked to a particular security role.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156