I have seen some old posts regarding the layerDefinitions property for the identifyParams object and how it was not working in the javascript api or is not available, but it is there in the current documentation. I am trying to use it now with the 3.8 api and arcgis server 10.2.1 with no luck. Is this property still not working? Has anyone else been able to get it to work? I can do an identify task without a problem until I try to set this property of the identifyParams object. As soon as I try to set this property, I get an error. I am using it like this identifyParams.layerDefinitions[17]="user='test'". If I just use the identifyParams and identifTask without that line like this, everything works fine.:
Interesting. Let me try clearing the layerDefinitions first and then set them, that is one thing I am doing differently. Unfortunately, this is in development and not public yet. Thank you.
Well, that seemed to do the trick. If I don't setup the layerDefinitions array beforehand (identifyParams.layerDefinitions = [];), it doesn't work, but when I do, it does work. I didn't realize I had to initialize the array first. Thank you.