Post

2 followers Follow
0
Avatar

What does this error mean?

I wrote a CA that tries to approve multiple Timesheet entities, but it causes this error:

What does it mean?

Lance Luvaul Answered

Please sign in to leave a comment.

9 comments

0
Avatar

What is it supposed to do? It appears like the action your wrote runs on items and their related items and it's expecting them to match in quantity.

Guy 0 votes
Comment actions Permalink
0
Avatar

Guy, see the CA in the application I just packaged and published to the Apps Marketplace, or click here to install it https://app2.clarizen.com/Clarizen/View/Default.aspx?id=5jzovi616mfpm8pvxy97ndee816111&type=Published+Application&ver=v6

Just look at the CA, that's the part that's failing (I included all the related customizations just to give you some background if you wanted).  The CA runs on a user-selected Timesheet entity.  When the CA is triggered on a Timesheet, it looks for all the other Timesheets reported by the Reporter, filters most out, and changes the State of the remaining Timesheets to Approved.  The filter criteria discards Timesheets that are not in the same week as the originating Timesheet, that are not Submitted, and those for which the CurrentUser is not authorized to approve (Direct Managers of the Reporter are not authorized to approve based on the value of C_DirectManagerApprovals).

Lance Luvaul 0 votes
Comment actions Permalink
0
Avatar

It looks like you are hitting some sort of API limit with the rule. I'm reading this as you trying to run an action on 1,501 records when you only have 1,500 API calls left for the day (most actions on an object use at least one call). Can you restrict the rule to run on fewer records and see if the rule runs?

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

Josh, I'm filtering related items ($ReportedBy.ReportedTimesheets) using the following: Year($ReportedDate)=ThisYear && Week($ReportedDate)=ThisWeek (where ThisYear=Year(selectedTimesheet's $ReportedDate) and ThisWeek=Week(selectedTimesheet's $ReportedDate)

This should filter out all Timesheets but those that exist in the same week as the selectedTimesheet which, for the test I ran which produced the error, should only have been 2 other Timesheets.  I don't understand why it thinks there should be 1500 executions.

The wording in the error, "number of related objects (1501)" makes me think that's the number of *unfiltered* $ReportedBy.ReportedTimesheets.  Is that your understanding too?

Lance Luvaul 0 votes
Comment actions Permalink
0
Avatar

Hmm, that would make sense. Even if no action is completed, all records need to evaluated for the query... but I don't think that would count as 1,500 calls if the action runs. Do you have any test timesheets that can be deleted to bring the count down to 1499?

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

Well, if I understand correctly and $ReportedBy.ReportedTimesheets lists all Timesheet objects $ReportedBy (which was me during the test I ran) has ever reported, then the number of such objects should be 4369 according to a Clarizen Excel Addin report I just ran.  That's too many to delete to get the number down below 1500.

Lance Luvaul 0 votes
Comment actions Permalink
0
Avatar

Guy/Josh, I need to get this working ASAP as it is severely hampering our new approval workflow.  Can you elevate it in priority with the dev team to find out what limit or restriction I am bumping up against?  My boss recently ran it against a timesheet for an entirely different user (not me) and got exactly the same error message, same numbers and everything.  I checked (via Clarizen Excel Addin) and this person has a different number of reported Timesheets than me, so the 1500/1501 number isn't referring to the number of ReportedTimesheets.  Thanks, Lance

Lance Luvaul 0 votes
Comment actions Permalink
0
Avatar

1501 could be the highest number the system will count and display in the message. Can you please submit a support ticket and we'll open an official investigation. 

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

Ok Josh, I used the [Submit a Request] button at the top of the Clarizen Success page (I assume that's how I "submit a support ticket"?): Request #32146

Lance Luvaul 0 votes
Comment actions Permalink