PDA

View Full Version : Querying FLDSLPWORKERID returns username instead of employee record id


jakogut
February 15th, 2016, 03:21 PM
When I query the employee a certain charge is linked to, it returns the employee's username instead of the account record id.

I've noticed in several instances that the CommitCRM low-level API does this. It returns human readable values that it will not accept in return. In the past, I've been able to work around the issue by substituting the output returned by CommitCRM with the equivalent input, as specified in the documentation.

This issue, however, cannot be worked around in the same way.

I would get around this inconvenient behavior in my application by simply querying record ids using the employee username (FLDWRKUSERNAME) as a search field, but as I was informed in this thread, user details cannot be queried from the low level API because of some sort of security concern.

How is somebody using CommitCRM's low level API supposed to get the employee account record id from a linked charge record id?

Support Team
February 16th, 2016, 06:11 AM
Thanks for asking.

The value returned for the employee is human readable and that it the employee name. The RECID value should be found as an XML attribute. For example, see below:

<FLDSLPWORKERID CmtRawData="CRDE3X2FC3S1HMFN0O5X">Bill</FLDSLPWORKERID>

jakogut
February 16th, 2016, 12:10 PM
Thanks for the response.

That made a lot of sense. My parsing code just grabbed the cdata for the element with the name matching the field that I was querying. I incorrectly assumed that CommitCRM was only returning the human readable data, and upon examining the XML response, I found exactly what I needed.