Skip to main content
Solved

When using the API to fetch document history information, how can we choose a specific document?

  • 7 August 2018
  • 1 reply
  • 21 views

We are fetching history information for contract packages on a given quote. We are using the path to get to the contract package and that path is pretty standard. The issue is, some quotes may have more than one contract package. This could be for any number of reasons. In those cases, we end up with Q-#####_FinalPackage.pdf, Q-#####_FinalPackage (1).pdf, Q-#####_FinalPackage(2).pdf and so on. The path will always pick, Q-#####_FinalPackage.pdf (the first one generated), and we need, Q-#####_FinalPackage(2).pdf (the most recent one generated). The developer I'm working with is not sure how to go about doing that. Can we use a wildcard in the path or something else along those lines? Is there some other way to do this?

Thanks!

1 reply

Userlevel 1

Hi. Here is a response from one of our senior solutions engineering resources.

If you're unsure of the name, you would need to load the whole folder that corresponds with the Quote instead, and then sort the result set on modified or created date or whatever makes sense at that point.

There is a REST API call to load a Salesforce folder with the EOS Data and then you can do an expand=Documents to get all the documents in the Salesforce folder. At that point you can loop over the documents returned and determine which one was created most recently.

Reply