In this post we will have a look at how to use 'RetrieveUnpublishedMultipleRequest’ and how it works.
RetrieveMultiple : Contains the data that is needed to retrieve a collection of records that satisfy the specified query criteria.
RetrieveUnpublishedMultiple : Contains the data that is needed to retrieve a collection of unpublished organization-owned records that satisfy the specified query criteria. Below are the list of default organization-owned entities that supports RetrieveUnpublishedMultiple message.
We will create a QueryExpression to retrieve web resource named ‘new_unpublishedsample’ which is in saved and un-published state and try to execute the same query using both ‘RetrieveMultipleRequest’ and ‘RetrieveUnpublishedMultipleRequest’ to see the difference between 2 request's.
As you can see in the above screenshot, content value differs in both the response. 'RetrieveUnpublished MultipleRequest' provides the most recent unpublished data, where as 'Retrieve MultipleRequest' provides the last published content of the web resource.
Points to Remember:
These records (SavedQuery, SavedQueryVisualization, SiteMap, SystemForm, WebResource) are automatically published when they are created or deleted. As soon as the records are published, both the message's return the same data.