Skip to content

Instantly share code, notes, and snippets.

View salesforceHarding's full-sized avatar
💭
!false. It's funny because it's true!

Lee Harding salesforceHarding

💭
!false. It's funny because it's true!
View GitHub Profile

Deploy

sfdx force:source:deploy -x path/to/package.xml

Check deployment.

sfdx force:source:deploy -x path/to/package.xml -c
@salesforceHarding
salesforceHarding / SFDC Picklist contains
Created April 9, 2021 07:56 — forked from jottley/SFDC Picklist contains
Example: Check to see if a Salesforce picklist contains a value
Schema.DescribeFieldResult fieldResult = Contact.title.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
public Boolean contains(String title)
{
for (Schema.PicklistEntry t : ple)
{
if (t.getValue().equals(title))
{
return true;