function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
fiona.c.quick1.388680255843816E12fiona.c.quick1.388680255843816E12 

Time off manager app Apex Trigger Exception Error

Following installation & full configuration of Time Off Manager Force.com application received the following error when trying to add Time Off Balances:

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger time_off_info_trig caused an unexpected exception, contact your administrator: time_off_info_trig: execution of BeforeInsert caused by: ptoPackage.Time_Off_Exception: Exactly one Queue named Time_Off_Manager_Payroll must exist, and instead 0 were found.: Class.ptoPackage.get_payroll_queue: line 107, column 1

When configuring the application there was no Time Off Manager Payroll Queue present as part of the managed package so I created one & configured it according to the installation & configuration instructions but according to the trigger error it does not seem to be recognized (the field name & label are exact).

Does anyone know a patch/fix or do I need to re-install and go through 22 pages of configuration for this application over again?
Ashish_SFDCAshish_SFDC
Hi Fiona, 


There are instructions with screenshots on pg# 16 to configure the Queue, i would suggest you to re do that once and try again. 

5.6. Configure Queue for TOM Admin Team
Time_Off_Manager_Payroll
TOM assigns processed time-off requests to this queue as a way of locking them down. Members of
the queue are able to read these requests.

Assign users who are members of the TOM Admin team to this queue.
If desired, specify a Queue Email address & check the Send Email to Members checkbox.

https://appexchange.salesforce.com/servlet/servlet.FileDownload?file=00P30000006phxHEAQ


Regards,
Ashish

Abhishek Sharma 11Abhishek Sharma 11
Same Problem, i have created a queue as described in 5.6 but still that error persists? Any solution??
Wendy Frame 9Wendy Frame 9
Hi Abhishek, were you able to get past the error?

I also created a Queue, but get the same error:
Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger time_off_info_trig caused an unexpected exception, contact your administrator: time_off_info_trig: execution of BeforeInsert caused by: ptoPackage.Time_Off_Exception: Exactly one Queue named Time_Off_Manager_Payroll must exist, and instead 0 were found.: Class.ptoPackage.get_payroll_queue: line 107, column 1
Wendy Frame 9Wendy Frame 9
I just changed my Queue Label from "Time Off Manager Payroll" to "Time_Off_Manager_Payroll" and now it works.  Apparently the underscores must be included, as the Apex trigger must be referencing the Queue Label, not the Queue Name.