CAML Query error!

I am trying to get the ID of the last folder created in a Document Library and the workflow always suspends

Hello @may.alfarsi, thank you for your message.

Could you say what product are you using? Plumsail Workflow Actions Pack, is that right?
And what version of SharePoint are you using?

Please could you provide the following information:

  • what workflow action are you using?
  • screenshot of the workflow

I was trying to use the "Get item by Query " Action … reason is to get the lD of the last created item

workflow has this action only … I created it separately to try and retrieve the item …

error as Follows:

RequestorId: 0cf09887-0153-9608-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 500 {“Transfer-Encoding”:[“chunked”],“X-SharePointHealthScore”:[“0”],“SPClientServiceRequestDuration”:[“1732”],“SPRequestGuid”:[“0cf09887-0153-9608-a5a6-83c5d3f7a7d6”],“request-id”:[“0cf09887-0153-9608-a5a6-83c5d3f7a7d6”],“X-FRAME-OPTIONS”:[“SAMEORIGIN”],“MicrosoftSharePointTeamServices”:[“15.0.0.4841”],“X-Content-Type-Options”:[“nosniff”],“X-MS-InvokeApp”:[“1; RequireReadOnly”],“Cache-Control”:[“max-age=0, private”],“Date”:[“Wed, 14 Mar 2018 07:32:48 GMT”],“Server”:[“Microsoft-IIS/8.5”],“X-AspNet-Version”:[“4.0.30319”],“X-Powered-By”:[“ASP.NET”]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Hello @may.alfarsi,

Are you trying to use Log to History List action to log the workflow process?
If so, the error appears because it tries to log every item and there is a limitation on that log field, it is 240 characters.
Try to remove this action and start the workflow again.
If that is not the case please let us know.

i am trying to log the dictionary output from the action I want to check that its getting the right item
the scenario is
I have two lists
the first is the initial request form
the second is the generating some data based on the data entered to the request form

and I am trying to get the latest items created using the CAML Query
and log the ID of the items

that s the only log action I have in my test case

any ideas ??

Hello @may.alfarsi,

It doesn’t really matter how many log actions you have. The point is that there is a 240 characters limit and maybe you are getting so many records that it breaks the workflow. This is a bug in the workflow engine on Microsoft side.
Please, could you remove this log action and see if the workflow will work or not? So we could say if that is the problem.
And if it is I suggest you to use Send Email action to bypass the limit.

if this is the case then it means that my CAML Query is not running right
could you help me in that case to limit the value of the dictionary variable to get the last 10 items ??
and log it ?? or say send the IDs or the last 10 by email ??

Hello @may.alfarsi,

I want to clarify that the limit is not about the amount of the items your query returns but it is about the number of symbols.

To learn more about CAML query and your case specifically I suggest you to read this article.
In case you want to see what will return in that query you could use a workflow which might look like this:


Of course, you will need to change it according to your data.