---
schema_version: "1"
id: eed22a1ab5ffecde3323bf866188ef988b9e0692a185fbfbcd37c38da8d20790
title: LeadOwnerSharingRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_leadownersharingrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_leadownersharingrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: cf488ecd8c584d58a85977ee0639b1a6b2b39838f5e6fb6b91e066fb1ec606c8
description: Represents the rules for sharing a lead with users other than the owner.
---
# LeadOwnerSharingRule

Represents the rules for sharing a lead with users other than the owner.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

To enable access to this object, contact Salesforce customer support. However, we recommend that you instead use Metadata API to programmatically update owner sharing rules because it triggers automatic sharing rule recalculation. The [SharingRules](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_sharingrules.htm) Metadata API type is enabled for all orgs.

## Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()

## Fields

| Field | Details |
| --- | --- |
| Description | 
Type

textarea

Properties

Create, Filter, Nillable, Sort, Update

Description

A description of the sharing rule. Maximum size is 1000 characters. This field is available in API version 29.0 and later.



 |
| DeveloperName | 

Type

string

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Corresponds to **Rule Name** in the user interface.

This field is available in API version 24.0 and later.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance slows down while Salesforce generates one for each record.















 |
| GroupId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID representing the source group. Leads owned by users in the source group trigger the rule to give access.



 |
| LeadAccessLevel | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort, Update

Description

A value that represents the type of sharing being allowed. The possible values are:

- Read
- Edit





 |
| Name | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Label of the sharing rule as it appears in the user interface. Limited to 80 characters. Corresponds to **Label** on the user interface.



 |
| UserOrGroupId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID representing the target user or group. The target user or group is being given access.



 |

## Usage

Use these objects to manage the sharing rules for leads. General sharing and Territory-related sharing use this object.

#### See Also

- [Lead](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_lead.htm "Represents a prospect or lead.")
- [LeadShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_leadshare.htm "Represents a sharing entry on a Lead.")
- [LeadStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_leadstatus.htm "Represents the status of a Lead record, such as Open, Qualified, or Converted.")
- [_Metadata API Developer Guide_: SharingRules](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_sharingrules.htm "
    Metadata API Developer Guide: SharingRules - HTML (New Window)")