WCF Siebel Adapter - Query fails because of misconfigured fields

 

Siebel adapter uses the COM interface to invoke calls on Siebel. For business component query, Siebel supports two ways of retrieving the field values for records. One can either use GetFieldValue to retrieve one field at a time or the other option is to use GetMultipleFieldValues to retrieve values for a bunch of fields in one go. The latter is better from a performance standpoint and is what the adapter uses. The problem with this approach though is that even if one of the fields, whose values are being retrieved, is mis-configured, the entire query call fails.

In development environments, it can happen that some of the customizations have issues, resulting in query failure as described above. The first step towards diagnosing the problem is identification of those problematic fields. The error message doesn’t always help identify the fields. When in such situation, one can use the attached Siebel COM sample code to narrow down the fields. You will need to add a reference to sstchca.dll (present in the Siebel install folder, in the bin sub-directory).

Once you have narrowed down the fields, you can either fix the issue with the field or if it’s not of interest, mark them as inactive on Siebel backend. You can then query using the Siebel adapter without any issues. Alternately, you can also use the QueryFields (optional) argument passed to the query operation to retrieve only the fields of interest.

Program.cs