IdentifyTask not returning ObjectId

532
1
11-01-2012 10:52 PM
MattPratap
New Contributor
I have a Feature Service published with a layer's attributes field ObjectId set to not visible.
When I use IdentifyTask for this layer and get IdentifyResults, the ObjectId attribute is missing (obviously). However I need the ObjectId to use the FeatureLayer.QueryAttachmentInfos() method. Even the method signature QueryAttachmentInfos(Graphic) throws an exception since it cannot find the ObjectId in the graphic.

Is there anyway to get the ObjectId for layers where the ObjectId attribute is set to not visible?
Or does ObjectId field always have to be set to visible in this scenario?

thanks

(api version 2.4)
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
Is there anyway to get the ObjectId for layers where the ObjectId attribute is set to not visible?


If a field is not set to visible at server side, I don't know any way to get it at client side.
The only way is to update the service and make the field visible.
0 Kudos