Newer Version Available

This content describes an older version of this product. View Latest

SourceMember

Represents a single sObject of all source that you are tracking in an org. Examples of SourceMembers include Apex classes, custom objects, permission sets, and custom applications. Salesforce uses SourceMember objects to track what has changed in your org. Available in Tooling API version 41.0 and later.

Supported SOAP Calls

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

Supported REST HTTP Methods

DELETE, GET, HEAD, PATCH, POST, Query

Special Access Rules

To access SourceMember, turn on Enable Source Tracking in Developer and Developer Pro Sandboxes in the production Dev Hub org. Once turned on, SourceMember appears in sandbox orgs after refresh. Scratch orgs automatically have the SourceMember object.

Fields

Field Details
ChangedBy
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Specifies the username of the user who caused the change that generated a new source member row.
IsNameObsolete
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
If true, the sObject that this SourceMember represents has been deleted. Salesforce never deletes SourceMember objects, even if you delete the sObject that it represents. Salesforce instead marks the SourceMember object as obsolete by setting this field to true. The default value is false.
IsNewMember
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the sObject represents an addition, such as a new custom object or Apex class, to the org (true) or a change to an existing entity (false). Available in API version 50.0 and later. The default value is false.
MemberIdOrName
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The unique ID or name of the sObject that this SourceMember represents. For standard objects, such as Account, Contact, and Opportunity, this field is set to the name. For all other objects, this field is set to the ID.
MemberName
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The API name of the sObject that this SourceMember represents.
MemberType
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
The type of the sObject that this SourceMember represents.
RevisionCounter
Type
int
Description
The revision number of the sObject that this SourceMember represents. Available in API version 47.0 and later.

Salesforce uses the revision number to determine which entities have changed in the org. When you change an entity in your org, Salesforce updates the RevisionCounter field of its associated SourceMember with a value based on an internal revision counter. The counter does not reset when source is pushed to an org.

RevisionNum
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Deprecated in API version 47.0 and later. Use RevisionCounter instead. The revision number of the sObject that this SourceMember represents.

Salesforce uses the revision number to determine which entities have changed in the org. When you change an entity in your org, Salesforce updates the RevisionNum field of its associated SourceMember with a value based on an internal revision counter.