Please reload

Recent Posts
Featured Posts

SF Trigger to create Portal user upon creating contact.

March 19, 2017

Requirement Specification: 

We need to create a user record when a contact record is created:

 

 

-Timezone: We need to go and read from the Account's timezone field.

-Current values for timezone are

Pacific
Mountain
Central
Eastern
Alaskan
Hawaiian
New Foundland
Australia/Sydney
 

Any unknown value should be set to "America/New_York"
 

Record must have the following fields populated

 

alias = 'contact.lastName',

email = 'contact.email',

emailencodingkey = 'UTF-8',

firstname = 'contact.firstName',

lastname = 'contact.lastname',

languagelocalekey = 'en_US',

localesidkey = 'en_US',

contactId = 'contact.Id',

timezonesidkey = 'America/New_York' (this value changes)

username = 'contact.email',

CommunityNickname ='contact.lastName'

ProfileId = '00e0Y000001M7qf' (nb; not recommended)

IsActive = true

 

Also we need to test whether the user get's the welcome email.

 

-Test class is required as well.

 

Deliverables

The Trigger

 

 

 Test Class: 100% code coverage

 

 

 

Please reload

Follow Me
Please reload

Search By Tags
Please reload

Archive
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square

Data Visualization with Chart.JS in Lightning Components

October 3, 2019

1/10
Please reload