Month: April 2016

How to develop an app on Force.com Platform

How to develop an app on Force.com platform

In this salesforce tutorial we are going to learn about how to develop an app on force.com platform and what are the different tools we use to develop an app in force.com platform. And also we learn about different applications that are used to analyze and check our code. To develop an app on force.com platform we use certain tools and applications.

How to develop an app on Force.com Platform?

To develop an application by creating code in any modern language is usually done through an IDE(integrated Development Environment). IDE is a simple text editor  which offers many advantages over coding. Now let us know about some Force.com app builder tools that are helpful in Force.com app development. Some of them are

  1. Apex Classes.
  2. Apex Triggers.
  3. Components and
  4. Pages.

Every Salesforce.com user knows that Salesforce.com is one of the best browser-based development environment in the world. In Salesforce development we can delivers core functionalities using desktop-based IDE. To access Force.com app builder tools in Salesforce follow the steps given below.

  • Go to Setup=>Develop.

How to develop an app on Force.com Platform

How to create new Apex Class in Salesforce.com?

  • To create new Apex Class in Salesforce.com, go to Setup=>develop=>Apex Classes.
  • Now click on new button.

Create new apex class in Salesforce

  • When we click on new button a new screen will be opened to create new new Apex Class in Salesforce.com.

How to develop an app on Force.com Platform

  • Now click on Save button.

Here Class name will be the name of the Apex Class as shown below.

How to develop an app on Force.com Platform

Apex Classes and Apex Triggers in this Force.com environment offers similar experience but there are some surprises when developing code in the pages and Visualforce Components. Before creating Visualforce page we have to enable development mode in salesforce. Development mode feature in Salesforce.com allows user to code and view the compiled results within the same browser window.

Check the following links for more details.

How to create Visualforce page in Salesforce.com.

How to insert Visualforce page in another Visualforce page

Embedding Visualforce Page in Page Layouts 

Configuring Visualforce Page as a Tab 

How to enable development mode in Salesforce.com 

Defining Visualforce page as a Template

What is Metadata in Salesforce – Define Metadata

What is Metadata in Salesforce?

Metadata Definition:- Metadata in Salesforce describes the structure of objects and their fields, as well as the page layouts associated with them. Metadata describes many more structures in Force.com. In this salesforce Tutorial we are going to learn about What is Metadata, what is metadata it’s meaning and definition, metadata API types in Salesforce and how metadata is useful?

Define metadata:- Metadata is a simple lightweight language which based on XML (Extensible Markup Language).  Metadata in Salesforce describes the structure of salesforce.com and Force.com development artifacts. Instead of the traditional development approach of code-compile-package-deploy, with Force.com you only need to code. The magic here is that the metadata is zipped and transferred to the Force.com servers (much faster than uploading compiled code) where it is unzipped and compiled on your behalf. Not only is this super fast, but your changes are immediately available through any web browser, and there’s no downtime at all.

What is metadata API.

In Salesforce, metadata types names are case sensitive and does not allow correspond directly to their related data types. Here are the some of the Metadata Types check the following.

AccountSettings ActionLinkGroupTemplate ActionOverride
AddressSettings AnalyticsSnapshot ApexClass
ApexPage ApexTrigger AppMenu
ArticleType AssignmentRules AuthProvider
AutoResponseRules BaseSharingRule BusinessHoursSettings
CallCenter CaseSettings Certificate
CompanySettings Community(Zone) CompactLayout
ContractSettings CorsWhitelistOrigin CriteriaBasedSharingRule
CustomApplicationComponent  CustomFeedFilter  CustomFiled
 Custom Metadata  CustomLabels  CustomObject
 CustompageWeblink  CustomPermission  CustomSite
 Dashboard  DataCategoryGroup  DelagateGroup
 EmailTemplate  Keywordlist  Layout

What is metadata used for – features and benefits.

  1. Force.com is a Metadata driven Architecture hence it enable multitenant applications.
  2. In Salesforce.com everything is exposed to developers and application users is internally represented as metadata.
  3. Metadata is a key ingredient of Force.com applications, the platform’s runtime engine must optimize access to metadata.
  4.  Frequent metadata access would prevent the platform from scaling so metadata in Salesforce is used.
  5. Force.com uses metadata caches to maintain the most recently used metadata in memory.
  6. Metadata avoids performance sapping disk I/O and code recompilations.
  7. Metadata improves application response times.

Storing Application metadata.

In Salesforce.com, custom objects are used to store custom data which stores application metadata Metadata can be managed by custom objects. Custom settings are managed by the following settings.

  • Go to Setup=>App Setup=>Develop=>Custom Settings.

What is Metadata

What is Salesforce Metadata API?

Salesforce metadata API is used to manage our application customizations programatically as well as export and migrate meta data. Force.com Migration tools uses Metadata API to retrieve and modify our organization structure. Salesforce.com has made this asynchronous API available to users so that you can build your own client applications on top of it. Salesforce metadata API can be used by downloading WSDL document. To download Metadata WSDL(Web Services Description Language) follow the steps given below.

  • Go to Setup -> Develop -> API -> Download Metadata WSDL.
What is Metadata in Salesforce

What is Metadata in Salesforce

Now a new page will be opened which displays Salesforce WSDL and Client Certificates and click on Generate Metadata WSDL link.

Salesforce metadata WSDL

In our upcoming Salesforce tutorial we learn about What is metadata management and what is metadata in Java.

What is Salesforce SSO ?

What is Salesforce SSO ?

Salesforce SSO or Salesforce Single Sign on is the process that allows all networks users to access all authorized network resources through single username and password with out having different usernames and passwords for every resources in the network.

Suppose in an organization there are different number of systems, applications  and resources which are to be accessed by every user. To access those resources in that organization the user must login to that application with that username and password. If he wants to access more number of resources it may be difficult to remember those passwords. To eliminate such type of issues SSO is implemented.

Advantages of Salesforce SSO?

When coming to the benefits of Salesforce SSO,we have number of benefits. The following are the benefits to your organization with Salesforce SSO (Single Sign-On).

  1. It reduces Administration costs : No need to remember all usernames and passwords. Salesforce provides resources and external applications just logged in without asking to enter username or password.
  2. Leverage existing Investments : Many of the companies uses LDAP data base to manage their users identities to allow authentication to their systems in their organization. Suppose with the user is removed from LDAP system the user is immediately removed and no longer able to login to their systems.
  3. Time Saving.
  4. Increased User adoption : User who uses Salesforce are more comfortable to send email messages that contains links to information to salesforce.com.
  5. Increased Security.

Different types of Salesforce SSO.

In Salesforce Single Sign On or Salesforce SSO can be implemented by two ways .

  1. Federated Authentication.
  2. Delegate authentication.

What is Federated Single Sign on Authentication.

In salesforce, if Federated single sign on Authentication is enabled then the salesforce does not validate user’s password. Instead of validating user’s password salesforce verifies an insertion in the HTTP POST request and allows single sign on if the assertion is TRUE, if assertion is false salesforce does not allows SSO.

What is Delegate Single sign on Authentication.

Delegate Single Sign-On authentication is the second type of Single sign on in salesforce. If this type is enabled in salesforce allows web services to your organization to establish authentication credentials to the users instead of validating the users passwords.

Authentication Providers.

Authentication providers are those who provide authentication credentials to the users from external service providers. Authentication provide credentials to the users with profiles containing login IP range restrictions, Session Id’s

Single Sign On

Here we are required to setup new Authentication providers  to establish connection. The process of authentication will be like below steps.

  • The users tries to login  in to Salesforce using third party identity.
  • Then login request is redirected to the third party provider.
  • Then the user will be approved to access.
  • The Authentication provider redirects the user to salesforce.
  • Now the user is logged in to salesforce.

How to Enable Salesforce SSO using Saml?

  1. User must establish Saml Identity Provider : Here we send Single Sign On request to Salesforce.
  2. Provide information to identity provider : Here we have to give Login, Log out URl’s
  3. Configuring Salesforce.

 How does Salesforce Trust Identity Provider ?

To establish Single Sign on Salesforce must be connected to Identity Provider.In order to establish relation between Salesforce and Identity Providers salesforce must trust the identity provider. Following is the process is done.Single sign on Using SAML

  • During Configuration, Identity provider gives a digital certificate to salesforce  and in run time Salesforce uses the certificate to validate the digital signature  given by identity provider.

Enabling Salesforce to be Service Provider.

To enable Salesforce as a Service Provider we must do 2 important things.

  1. Download digital signature certificate from identity provider(IdP).
  2. Upload digital signature certificate to salesforce.
  3. Configure salesforce.

 Identity Provider-Initiated SAML Flow during run time.

The user will sign by using Single sign on in to the Idp. The Idp will return a page containing form with saml assertion. Then the user submits SAML assertion to sales force to login. Then the Service Provider (Salesforce) checks the digital signature and grants sessions id.

Single sign on Using SAML

Service Provider-Initiated SAML Flow.

This is the situation where user clicks on the link where to access something in the salesforce and redirect the user back to Idp Successfully.

Single sign on Using SAML

 The end user requests a page at a custom domain for salesforce. Salesforce says you are not logged in. Then the user is logged in to Idp credentials. Then the Idp redirects the user to salesforce with SAML Assertion. Now Salesforce redirects the requested page with session Id to the end user.

Now we are going to create a new Single Sign On in salesforce.

Go to Setup => Administer = > Security Control = > Single Sign On Settings.

Single sign on Using SAML

Enable SAMl. By enabling SAML we can create new Single Sign ON. Edit it and check SAMl Enabled.

Single sign on Using SAML

Save it

Single sign on Using SAML

Now select New button.

Single sign on Using SAML

Before going to fill SAML Single Sign-On Setting details we should have some data . Go to the following URL and Download the Digital certificate which is to be uploaded .

GO to http://sfdc-tandc-saml-ip.herokuapp.com

Salesforce SSO

 Salesforce SSO

Issuer : mockidp.

Entity id : https://saml.salesforce.com

Single sign on Using SAML

Salesforce SSO

Now go to Configure Section shown below.

Single sign on Using SAML

Complete all the details as shown below.

Single sign on Using SAMLSingle sign on Using SAML

Before login Logout From login.salesforce.com

Field Level Security Salesforce – Salesforce Admin Tutorials

Field Level Security Salesforce – Field Level Security Overview.

Field level security in Salesforce is configured for a user’s profile. Using Field Level Security administrator can controls whether a user can see, edit, and delete the value for a particular field on an object. Field level Security in Salesforce are very helpful to assign page layouts to users with out creating new page layout. Page layouts in Salesforce are intended to organize fields, buttons, related list and other data. Using page layouts we can make required field for some profiles and read-only to some profiles using  field level security in SFDC.

Example:-  For Administrative Assistant profile, if we want to remove access to payroll and social security information for obvious reasons. A common mistake we make when restricting access is we simply remove a field from a user’s page layout. This method only controls the visibility of the field on detail and edit pages for the object. To be absolutely certain that a user does not have access to a specific field, we must lock down the field with field-level security. This Field-Level Security in Salesforce removes all access to the field for the API, related lists, list views, reports and other parts of plat. 

To administer Field-Level Security follow the steps given below.

  • Go to Setup=>Administer=>Security Controls=>Field Accessibility.

Field Level Security Salesforce - Salesforce Admin Tutorials

  • Now a list of Object in organization will be displayed. Select the object whose field is to be modified.

Field Level Security Salesforce - Salesforce Admin Tutorials

As shown above we selected Demo Object.

  • Now choose your view. If we select View by field we can access field level security for only one field. If we select View by Profile we can access field level security for multiple fields.

Field Level Security Salesforce - Salesforce Admin Tutorials

  • Now select the field from the drop down and from field accessibility for field click on on the link to edit field access.
    Field Level Security Salesforce - Salesforce Admin Tutorials
  • Now we have two choices for field access to the field date i.e., Visible and Read Only
    Field Level Security4
  • Select Visible to make the field readable and Editable.
  • Select Read Only field to make the field visible but not editable.
  • Finally click on Save button.

To check the field level Security for the object demo Object go to profiles and click on Contract manager profile. Now go to Custom object field-level Security and click on the object.

Field Level Security in Salesforce

Salesforce Login using Google Account

Salesforce Login From Google Account

In our previous Salesforce Tutorial we have learned about Salesforce  password policies. In this Salesforce Training Tutorial we are going to learn about how to login in to salesforce.com account from Google account. In this Salesforce Training we get clear idea about how to connect salesforce and Google account through open ID account.

Fist we have to create a new project for salesforce login in console.developer.google.com. In Google we are given various Keys and Client ID’s. By using those client we make some configurations in Auth providers for salesforce login using Google Account. Follow the steps carefully

Salesforce.com Login From Google Account

salesforce login through google

  • Click on Create Project.

salesforce login through google0

  • Enter project name and project ID will be automatically inserted. Agree all terms and conditions and click on Create button.

salesforce login through google1

  • Go to Credentials under project and select create new client ID.

salesforce login through google2

  • Select application type as Web application and clear all authorized URL and click on Create Client ID.

Now go to Administer=>Security Controls=>Auth.Providers.

salesforce login through google3

Select  New.

salesforce login through google4

salesforce login through google5

Enter all the details as given below.

salesforce login through google6

  • Select Provider type as Open ID Account.
  • Enter name as Google login.
  • Give URL Suffix as Google Login.
  • Enter consumer and Consumer secret key. These keys are available when creating client ID’s.
  • Enter authorize endpoint URL as https://accounts.google.com/o/oauth2/auth.
  • Enter token endpoint URL as https://accounts.google.com/o/oauth2/token
  • Enter user info endpoint URL as https://www.googleapis.com/oauth2/V3/userinfo.
  • Select execute registration handler template.
  • Finally click on SAVE button.

salesforce login through google7

Copy and paste Test-only initialization URL and Callback URL these two URL’s are used in next steps.

Now Edit Client Settings in Google account and paste Callback URL in Authorized redirect URL section and select update.

salesforce login through google8

Now we have to create simple apex class.

Go to setup=>Develop=>Apex Classes=>New.

salesforce login through google9

Select new apex class and write the code given in below screenshot.

salesforce login through google10

Now select Quick Save.

Copy and paste Test-Only Authorization URL in your browser.

salesforce login through google100

A new window will be opened and select Accept button as shown below.

salesforce login through google11

Now a new window will be opened as shown below.

salesforce login through google12

Now provide Single Sign On initialization URL to your organization to login in to salesforce.com account using Google account.

Salesforce login History | Download Salesforce Login History

Salesforce login History

Salesforce login history: – In this salesforce tutorial we are going to learn about how to get salesforce login history, how to download salesforce user login history in CSV format. In our previous Salesforce Administration Tutorial we have learned about different email settings in Salesforce.com.

Every we login in to our salesforce.com account, each time we login in to our salesforce.com login time, IP source , Login types, status, application like browser used to login, Login URL details will be recorded  in salesforce.com

If we use login.salesforce.com to enter in to salesforce.com then that specific URL will be recorded. Every instance that we make in salesforce.com interface is recorded ad can be viewed. We get every details about previous salesforce login history details, salesforce fail login history due to wrong password, password changed history, browser used, login type details will be recorded. If we failed to salesforce login due to invalid password then the status of the salesforce login history will be recorded with Invalid password. Which type of browser is used for salesforce login will be recorded. Login types will be different like application, Remote access Client, Apex API and so on.

 Download your Salesforce login History now.

Go to your name=> My settings.

Download Sfdc Login History

Now go to personal=>Login History. 

login history

Click on Login History tab as shown above. Now we are redirected to new page Salesforce Login History page. In salesforce login history page we can find last login date and our last password change date.

Download Salesforce Login History

To download your salesforce login history click on download login history for last six months, including logins form outside the website  link as shown above in Microsoft excel format.

Read more for salesforce tutorials and administrator interview questions and answers that explains step by step.

Changing Salesforce Login Password

Changing Salesforce Login Password :- In our Previous Salesforce administration Tutorial we have learned about How to edit our email settings in Salesforce.com. In this Salesforce tutorial we are going to learn about How to change our salesforce login password.

Changing Salesforce Login Password

In salesforce.com we can change our salesforce login passwords periodically for better protection. As per salesforce.com password policies we can set number of days to expire user password, Minimum password length, password complexity level, lock out time period.

salesforce login password policies

Salesforce login passwords will expire as per salesforce.com password policies. We can configure user password expire time to different days example 30 days, 60 days, 90 days, 180 days, one year and  Never expire. When the expire date reaches salesforce.com prompts us message automatically to change new password.

Here we have another case where we want to change salesforce.com login password when we lost our password or when we forget our salesforcelogin password. To change salesforce login password follow the steps given below.

Changing Salesforce Login Password

Go to your name=> My settings.

Changing Salesforce Login Password

Click on my settings and Go to Personal Tab.

Changing Salesforce Login Password

Now go to Advanced User Details  as shown below.

Changing Salesforce Login Password

When we click on Advanced User Details we are redirected to new salesforce page  as shown below.

Now click on Change Password link as shown below.

Changing Salesforce Login Password

Click on Change Password.

Changing Salesforce Login PasswordTo change password enter all the details shown above.

  • Enter your old password.
  • Now enter your new password and again enter new password ti verify.
  • Select Any question from picklist.
  • Enter your answer.
  • Finally click on Save button to change your salesforce login password.

Salesforce login password policies

Salesforce login password policies

In our previous Salesforce Tutorial we have learned about how to filter report data to limit add rows. In this Salesforce Training Tutorial we are going to learn about Salesforce login password policies like number of days to expire salesforce login password, Salesforce login password history, Salesforce login password length settings, Maximum invalid login attempts.

Salesforce login password policies

Salesforce login password policies are those setting different salesforce login settings to provide high security settings like password expire days, specifying the time range to login for all users, number of login attempts and lockout periods.

Go to Setup.

Salesforce login password policies

 Now go to Administer=>Security controls=>Password Policies.

Salesforce login password policies

 Now we are taken to new window which is shown below.

Salesforce login password policies

 Salesforce login password policies setting page consists of different fields. They are

  • User passwords expires in.
  • Enforce password history.
  • Minimum password length.
  • Password complexity requirement.
  • Password question requirement.
  • Minimum invalid login attempts.
  • Lockout effective period.
  • Obscure secret answer for password resets.
  • Require a minimum 1 day password lifetime.

User passwords expires in :-  Here we to mention the number of days that the password to exist. After the expire date we have to set new password. Default password expire duration is 90 days.

Enforce password History :-  This option is for remembering previous salesforce login passwords. We have to set unique and new login passwords every time we reset login password. Default is 3 passwords.

Minimum Password Length :- Minimum password length must be 8 characters.

Password complexity :- We have to different complexity levels for settings passwords.

Password question requirement :- Here we set password hint question to remind us in any case the password is forgotten. We can not set password hint question to as “PASSWORD”.

Maximum invalid login attempts :- We can set login invalid attempts to 3, 5, 10. We can also set to no limit.

Lockout effective period :– If the users salesforce.com account is locked out due to invalid attempts the user must wait until this lockout effective period time.

Enter all the details as given above and click on Save button.

Salesforce login, login.salesforce.com -Salesforce.com login

login.salesforce.com

Salesforce login, login.salesforce.com -Salesforce.com login : Salesforce login is the process of authenticating resources provided by sfdc.

login.salesforce.com : Salesforce login, login.salesforce.com -Salesforce.com login : In this salesforce tutorial we are going to learn about Salesforce login. Before discussing the basics of Salesforce.com login every one should be able to create an account in salesforce.com so that he/she can use the resources provided in salesforce.com. Now we go briefly what are the methods available to login in to salesforce.com and before logging in to salesforce we have to create a free developer account in salesforce.com. We will be able to learn about these two concepts later first we go through the process of Salesforce login.

What is salesforce login

Salesforce login is the process of authenticating resources provided in the cloud through Developer account and Production Account with Username and password. Salesforce.com login information contains a user name and a passwords.Salesforce login, login.salesforce.com

How to create free developer account in salesforce.com

Through the URL http://developer.force.com/ we will be able to  create free developer account.

Steps to create free developer account in salesforce.com (Salesforce login).

  1. First you have a valid email Id.
  2. Login to http://developer.force.com.
  3. Select Join Now.
  4. Provide all the details specially valid email and username . Username must be in the form of a valid email format. Ex : ABC@gmail.com.
  5. Now click Sign me up.
  6. An email will b sent to you Email address.
  7. Now activate your account by clicking the link provided in the email.
  8. The link logs you into the site automatically.
  9. Now set your password to your account.
  10. Log out from your account.

salesforce login URL : login.salesforce.com

Enter your User name and Password to login .

Now Read another Salesforce Login article : Salesforce Login.

Read more for Salesforce training tutorials that explains step by step with real time scenarios.

Salesforce Login flow notice display – sfdc login flow display

Salesforce login flow notice display.

Salesforce login flow notice display : If any organization wants to display notice to it’s employees when log in to salesforce there they have to use salesforce login flow. We try to display information to users in many cases like when there is salesforce server downtime or under maintenance and also many other cases.

To display Salesforce login flow notice display when user log in to salesforce we have to use salesforce login flow which has been updated in Salesforce winter’15 edition. This new features in winter’15 edition is very helpful for displaying important information to salesforce user’s.

Visual workflow and salesforce login flow solves our requirement to display notices and important information. Follow the steps shown below.

  • Create new object.

Salesforce Login flow notice display - sfdc login flow display

  • Enter label name as notice board and click on save button.

salesforce login flow notifications-1

  • Now we have to create fields in the object.
  • Open Notice board object which we created earlier and click on new button as shown below.

salesforce login notifications-2

  • Select Text Area as as data type.

salesforce login notifications-3

  • Now enter field label and field name as shown below
  • Click on Save button.

salesforce login notifications-4

 

  • Creating custom object and field is successful.

salesforce login notifications-5

We have created custom object because it displays important salesforce login flow information when user log in to salesforce.

Creating salesforce login flows.

  • Now we have to create login flow.
  • Go to setup=>Create=>Workflow & approvals=>flows.

salesforce login notifications

  • Click on flows.
  • Click on new flow to create new login flow display.

salesforce login notifications0

  • Now we have to create variable with name Getinfo as shown.
  • To create variable click on resources | Variables
  • Enter unique name for the variable and click on ok button.

salesforce login notifications-6

  • Now drag record look-up and drop on the window to display text.
  • Select palette.
  • Click on Record look-up icon and drop on right window.

salesforce login notifications-7-1

Here we have to enter name, unique name and also select look up filters to meet the criteria.

  • Enter name .
  • Unique name will be automatically entered.

salesforce login notifications-7

We have to assign the record field to variables to reference in login flow. Select field and the variable as shown below. Finally click on ok button to save all settings.

salesforce login notifications-8

  • Add display text field to display information and pass the variable {!GetInforText}.

salesforce login notifications-7-2

salesforce login notifications-10

After adding Screen to display information window will be looked as shown above. Connect record lookup and screen.

  • Save the flow by clicking on Save button.
  • Enter flow properties and click on OK button.

salesforce login notifications-11

  • Below a warning message is displayed we have not selected any flow stating item.
  • Select record lookup as starting flow item.

salesforce login notifications-12

  • Salesforce login flow is not in active state so activate by clicking on Activate button as shown below.

salesforce login notifications-13

Creating Salesforce login flow.

We have to create salesforce login flow to invoke with salesforce users when login in to system.

  • Go to Security controls=>Login flow.

salesforce login notifications-14

Click on login flows as shown above

  • Click on new button to connect with user profile.

salesforce login notifications-15

  • Enter name, flow, user license and profile.
  • Click on save button.

salesforce login notifications-16

  • Now create a record in Notice board object and save the record.

 

salesforce login notifications-17

Salesforce login flow notice display has been successfully created.