Page 1 of 1

Service Manager Task Filters

PostPosted: Thu Apr 15, 2021 4:34 pm
by NinaT
Hi,

It it possible to add custom task filters in Service Manager, I am trying to filter tasks that have not been retired, my filter works fine whilst I am still in the SM jobs form however as soon as I close the form and try to re-open I get a multi-part identifier error. I have seen this error before in Manufacturing which was logged as an issue but not sure if the issue is the problem.

I have attached an image of the filters that I have created and the subsequent error message, all done in v7.2.0 SR6.


2021-04-15_15-28-15.png
Filters


2021-04-15_15-30-33.png
Error
2021-04-15_15-30-33.png (21.35 KiB) Viewed 8989 times


Thanks
Nina

Re: Service Manager Task Filters  Topic is solved

PostPosted: Fri Apr 16, 2021 11:51 am
by Scott.Pearce
This is because when a form loads, the "BaseFindSQLQuery" is used to read the record - and filters are applied to this for the read. The "BaseFindSQLQuery" is constructed using the objects "RecIDFieldName" and "TableName" properties (properties which every business logic object must have). Therefore the BaseFindSQLQuery for service manager is "SELECT TOP 1 RecID FROM SM_Jobs". The SM_Tasks table is not involved, therefore the filter when appended causes a failure.

I've created a plugin that modifies the BaseFindSQLQuery for service manager, such that the SM_Tasks table is linked in, meaning filters referencing SM_Tasks will not break the initial readrecord:


Re: Service Manager Task Filters

PostPosted: Fri Apr 16, 2021 1:02 pm
by NinaT
Thanks Scott,
That works a treat, much appreciated.
Nina