• EricB
  • NEWBIE
  • 173 Points
  • Member since 2004

  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 58
    Replies
Hi,
 
According to help if i want to make my account name unique i need to make sure my syntax is "name" in validation rules. But it doesnt seems to work as validation rules will only return true/false. Did I make any mistake? Please help me.
 
Thanks
 
 
 
 
Hi

I get the following error message when trying to download this app.  Is there some advice you could give me in order to help?

Thank you

Andrea

--------------------------

Your requested download failed. Please try this again.

 

None of the data or setup information in your Salesforce organization should have been affected by this error.

 

If this error persists, contact Support through your normal channels.

Your requested download failed. Please fix the following error(s) or obtain a fix and try this again.

 

If this error persists, contact Support through your normal channels.

 

 

 

Problem:

 

1. Apex Class(01p70000000CimN) tom_test_pay_cycle_boundaries.test_pay_cycle_management()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_pay_cycle_boundaries.test_pay_cycle_management: line 19, column 40

 

2. Apex Class(01p70000000CimW) tom_test_overlap.test_overlap()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_overlap.test_overlap: line 8, column 40

 

3. Apex Class(01p70000000CimX) tom_test_pay_cycle_no_processing.tom_test_pay_cycle_no_processing()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_pay_cycle_no_processing.tom_test_pay_cycle_no_processing: line 13, column 40

 

4. Apex Class(01p70000000CimV) tom_test_payroll_systems.test_payroll_systems()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_payroll_systems.test_payroll_systems: line 15, column 40

 

5. Apex Class(01p70000000CimP) tom_test_pay_cycle_mgmt.test_pay_cycle_management()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_pay_cycle_mgmt.test_pay_cycle_management: line 13, column 40

 

6. Apex Class(01p70000000CimS) tom_test_pto_bal_bulk_del.test_pto_balance_validation_with_bulk_delete()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_pto_bal_bulk_del.test_pto_balance_validation_with_bulk_delete: line 8, column 40

 

7. Apex Class(01p70000000Cima) tom_test_bulk_tors.test_bulk_ops_on_time_off_requests()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_bulk_tors.test_bulk_ops_on_time_off_requests: line 8, column 40

 

8. Apex Class(01p70000000CimJ) tom_test_bulk_time_off_info.test_bulk_time_off_info()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_bulk_time_off_info.test_bulk_time_off_info: line 10, column 35

 

9. Apex Class(01p70000000CimL) tom_test_user_no_manager.test_time_off_request_for_user_without_manager()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_user_no_manager.test_time_off_request_for_user_without_manager: line 9, column 40

 

10. Apex Class(01p70000000Cimb) tom_test_error_conditions.test_package_error_conditions()

System.QueryException: List has no rows for assignment to SObject

Class.tom_test_error_conditions.test_package_error_conditions: line 10, column 31

 

11. Apex Class(01p70000000CimT) tom_test_pto_bal_validation.test_pto_balance_validation()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_pto_bal_validation.test_pto_balance_validation: line 8, column 40

 

12. Apex Class(01p70000000CimZ) tom_test_status_changes.test_time_off_request_status_changes()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_status_changes.test_time_off_request_status_changes: line 9, column 40

 

13. Apex Class(01p70000000CimR) tom_test_record_type_errors.test_record_type_errors()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_record_type_errors.test_record_type_errors: line 8, column 40

 

14. Apex Class(01p70000000CimK) tom_test_cancellation.test_cancellation()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_cancellation.test_cancellation: line 15, column 40

 

15. Apex Class(01p70000000CimO) tom_test_requested_day.test_requested_day_trigger()

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, 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 23

Trigger.time_off_info_trig: line 6, column 31

Class.pto_tests_common.get_test_user_ids: line 124, column 9

Class.tom_test_requested_day.test_requested_day_trigger: line 8, column 40

 

 

 

Thank You,

salesforce.com

experience success

http://www.salesforce.com/

Hi there,

I already have the validation rule created for Phone Validation field - 10 digits with 4 digits extension? This works great. But would also like make sure, that it also checks for International Format.

AND(LEN(Phone) <> 0,
NOT (
AND(

LEFT(Phone,1)="(",
MID(Phone,5,1)=")",
MID(Phone,6,1)=" ",
MID(Phone,10,1)="-",


CONTAINS("0123456789", MID (Phone, 2, 1)),
CONTAINS("0123456789", MID (Phone, 3, 1)),
CONTAINS("0123456789", MID (Phone, 4, 1)),
CONTAINS("0123456789", MID (Phone, 7, 1)),
CONTAINS("0123456789", MID (Phone, 8, 1)),
CONTAINS("0123456789", MID (Phone, 9, 1)),
CONTAINS("0123456789", MID (Phone, 11, 1)),
CONTAINS("0123456789", MID (Phone, 12, 1)),
CONTAINS("0123456789", MID (Phone, 13, 1)),
CONTAINS("0123456789", MID (Phone, 14, 1)),

OR(AND(LEN(Phone)<=20,MID(Phone, 15,2)=" x",

CONTAINS("0123456789", MID (Phone, 17, 1)),
CONTAINS("0123456789", MID (Phone, 18, 1)),
CONTAINS("0123456789", MID (Phone, 19, 1)),
CONTAINS("0123456789", MID (Phone, 20, 1))
), LEN(Phone)<=14
)
)
)
)


What needs to be added ?

I got this from the doc:-

LEFT(Phone, 1) <> "+"

Also, if I add the above logic would it not conflict with the 10 digit rule?




Where can I find the documentation on building the "regex_text" part of the REGEX function? All I can find in Help/Training/Release Notes is  a few examples of a working formula. There is nothing that explains the different characters and codes that can be used in the "regex_text" part of this function.
 
Syntax:
REGEX(text, regex_text)
 
Instructions:
Replace text with the text field, and regex_text with the regular expression you want to match
 
Examples:
REGEX(Drivers_License__c, "([A-Z]\\d{7})?")
REGEX(BillingPostalCode, "\\d{5}(-\\d{4})?")
REGEX(Credit_Card_Number__c, "(((\\d{4}-){3}\\d{4})|\\d{16})?")
REGEX(IP_Address__c, "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$" )
REGEX(Social_Security_Number__c, "[0-9]{3}-[0-9]{2}-[0-9]{4}")
ppl...I have this task of modifying a lot of reports with the same custom summary formula. Finding no better way I am going thru each report making the changes. Is there a better and efficient way for this??
In case you haven't heard, we've added some cool new functions in the Spring '08 release to help you write more powerful validation rules.
  • VLOOKUP Function: Similar to its Excel counterpart, the VLOOKUP function lets you use data in another object as a basis for validation.  For example, to validate the zip code in a contact address, you could use the VLOOKUP function in a contact validation rule to search for a match in a custom object containing a list of valid zip codes.
  • ISNUMBER Function: The ISNUMBER function provides a simple way to tell if data entered in a text field only contains numbers, which is required for many types of identification numbers like credit cards and account numbers. 
  • REGEX Function: Regular expressions are a powerful tool used by programmers to find patterns within bodies of text.  The REGEX function gives you access to regular expressions in your validation rules.  This may be useful to validate complex number formats, like IP addresses, country-specific postal codes or phone numbers, tax IDs, and so on.
Check out the Advanced Validation Rules page on successforce for more information.
 
For your reference, here are links to the function documentation in the online help.
VLOOKUP function
ISNUMBER function
REGEX function

Cheers,
Eric Bezar
Force.com product management

I have a custom formula field called forecast.  My formula for it is:    IF(ProbabilityFW__c > 75, ProbabilityFW__c * Opportunity_Amount__c, Opportunity_Amount__c)
What im trying to do is to say that IF my probability field (ProbabilityFW_c) is greater then 75% then the forecast field should show that probability times the Amount (Opportunity_Amount_c).  IF the Probability is less then 75% i want the forecast field to equal the Amount (Opportunity_Amount_c).
The problem is that no matter what my (ProbabilityFW_c) equalls above 75% or below i still only get the Amount value and not Amount times Probability for above 75%.
I can not figure out what I am doing wrong.
Hello,
 
I am trying to set up an Account field validation rule that requires all accounts created after 06/01/2007  have an address in order to save the record.
 
The logic I am using is as follows:
 
And (
     CreatedDate > DATEVALUE("2007-06-01"),
OR(
  LEN(  BillingStreet  ) = 0,
  LEN(  BillingCity ) = 0,
  LEN(  BillingState  ) = 0
)
)
 
The problem is whenever I reference the "CreatedDate" field I get the following error:  Error: Incorrect parameter for function >(). Expected DateTime, received Date.  If I change this to another date based field on the account object there is no error. 
 
I appears I am doing something wrong as it pertains to the "CreatedDate" field.  Anyone have any insight?
 
Todd B.
Hello All

I am trying to create a validation rule that says:
If Date_c Today or is null and Service_c is true error is triggered. This is the formula but it doesn't work if the date field is null.

AND( Date__c TODAY(), Service__c, true)

Any help would be appreciated.
I am confused about the new Roll-up fields.  I would like to have an account field that gives me the total number of cases related to the account, can the new Roll-up fields do this?  If not how can I easily get this number on the account page?
Can anyone help me calculate a contact's age by using the Date of Birth field?
 
Thanks in advance,
 
David
Hi,
I'm trying to sum up certain fields containing dates, but I always get the syntax following syntax error: Error: Incorrect parameter for function +(). Expected Number, received Date
 
I know it must be something really simple, but I just can't seem to get it done!!
 
Any help would be greatly appreciated.
Hello -
 
I have a client who wants to add a stoplight image next to a custom "STATUS" field. I found this formula in the help section of the Salesforce site: IMAGE(image_url, alternate_text, height, width)
 
However, this formula directs you to find an image URL. Is it possible to insert an image from a saved file such as a gif or jpeg? Does the image have to be linked to a URL to insert?
 
Any input is appreciated.
 
Thanks!
Hi All,

I was looking at the screencast for PTODemo (Time Off Manager App). I am very impressed with it. I am wondering if it is available for public use. One thing I am still wondering how to do, I noticed that after the demonstrator clicked on "Submit for Approval", the button (along with a few others) will no longer showing when next time the document opens. How to do that? Anyone?


Hi Formula Authors,
Now that the Winter ’07 release is here, I wanted to alert you to some key formula enhancements in the release.  

Language changes
  • Max formula size increases from 1000 to 1300 characters.  (No change in the max compiled size limit of 4K)
  • No more curly braces on merge fields in formulas:  {!AccountName}  --> AccountName
  • Access to “global variables” in formulas: $Organization, $User (current user), $Profile (current user's profile), $UserRole (current user's role)
  • Access to Record Type field ($RecordType.Name)
New functions
  • DATEVALUE(datetime), DATEVALUE(text) – Convert a datetime field or a text field to a date field
  • FIND (start_text, text [, start_num]) - return the position of the string search_text within the string text
  • SUBSTITUTE (text, old_text, new_text) - find instances of the string old_text in the string text and replace with new_text
  • BR() – insert a line break in a text formula
  • MIN( num1, num2, num3,…) , MAX( num1, num2, num3…) – return the min or max value from the input parameters
  • New functions for validation rules: ISCHANGED (field), PRIORVALUE (field), ISNEW()
  • Advanced functions for S-Control scripting: LINKTO, URLFOR, INCLUDE, GETRECORDIDS
Other enhancements
  • HYPERLINK formulas can now use any protocol handler (e.g., "javascript&colon;" instead of "http:")
  • IMAGE formulas now work in email and mail merge (Microsoft Word) templates
  • TEXT function now accepts datetime values as well as numeric values
Formula Editor changes
  • Field Type picklist allows selection of object (current object, $profile, $user, etc.)
  • Insert Operator is now a menu button instead of separate buttons for each operator
New uses for formula expressions
We are now leveraging our formula language in a number of new and powerful ways. 
  • Workflow field update actions (Enterprise & Unlimited Edition) - set and store field values in currency, number, percent, text, date, and date/time fields based on a formula expression
  • Validation rules - Boolean formula expressions that can prevent incorrect data from being saved
  • Default field values - initial values to be populated in fields when new records are created
  • Server-side formula expressions for S-Controls
For more details, please check out the Winter '07 Release Notes, available from the Help and Training link in the application banner.

Regards,
Eric Bezar
Platform Product Management



Hi All,
 
Is it possible to reference a multi-select picklist in a formula?
 
Thanks.
 
Aiden