Soru

Zorluk: OrtaFormula Fields and Roll-Up Summary Fields

A Salesforce Administrator at a software company tracks user access using two custom objects: Software_License__c (parent) and License_Assignment__c (child). The two objects are currently connected via a lookup relationship. The administrator receives a requirement to display the total count of active assignment records directly on each Software_License__c record page using a declarative field. When trying to create a new Roll-Up Summary field on Software_License__c, the administrator finds that the Roll-Up Summary field type option is disabled. Which action must the administrator take to allow the creation of a Roll-Up Summary field on the parent object?

  1. Convert the lookup relationship field on the License_Assignment__c object to a master-detail relationship after verifying all existing child records have a populated lookup value.Cevap
  2. B
    Create a cross-object formula field on Software_License__c using an aggregate formula function to count related records across the existing lookup relationship.
  3. C
    Change the Organization-Wide Default (OWD) sharing setting on License_Assignment__c to 'Controlled by Parent' to automatically unlock roll-up summary field creation.
  4. D
    Enable the 'Allow Roll-Up Summaries on Lookup Relationships' checkbox within Object Manager settings for the Software_License__c object.

Cevap

Convert the existing lookup field on the child object to a master-detail relationship after ensuring all child records contain populated lookup values.
Standard Roll-Up Summary fields in Salesforce are only supported on the parent object in a Master-Detail relationship. Converting the lookup field on the child object to a master-detail relationship (which requires ensuring all child records have populated lookup values) enables the Roll-Up Summary field type on the parent object.

Adım Adım Çözüm

1
Identify the relationship requirement for native Roll-Up Summary fields.
Native Salesforce Roll-Up Summary fields can only be created on the master object in a Master-Detail relationship.
Lookup relationships do not support declarative roll-up summary fields on the parent object.
2
Prepare data for converting a lookup relationship to a master-detail relationship.
Ensure every existing License_Assignment__c record has a valid parent reference populated in the lookup field.
Master-Detail fields are mandatory on child records; converting a lookup field fails if any existing child record has a blank lookup field.
3
Change the field type of the relationship field on the child object to Master-Detail and create the Roll-Up Summary field on the parent.
The Roll-Up Summary field type becomes available on the parent object (Software_License__c) to count child records.
Once the Master-Detail relationship is established, master objects inherit roll-up capabilities.

Anahtar Kavram

Roll-Up Summary Field Relationship Requirements
Bu soruyu puanla