Chris Prime Posted June 28, 2024 Posted June 28, 2024 Is there any way to pull the SUPDOCID through the API or in a custom report/view? The users want to audit that all JEs have at least 1 attachment, but I can't find a way to query this either through the reports/views or through the API. I can query the attachments API, but it doesn't include an ID back to the parent object, so it's useless for my purposes.
Members Sterio, Louis Posted June 28, 2024 Members Posted June 28, 2024 This is a tough one. The only way I know how to journal entries that have supporting documents is through the READ. The issue with this is you cannot query for it. You have to query all journal entries 1000 at a time and then pass the list of 1000 record numbers in the keys node as a comma delimited list. Then parse the response and ignore any records where supdocid is blank. <content> <function controlid="testControlId"> <read> <object>GLBATCH</object> <fields>RECORDNO,SUPDOCID</fields> <keys></keys> <returnFormat>xml</returnFormat> </read> </function> </content> 1
Chris Prime Posted July 8, 2024 Author Posted July 8, 2024 On 6/28/2024 at 5:53 PM, Sterio, Louis said: This is a tough one. The only way I know how to journal entries that have supporting documents is through the READ. The issue with this is you cannot query for it. You have to query all journal entries 1000 at a time and then pass the list of 1000 record numbers in the keys node as a comma delimited list. Then parse the response and ignore any records where supdocid is blank. <content> <function controlid="testControlId"> <read> <object>GLBATCH</object> <fields>RECORDNO,SUPDOCID</fields> <keys></keys> <returnFormat>xml</returnFormat> </read> </function> </content> Thanks, Louis. I'll give this a try. I actually want to ignore the records where supdocid isn't blank because the blank entries need to be reported to the user to rectify.
Recommended Posts