Today I wanted to perform a render in Publish mode using the 2013 core service. I created a PublishInstructionData
, a RenderInstructionData
and a ResolveInstructionData
and wired them all together correctly. I was able to set the RenderMode of the render instruction to "PreviewDynamic" and successfully call RenderItem
on the core service.
However, when I changed "PreviewDynamic" to "Publish", invoking RenderItem
gave the following error:
Specified argument was out of the range of valid values. Parameter name: renderMode.
This looks like an ArgumentException
, which gives the impression that it's an intentional check. I have not been able to find documentation that indicates you can't use RenderItem
in Publish mode, nor can I think of any reason why such a restriction should exist.
Is it possible to invoke a Publish render from the API? If so, how, and if not, why not?