It's telling you that queryObject doesn't always have the NTSERVICE_TYPEID column. You should be looking into why that is sometimes the case. Recommend putting a try/catch around it, and dumping out the query (dev environment), or serialising it and writing it to a log (prod environment). Once you see what it does contain in these situations, you should be able to work out where your logic is wrong.
Sorry for the late reply and Thanks Adam for your suggestion.
I got the exact issue what you had told. But, why I am getting different column list when I am taking the list from a query Object
Excellent question. Make sure a dump of the columnlist is included in your catch block.
I can see the particular column is not exist in query object from the log.
Also, I have added log to get the column list by arguments.queryObject.columnList.
Need some time to get the result.
I got following log report.
[Table (rows 311 columns ntCompanyID, vcCompany_Name, btActive): [ntCompanyID: coldfusion.sql.QueryColumn@5d213b6c] [vcCompany_Name: coldfusion.sql.QueryColumn@30c45f38] [btActive: coldfusion.sql.QueryColumn@2c476e8b] ] is not indexable by VCOFFICE_NAME
QueryObject Loged in Error Log:
I haven't posted the data of query object.