Skip to main content

#Validation0 diskutieren mit

Is anyone using Rollup Helper's 'Enable Validation Rule Helper' flag?

 

Great to see this feature exists... but I can't get it to work.

 

The idea is that Rollup Helper should be able to update records without triggering your standard validation rules. To enable the feature, I have ticked 'Enabled Validation Rule Helper' checkbox in the custom setting and, as instructed, added the criteria '$Setup.rh2__PS_Settings__c.rh2__Run_Validation_Rule__c' to my validation rules on Account. (Just to add, I have also left 'Run Validation Rule' ticked in the custom setting as this is what the helptext says to do.)

 

But I can see from the Exceptions that Rollup Helper is still triggering validation rules.

 

Any tips on what I need to tweak to get this feature to work?

 

Edit: I am using the free version of RH in case this is relevant.

4 Kommentare
  1. 5. Aug. 2025, 13:45

    Hello Manisha, 

     

    If you were to permanently uncheck Run Validation Rule in your custom settings, your validation rules would not longer apply in any context.  

     

    This is why we do not recommend modifying this setting, as it would be best to disable the validation rule directly if this was desired.

0/9000

I have completed the steps in the Create Validation Rules section of the Customize a Salesforce Object Module. However, every time I try to verify the step, I get the following message, even though I have redone and triple checked my work and can't find any errors: "Step not yet complete in Brave Shark Playground. An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team." A screenshot of the issue is below. 

 

I have successfully completed all the previous steps in the module, so the error is not from any previous steps. I have tried all the recommendations in previous posts regarding this same issue, including editing the field dependency created earlier, and none of them have worked. Some people recommend deactivating the validation rule created, but the validation rule has to be active for the challenge to be successfully completed. Additionally, this last challenge is dependent on all the previous ones in the module, and I do not want to have to duplicate all that work in a different playground, especially since I don't know what's gone wrong and the exact same error message might occur.

 

How do I fix this issue? 

Create Validation Rules error message

11 Antworten
0/9000

when i verify my work in  Customize a Salesforce Object  Create Validation Rules 

then i got some error  An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team. 

3 Antworten
  1. 27. Dez. 2023, 18:58

    Hi @Abhishek Kumar,

     

    Hope you are doing well.

     

    I am from the Trailhead help team. We tried checking this from our end in the backend and see that you have successfully completed 'Customize a Salesforce Object' Trailhead.

     

    May I request you please let us know if any of the above responses helped you resolve the issue? If yes, kindly share the solution that helped you resolve the issue so that it might help the fellow Trailblazer's who are facing the similar issue.

     

    Thank you!

    Nagendra Babu Pilli

    Trailblazer Help

0/9000
I have a custom button that I would like to validate against the Status field. 

If Status does not equal "Approved by Business Manager" return an error message. 

I have tried the following but does not work:

IF({!ISPICKVAL( Invoice__c.Status__c , "Approved by Business Manager")},

/apex/loop__looplus?sessionId={!$Api.Session_ID}&eid={!Invoice__c.Id}

&ddpids=a0Z50000009UjxA&deploy=a0Y500000091MwT

&contactid=0035000002ZrYHU,

Alert('Value can only be Approved by Business Manager'))

5 Antworten
  1. 26. Jan. 2016, 22:02
    If you have your custom button setup to execute JavaScript you can try this:

     

    if(!{!ISPICKVAL(Invoice__c.Status__c, "Approved by Business Manager")}){

    alert('Value can only be Approved by Business Manager');

    }else{

    window.open("/apex/VF_Example?sessionId"+{!$Api.Session_ID}+"&eid="+{!Invoice__c.Id}+"&ddpids=a0Z50000009UjxA&deploy=a0Y500000091MwT

    &contactid=0035000002ZrYHU", "_blank");

    }

     
0/9000

Hello.

 

I always have issues with Salesforce Validations. Something in my head doesn't compute the logic that has to be used. Can someone translate this into something Salesforce implements correctly?

 

ISCHANGED(Approved__c)

&&

( TEXT(Application_Fee__c) <> "PAID" ||

Status__c <> "Awaiting Approval" ||

Examination_Mark__c < 75)

 

So in human speak

 

If approved is changed

AND

(

Application fee not PAID

OR

Status not Awaiting Approval

OR

Examination Mark less than 75

)

 

Then do not allow the change to occur.

 

Using more than one || declaration does't seem to work in validations for some reason

 

Any assistance very much appreciated.

Sandy

 

#Validation 

1 Kommentar
0/9000

@* Salesforce Administrators * Hey everyone, I'm wondering about the use of the "NOT" function in this validation rule. For instance, if I enter an account number like "3423423AF," the "ISBLANK" function will give us "True," but then the "NOT" function will flip it to "False." Similarly, the "ISNUMBER" function will give "False," and "NOT" will change it to "True." Consequently, the "AND" function returns a value of "False," indicating that it's a valid value.

 

Could someone please help me understand what I might be missing here?

 

#Salesforce #Validation #CRM Configuration

Understanding Validation Rules

5 Antworten
  1. Michael Brown (Salesforce) Forum Ambassador
    20. Okt. 2023, 18:45

    So, if you enter 3423423AF, ISBLANK will render false, because a value is populated, and then the NOT of that will make that condition true. 

     

    So, the following would be true:

     NOT(ISBLANK(3423423AF)) = NOT(FALSE)= True

    ISNUMBER will render false for 3423423AF, since it contains text, so 

     NOT(ISNUMBER(3423423AF)) = NOT(FALSE)= True

    The AND condition then requires both of these conditions to be true, which means that the validation rule will fire if:

    AccountNumber is populated with a value (via the ISBLANK function)

    and that Account Number is not a number (via is ISNUMBER function)

0/9000

We have a requirement-

If anyone create record from the UI/manually it should check the ISBLANK(Field_1__c)  if yes than it reflect the error.

AND

If the record is created by automation method than Field_1__c is not required.

AND

If anyone trying to update any existing record than it should check the ISBLANK(Field_1__c)  if yes than it reflect the error.

 

#Validation Rule #Validation 

2 Antworten
  1. 12. Okt. 2023, 09:56

    Hello @Abhishek Kumar Singh,

     

    Try This:

    AND(

    NOT(ISBLANK($User.UIThemeDisplayed)),

    OR(

    ISNEW(),

    ISCHANGED(Field_1__c)

    ),

    ISBLANK(Field_1__c)

    )

    This validation rule will display an error message if the Field_1__c field is blank and the record is being created or updated from the UI, but not if the record is being created by automation.

     

    The $User.UIThemeDisplayed a global variable to check if the record is being created or updated from the UI or by automation. This variable returns the name of the UI theme that the user is using, such as "Theme4d" for Lightning Experience, or "Theme3" for Salesforce Classic.

     

    https://help.salesforce.com/s/articleView?id=sf.dev_understanding_global_variables.htm&type=5

0/9000

Hi there!

I have two sections (Verification and Measurement) on the Account object that I need to only show up when the "Servicer" checkbox is selected. These sections have about 15 fields each. Now these sections are only relevant to the record type "Customer" which isn't a page view so I'm curious how to accomplish this. Should I do a validation rule for each field? Can I make both sections appear in bulk? Does it matter if it's in a record type versus a page layout?

 

Thank you so much!

 

#Record Types #Validation #Validation Rule #Dynamic Content

2 Antworten
  1. 20. Sept. 2023, 17:09

    Hi @Kate D you can use Dynamic lightning pages and use filters to achieve your goal.

    You can learn more about this here: https://help.salesforce.com/s/articleView?id=sf.lightning_page_components_visibility.htm&type=5

     

    Basically you can put those sections as components to the page, set the filter for the field Servicer to be true and then that section would appear on the page layout.

0/9000

I have updated my below validation rule not triggere when the record type is business.

 

But it is not working.

 

Can anyone please check this validation rule and let me know what I should change here to work .

 

!$Setup.Rule_Bypass__c.Disable_Validation_Rules__c && ($UserRole.Name<>"Administration") && ( (Created_from_Lead__c = FALSE && (ISBLANK( ShippingStreet) || ISBLANK(ShippingCity) || ISBLANK(ShippingCountry))) || (ISCHANGED( ShippingStreet)|| ISCHANGED(ShippingCity) || ISCHANGED(ShippingCountry)) && (ISBLANK( ShippingStreet) || ISBLANK(ShippingCity) || ISBLANK(ShippingCountry)) && NOT ( RecordType.DeveloperName = "Business" ) )

 

#Trailhead Challenges #Salesforce Developer #Flow #Trailhead #Validation Rule

6 Antworten
  1. Manoj Nambirajan (Dell Technologies) Forum Ambassador
    6. Sept. 2023, 11:51

    @Jack Jack can you try adding ISNEW() to the validation rule and see? you can possibly trim your validation rule as below

     

    AND (

    ISNEW(),

    !$Setup.Rule_Bypass__c.Disable_Validation_Rules__c,

    ($UserRole.Name<>"Administration"),

    NOT(Created_from_Lead__c),

    OR(

    ISBLANK( ShippingStreet), ISBLANK(ShippingCity), ISBLANK(ShippingCountry)),

    NOT(Recordtype.Name = "Business")

    )

     

    Looking at your past response.. above rule is what i understand as the approach

0/9000

Hello @all.

 

I have the following request and could use a little help from the experts around here :)

On an opportunity there are different products. I already have a roll-up-summary-field which counts the quantity of the opportunity products (like 18,00 or 65,00 etc).

 

And here comes the fun part: I need this number auto populated in a dedicated custom field without the dezimal format and only if the products have a dedicated productnumber.

 

If the selected products have a diffrent product code then ignore the rule. It screams validation rule but I´m fairly unexperienced when it comes to this kind of logic.

 

Is there a good samaritan who knows how to write that?

 

Kind regards.

Alex

 

#Validation Rules #Sales Cloud #Formulas #Automation

5 Antworten
  1. Steven Trumble (Strum Consulting) Forum Ambassador
    14. Feb. 2023, 20:44

    That helps a bit. Still not sure on the "dedicated product number" part.

     

    If there is only one dedicated product numbers then you should be able to add it to Filter Criteria section. I don't think you'll be able to do multiple as filter criteria is AND operator only

     

    If you use roll-up summary you cannot remove the decimals. https://ideas.salesforce.com/s/idea/a0B8W00000GdcUQUAZ/control-decimal-places-on-rollup-summary-fields

     

    I think you need  to create this with flow or a different rollup tool (DLRS, rollup helper).

     

    Flow instructions: https://www.salesforceben.com/create-roll-up-summary-fields-using-salesforce-flow/

     

     DLRS Documentation

0/9000