SharePoint Designer 2010 workflow: can't add a lookup column in a custom task process
-
16-10-2019 - |
Question
In a Workflow I'm building with SPD, I want to use a custom task process. One of its field is "Category" which must be selected from a category list.
I create a site lookup column to this category list. The lookup column works fine as it can be used in some custom list.
In SPD, if I add this column to the custom task content type, the form does not open. Here is the error :
SharePoint Foundation General 8kh7 High Impossible de terminer cette opération. Essayez de nouveau. 6b5d55f8-57a6-497c-ade1-54e9f29b0c6d
InfoPath Forms Services Maintenance 82fv Critical The form template failed to load. (User: domain\me, Form Name: Template, IP: , Request: http://here/_layouts/WrkTaskIP.aspx?List=43851640-6a43-4ec4-bd4a-819bb5742731&ID=43&Source=http://lhere/_layouts/WrkStat.aspx?List=268fd43b-539f-40e4-8276-9e0beb5f93b7&WorkflowInstanceID=%257bE9EABD7B%252dBD68%252d4F8B%252d9A64%252d8CFE62F01AEE%257d&IsDlg=1&Web=ccde4a39-5d1b-4d07-b80a-5acc91845572, Form ID: urn:schemas-microsoft-com:office:infopath:workflowInitAssoc:-AutoGen-2011-06-14T11:41:59:647Z, Type: NullReferenceException, Exception Message: Object reference not set to an instance of an object.) 6b5d55f8-57a6-497c-ade1-54e9f29b0c6d
InfoPath Forms Services Runtime 8gec Exception Unhandled exception when rendering form System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.GetRelativeList(WebHolder webHolder, Boolean impersonatedIdentity, Document document) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.GetList(WebHolder webHolder, Boolean impersonatedIdentity, Document document, String siteUrl, Boolean isUrlSetThroughOM, Guid listId) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.<>c__DisplayClasse.<Execute>b__3(Boolean impersonatedIdentity) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String userDomain, String password, CodeToRunUnderImpersonation codeToRun) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterUtil.Impersonate(DataAdapterInformation adapterInfo, String userName, String password, CodeToRunUnderImpersonation codeToRun) at Microsoft.Office.InfoPath.Server.SolutionLifetime.DataAdapterListDataProvider.Execute(String siteUrl, Guid listId, SPContentTypeId contentTypeId, Document document, DataAdapterListDataProvider documentAdapter, Boolean useDcl, XPathNavigator queryFields, XPathNavigator resultFields, Boolean isListItemEditing, Boolean discoveryOnly, Int64& auxDomSize) at Microsoft.Office.InfoPath.Server.DocumentLifetime.DataAdapterListDataProvider.ExecuteInternal(XPathNavigator queryFields, XPathNavigator resultFields, Boolean useListItemMode) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.QueryDataOnLoad(DataAdapter documentDataAdapter, DataObject documentDataObject) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.ExecuteInitOnLoadForDataObjects() at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.LoadSolutionAndDocument(HttpContext context, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.OpenDocumentWithSolution(HttpContext context, SPSite contextSite, Solution solution, DocumentMetaInformation documentMetaInformation, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.DocumentLifetime.Document.NewFromSolution(HttpContext context, SPSite contextSite, Solution solution, DocumentMetaInformation documentMetaInformation, Boolean disableFirstRequestOptization, OnInitializeCallback onInitializeCallback, OpenParameters openParameters) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.DataBindInternal(SolutionMetaInformation solutionMetaInformation, DocumentMetaInformation documentMetaInformation, String absoluteSolutionLocation, Boolean hasCloseHandler, Document& document) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.StartNewEditingSession() at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.EnsureDocument(EventLogStart eventLogStart) at Microsoft.Office.InfoPath.Server.Controls.XmlFormView.<>c__DisplayClass8.<LoadDocumentAndPlayEventLog>b__5() at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) 6b5d55f8-57a6-497c-ade1-54e9f29b0c6d
SharePoint Server Unified Logging Service c91s Monitorable Watson bucket parameters: SharePoint Server 2010, ULSException14, 41b7c39f "infopath forms services", 0e00129b "14.0.4763.0", fd34ba92 "microsoft.office.infopath.server", 0e001408 "14.0.5128.0", 4cadaf53 "thu oct 07 13:30:27 2010", 00001bf9 "00001bf9", 00000044 "00000044", 4a6d3421 "nullreferenceexception", 38676563 "8gec" 6b5d55f8-57a6-497c-ade1-54e9f29b0c6d
Not very helpful :(
If I instead add an integer column, "CategoryID", and customize the form to populate a drop down list with the category list items, it works.
- are lookup columns supported in SPD custom task process
- what am I doing wrong ?
thx in advance
Solution
I was able to solve the problem using these steps :
- create a task form field of type integer "Category"
- in the "before task is assigned event", I set up the category field of the task to my current item value
- in IP, I create a data connexion to my target list, unchecking the extract at load box
- I add a rule to the form load, setting the Query field "ID" of my category data source to the current task field "CategoryID"
- still in the form load rules, I add a data connextion query to update the categories datasource
Working, with a lot of work (not reusable across forms)
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange