Skip to main content
General formatting
Source Link
Derek F
  • 64k
  • 15
  • 54
  • 104

I have 2 custom objects sharing a master detail realtionship. Object A is the parent, Object B is the child. Object B has a lookup field to Account. I want to create a field on object A that will count the number of unique Object B records based on the account look up field on object A 

e.g. If the following are object B records:

  • Acc A
  • Acc A
  • Acc A
  • Acc b

Acc A Acc A Acc A Acc b TheThe total number of records should be 2 considering Acc A has been repeated. Any ideas?

I have 2 custom objects sharing a master detail realtionship. Object A is the parent, Object B is the child. Object B has a lookup field to Account. I want to create a field on object A that will count the number of unique Object B records based on the account look up field on object A e.g. If the following are object B records:

Acc A Acc A Acc A Acc b The total number of records should be 2 considering Acc A has been repeated. Any ideas?

I have 2 custom objects sharing a master detail realtionship. Object A is the parent, Object B is the child. Object B has a lookup field to Account. I want to create a field on object A that will count the number of unique Object B records based on the account look up field on object A 

e.g. If the following are object B records:

  • Acc A
  • Acc A
  • Acc A
  • Acc b

The total number of records should be 2 considering Acc A has been repeated. Any ideas?

Source Link

Count child record with unique value

I have 2 custom objects sharing a master detail realtionship. Object A is the parent, Object B is the child. Object B has a lookup field to Account. I want to create a field on object A that will count the number of unique Object B records based on the account look up field on object A e.g. If the following are object B records:

Acc A Acc A Acc A Acc b The total number of records should be 2 considering Acc A has been repeated. Any ideas?