1

i have 2 objects,Case(Parent) and Issue (Child). Having master detail relationship..

Issues__c is a roll up summary field that counts the no. of records in issue object.

Here is the rule:

IF
(
AND(RecordType.DeveloperName == "Standard_Case",
Issues__c=0,
OR(ISCHANGED(Status),ISNEW()),
OR(ISPICKVAL(Status, "Closed"),ISPICKVAL(Status, "Duplicate"))
),
true,
false)

Please suggest any idea!

9
  • Can you please add little bit description about how your validation rule should work?
    – Ratan Paul
    May 16, 2016 at 13:02
  • This validation rule should fire an error when a user tries to close a Case record (standard case recordtype) that do not have any issues (child record) associated. same time should not allow the user to update the status as weel, if there are no child records associated.
    – venky
    May 16, 2016 at 13:05
  • 2
    try with this IF ( AND(RecordType.DeveloperName == "Standard_Case", Issues__c=0, ISCHANGED(Status), OR(ISPICKVAL(Status, "Closed"),ISPICKVAL(Status, "Duplicate")) ), true, false)
    – Ratan Paul
    May 16, 2016 at 13:17
  • Could you please let me know, what's problem with this? is there any problem with the IF condition?? could you please guide me here
    – venky
    May 16, 2016 at 15:16
  • 1
    venky ... No there is no problem just you can reduce the code little bit AND(RecordType.DeveloperName == "Standard_Case", Issues__c=0, ISCHANGED(Status), OR(ISPICKVAL(Status, "Closed"), ISPICKVAL(Status, "Duplicate")) )
    – Ratan Paul
    May 16, 2016 at 15:28

1 Answer 1

1
AND(
    RecordType.DeveloperName == "Standard_Case",
    Issues__c=0,
    ISCHANGED(Status),
    OR(ISPICKVAL(Status, "Closed"), ISPICKVAL(Status, "Duplicate"))
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .