1

I have two custom objects Event & it's child Event_Attendee. Now I have a Mobile ID field on Event_Attendee based on which I need below validation Rule.

OR(AND(Event_Attendee_Count__c  > 1 , 
   Mobile_ID_vod__c=null),AND(Event_Attendee_Count__c = 1, 
   Mobile_ID_vod__c!=null))

How to capture child object's field value in parent object? Event_Attendee_Count__c is Roll Up Summary field on Event that counts number of Attendee records on Event.

2
  • There can be multiple attendeed exactly which child Mobile Id field value you will be needing?
    – snehakem
    May 27, 2015 at 6:02
  • I can have any Mobile ID value if there are multiple Event Attendees with Mobile ID value May 27, 2015 at 7:18

2 Answers 2

2

Judging from your question, you don't necessarily require the mobile ID field value but you want to know whether it's filled in any of the child records.

In order to find out, create an additional rollup summary field (e.g. Mobile_ID_Count__c) that does a count of Event_Attendee__c, but in the roll-up field's filter criteria select Only records meeting certain criteria should be included in the calculation. Then filter for Mobile ID Not equal to ''.

This will give you the total number of event attendees with a Mobile Id. You can then change the validation rule to something like this:

OR(AND(Event_Attendee_Count__c  > 1 , 
   Mobile_ID_Count__c=0),AND(Event_Attendee_Count__c = 1, 
   Mobile_ID_Count__c>0))
0

I think you can do this by defining Event_Attendee_Count__c as COUNT(RowCount), in other words, to count the number of Event_Attendee records.

1
  • I have made it COUNT() Roll - Up Summary field May 27, 2015 at 7:19

You must log in to answer this question.

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