Daniel Maxwell Posted July 10 Share Posted July 10 Good Evening! I feel like I'm not sending correct parameters or such when creating an attachment. I'm utilizing the PHP SDK and I am using the XML API to create an attachment and that seems to be working well, but I do not know how to get the corresponding supdocid when it is created. Our document ids are set to auto-increment. An example of the response is: status: success function: create_supdoc controlId: <a control id> data: <empty array> listType: <blank> count: 0 totalCount: 0 numRemaining: 0 resultId: <blank> key: 12 start: 0 end: 0 errors: <empty array> So, is there something I need to do to get the supdocid returned so that I can use it in subsequent API calls? Thanks! Daniel Link to comment Share on other sites More sharing options...
Daniel Maxwell Posted July 11 Author Share Posted July 11 I've found that I can use the GetList feature to get the ID. I can pass the key that is returned from creating the attachment, using a filter on recordno = key and set the return fields to supdocid. This seems like a waste to have to make a separate call to get that ID. For creating an APBILL and setting SUPDOCID, does it have to be the SUPDOCID or can it be the KEY? Thanks, Daniel Link to comment Share on other sites More sharing options...
Members Sterio, Louis Posted July 12 Members Share Posted July 12 On 7/10/2024 at 9:02 PM, Daniel Maxwell said: I've found that I can use the GetList feature to get the ID. I can pass the key that is returned from creating the attachment, using a filter on recordno = key and set the return fields to supdocid. This seems like a waste to have to make a separate call to get that ID. For creating an APBILL and setting SUPDOCID, does it have to be the SUPDOCID or can it be the KEY? Thanks, Daniel It has to be the SUPDOCID Link to comment Share on other sites More sharing options...
Daniel Maxwell Posted July 13 Author Share Posted July 13 Is there a way to get the SUPDOCID returned with the response when creating the Attachment via the API? This would facilitate one less API call and readily provide the value I would need for the next API call to create, for instance, an APBILL with the attachment connected. Link to comment Share on other sites More sharing options...
Members Sterio, Louis Posted July 16 Members Share Posted July 16 @Daniel Maxwell You can provide the SUPDOCID yourself in the create_supdoc API call. Then use that supdocid in your subsequent call to create the AP Bill. This requires you turn off any sequencing however related to the SUPDOCID. If this is not an option you will need to query for the SUPDOCID. Link to comment Share on other sites More sharing options...
Daniel Maxwell Posted July 16 Author Share Posted July 16 Is there a way to put in a feature request to get SUPDOCID added to the API response to facilitate one API call where we have this sequencing turn on? Link to comment Share on other sites More sharing options...
Members Sterio, Louis Posted July 16 Members Share Posted July 16 This is something they may be able to do the REST API however the XML API enhancements are essentially frozen at this point. Please make sure to file an Idea in the idea portal (community). I will also ask the application team that owns this area to track your request for the REST API. Link to comment Share on other sites More sharing options...
Recommended Posts