I have this feature service that used the Global ID to like to another table. I am able to get this table using a query and process the results. However I cant figure out how to get the attachments for this feature. The count always returns 0 even though the table hasAttachments property is true? I am missing something. I need to get and show the attachments (Photos) for a queried feature, but cant seem to get to them?

This function is a result of a table connection query, Feature status changed event.
<SPAN class="keyword token">function</SPAN> <SPAN class="token function">processQueryFeaturesResult</SPAN><SPAN class="punctuation token">(</SPAN>queryResult<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">try</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="operator token">!</SPAN>queryResult <SPAN class="operator token">||</SPAN> <SPAN class="operator token">!</SPAN>queryResult<SPAN class="punctuation token">.</SPAN>iterator<SPAN class="punctuation token">.</SPAN>hasNext<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// No features returned</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"No features returned"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">return</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">while</SPAN> <SPAN class="punctuation token">(</SPAN>queryResult<SPAN class="punctuation token">.</SPAN>iterator<SPAN class="punctuation token">.</SPAN>hasNext<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> feature <SPAN class="operator token">=</SPAN> queryResult<SPAN class="punctuation token">.</SPAN>iterator<SPAN class="punctuation token">.</SPAN><SPAN class="token function">next</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>feature<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> objectID <SPAN class="operator token">=</SPAN> feature<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN><SPAN class="token function">attributeValue</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"OBJECTID"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> GlobalID <SPAN class="operator token">=</SPAN> <SPAN class="token function">String</SPAN><SPAN class="punctuation token">(</SPAN>feature<SPAN class="punctuation token">.</SPAN>attributes<SPAN class="punctuation token">.</SPAN><SPAN class="token function">attributeValue</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"GlobalID"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//THESE values are indeed populated</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"EdgeMapPageFieldSelected - processQueryFeaturesResult - objectID"</SPAN><SPAN class="punctuation token">,</SPAN> objectID<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"EdgeMapPageFieldSelected - processQueryFeaturesResult - GlobalID"</SPAN><SPAN class="punctuation token">,</SPAN> GlobalID<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//THIS Results in - feature.attachments QmlAttachmentListModel(0x1ee425912e0)</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"EdgeMapPageFieldSelected - processQueryFeaturesResult - feature.attachments"</SPAN><SPAN class="punctuation token">,</SPAN> feature<SPAN class="punctuation token">.</SPAN>attachments<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//THIS Results in feature.attachments.count 0 </SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"EdgeMapPageFieldSelected - processQueryFeaturesResult - feature.attachments.count"</SPAN><SPAN class="punctuation token">,</SPAN> feature<SPAN class="punctuation token">.</SPAN>attachments<SPAN class="punctuation token">.</SPAN>count<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="comment token">//The table that these results are queryied from HAS Attachmenst</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"EdgeMapPageFieldSelected - processQueryFeaturesResult - onlineAttachmentsTable.hasAttachments :"</SPAN><SPAN class="punctuation token">,</SPAN> onlineAttachmentsTable<SPAN class="punctuation token">.</SPAN>hasAttachments<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>