且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SharePoint 2013设计器工作流检索关联变量值

更新时间:2023-11-18 15:49:40


我们无法使用JavaScript从中访问变量数据工作流启动表单。 SharePoint JavaScript客户端对象模型不提供访问
工作流变量的功能。


数据
存储在SPWorkflowActivationProperties对象中。传递给表单的任何信息都被格式化为XML字符串。要访问这些自定义属性,我们需要编写解析XML字符串的C#代码。


以下是有关如何在SharePoint Server中的工作流中访问关联和启动表单数据的文章。虽然这篇文章适用于SharePoint 2010,但它仍然是
有很好的信息:


https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms566880(v%的3Doffice.14) 跨度>


***的问候,


Linda 张跨度>


Hello,

I must retrieve the value of a association varible in wfinitiation.aspx page. How I can with javascript get the value of association variable in my wfinition.aspx? Can you post an example script?

Regards,

Francesco. 

Hi,

We cannot use JavaScript to access variables data from the workflow Initiation form. SharePoint JavaScript Client Object Model does not provide function to access workflow variable.

The data is stored in an SPWorkflowActivationProperties object. Any information passed to the form is formatted as the XML string. To access these custom properties, we need to write C# code that parses the XML string.

Here is an article about how to access Association and Initiation Form Data in a Workflow in SharePoint Server. Though the article is for SharePoint 2010, it still has good information:

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ms566880(v%3Doffice.14)

Best regards,

Linda Zhang