I have a somewhat complex requirement. We have implemented variations in our project. Now, when a page is created in the source site, we want to assign a unique id to this page. When this page is propagated to the target variation site, we don't want to change it's value and this would help us to create a relationship between the source page and all its target variations (SharePoint internally maintains some relationship but we can't use it because it is not available via JSOM/REST and we can't use SSOM).
Now, we can use a workflow to get the GUID of the created page and assign it to my column (PageArticleID). But, there are 2 issues here.
We already have a publishing approval workflow (OOTB) defined on this library.
If i try to copy and modify the OOTB publishing approval workflow, I am facing another issue. I have to check out the page, assign the GUID to my column and check the page in. But, SharePoint throws an error : the operation failed because the action requires the document to be checked out.
I am not sure is this the expected behavior of SharePoint.
Is there a way we can handle this scenario?
Thanks in adcance.