February 28, 2014

How to show error message from validation rules and triggers in Visualforce page without try and catch block in Salesforce.com?

It is not possible as of now.

Cheers!

4 comments:

  1. this is very stupid... -,, why it is not possible? don't you know apex page messgae?

    ReplyDelete
    Replies
    1. Using apex:Message we can display only custom message not the messages from validation rules and triggers.

      Cheers!

      Delete
  2. my 4th condition is not working. pleas help


    IF(AND(INCLUDES(Business_Unit__c, 'Financial Services'),
    INCLUDES(Business_Unit__c, 'Emerging Business')),
    OR(
    INCLUDES(Delivery_Unit__c, 'Product DU')
    ),

    IF(AND(INCLUDES(Business_Unit__c, 'Emerging Business'),
    INCLUDES(Business_Unit__c, 'Product Business')),
    OR(
    INCLUDES(Delivery_Unit__c, 'Retail Banking'),
    INCLUDES(Delivery_Unit__c, 'C & I Banking'),
    INCLUDES(Delivery_Unit__c, 'Strategic Accounts')
    ),

    IF(AND(INCLUDES(Business_Unit__c, 'Financial Services'),
    INCLUDES(Business_Unit__c, 'Product Business')),
    OR(
    INCLUDES(Delivery_Unit__c, 'Insurance DU'),
    INCLUDES(Delivery_Unit__c, 'Telecom DU'),
    INCLUDES(Delivery_Unit__c, 'Generic DU')
    ),


    IF(AND(INCLUDES(Business_Unit__c, 'Financial Services'),INCLUDES(Business_Unit__c, 'Emerging Business'),INCLUDES(Business_Unit__c, 'Financial Services')),
    OR(
    INCLUDES(Delivery_Unit__c, 'null')
    ),

    IF(INCLUDES(Business_Unit__c, 'Financial Services'),
    OR(
    INCLUDES(Delivery_Unit__c, 'Insurance DU'),
    INCLUDES(Delivery_Unit__c, 'Telecom DU'),
    INCLUDES(Delivery_Unit__c, 'Generic DU'),
    INCLUDES(Delivery_Unit__c, 'Product DU')
    ),

    IF(INCLUDES(Business_Unit__c, 'Emerging Business'),
    OR(
    INCLUDES(Delivery_Unit__c, 'Retail Banking'),
    INCLUDES(Delivery_Unit__c, 'C & I Banking'),
    INCLUDES(Delivery_Unit__c, 'Strategic Accounts'),
    INCLUDES(Delivery_Unit__c, 'Product DU')
    ),

    IF(INCLUDES(Business_Unit__c, 'Product Business'),
    OR(
    INCLUDES(Delivery_Unit__c, 'Retail Banking'),
    INCLUDES(Delivery_Unit__c, 'C & I Banking'),
    INCLUDES(Delivery_Unit__c, 'Strategic Accounts'),
    INCLUDES(Delivery_Unit__c, 'Insurance DU'),
    INCLUDES(Delivery_Unit__c, 'Telecom DU'),
    INCLUDES(Delivery_Unit__c, 'Generic DU')
    ),false

    )))))))

    ReplyDelete
    Replies
    1. Use CASE instead of multiple IFs.

      Post your requirement for this validation rule.

      Cheers!!!

      Delete