Newer Version Available

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

SourceMember (Beta)

Represents a single sObject of all source that you are tracking in a scratch 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 scratch org. Available in Tooling API version 40.0 and later.

Supported SOAP Calls

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

Supported REST HTTP Methods

GET, HEAD

Fields

Field Details
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.
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.
RevisionNum
Type
int
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
The revision number of the sObject that this SourceMember represents.

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