Skip to content

Instantly share code, notes, and snippets.

@SalesforceBobLightning
Created September 25, 2018 12:04
Show Gist options
  • Select an option

  • Save SalesforceBobLightning/5829dfa2d94708c7e44711cb8660e232 to your computer and use it in GitHub Desktop.

Select an option

Save SalesforceBobLightning/5829dfa2d94708c7e44711cb8660e232 to your computer and use it in GitHub Desktop.
Get SObject type from Record Id
public String getSObjectTypeById(Id recordId) {
return recordId.getSobjectType().getDescribe().getName();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment