Soru

Zorluk: ZorFormula Fields and Roll-Up Summary Fields

An administrator at a cloud software company manages a custom parent object, Software_License__c, and a custom child object, User_Assignment__c, which are currently linked by a Lookup relationship. The business requests a real-time summary field on Software_License__c to display the total count of related User_Assignment__c records. When attempting to create a Roll-Up Summary field on Software_License__c, the administrator notices that the Roll-Up Summary field type option is grayed out and unavailable. Which configuration change must the administrator make to enable native Roll-Up Summary fields on Software_License__c?

  1. Convert the Lookup relationship field on User_Assignment__c to a Master-Detail relationship after ensuring all existing child records have a populated lookup field value.Cevap
  2. B
    Create a cross-object formula field on Software_License__c that uses the COUNT() function to aggregate related User_Assignment__c records.
  3. C
    Change the Organization-Wide Default (OWD) sharing setting on User_Assignment__c to Controlled by Parent to automatically enable roll-up capabilities.
  4. D
    Build a validation rule on Software_License__c to calculate and enforce the count of related child records whenever a license is saved.

Cevap

Convert the Lookup relationship field on User_Assignment__c to a Master-Detail relationship after ensuring all existing child records have a populated lookup field value.
Native Salesforce Roll-Up Summary fields require a Master-Detail relationship between objects. To convert a Lookup relationship into a Master-Detail relationship, all existing child records must have a value populated in the lookup field.

Adım Adım Çözüm

1
Analyze relationship requirements for Roll-Up Summary fields
Identify that native Roll-Up Summary fields require a Master-Detail relationship between the parent (master) and child (detail) objects.
Salesforce declarative Roll-Up Summary fields cannot be created on parent objects connected strictly via a standard Lookup relationship.
2
Evaluate prerequisite steps for relationship conversion
Ensure that every existing child User_Assignment__c record contains a valid reference in the lookup field.
A Lookup relationship field cannot be converted to a Master-Detail relationship if any existing child records contain null values in that field.
3
Perform conversion and field creation
Change the relationship type to Master-Detail and create the Roll-Up Summary field on Software_License__c.
Once converted, the master object enables the creation of native aggregate fields such as COUNT, SUM, MIN, and MAX.

Anahtar Kavram

Master-Detail Relationship Requirement for Roll-Up Summary Fields
Bu soruyu puanla