Regular Expression for email validation using Apex in Salesforce.
Nitesh Kumawat
No comments
Sample Regular Expression for email validation using Apex is given below
Cheers!!! Enjoy
if(Pattern.matches('([a-zA-Z0-9_\\-\\.]+)@((\\[a-z]{1,3}\\.[a-z]{1,3}\\.[a-z]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})', email)){
//success
}
else{
//error
}
Cheers!!! Enjoy
Hide the Current Date Link on an Inputfield
Nitesh Kumawat
No comments
The standard apex:inputfield component for a date field generates a link next to the input field, taking a lot of space. The link allows someone to easily enter the current date. However, when you use multiple date fields within a table component, it can be confusing for the user to have these extra links (see Screenshots). This recipe solves this by creating a Visualforce component that uses CSS to remove the link.
Visualforce Component Code
Here's the code for the Visualforce component. It wraps the component body in an HTML div tag, and adds styling to hide a part of that wrapped component.
How to use component
Here's a simple Visualforce page to demonstrate component usage:
Source: Cookbook
Cheers!!! Enjoy
Visualforce Component Code
Here's the code for the Visualforce component. It wraps the component body in an HTML div tag, and adds styling to hide a part of that wrapped component.
<apex:component access="global">
<style>
div.hideCurrDate span.dateInput span.dateFormat{
display:none;
}
</style>
<div class="hideCurrDate">
<apex:componentBody />
</div>
</apex:component>
How to use component
Here's a simple Visualforce page to demonstrate component usage:
<apex:page standardController="Opportunity">
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<c:noDateLink>
<apex:inputField value="{!Opportunity.CloseDate}"/>
<c:noDateLink>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Cheers!!! Enjoy
Configuration and Customization in Salesforce.
Nitesh Kumawat
No comments
Configuration means by using UI we can
easily develop applications in salesforce.
Query in Custom Button in Salesforce
Nitesh Kumawat
No comments
{!REQUIRESCRIPT("/soap/ajax/ 14.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/ 14.0/apex.js")}
var recordtypeResultIDD = sforce.connection.query(" Select Id FROM RecordType WHERE Name='Visit Contact' and SobjectType='Contact_Role__c'" );
records = recordtypeResultIDD.getArray(" records");
window.location="/a0B/e? CF00N9E000000KULE={!Visit__c. Name}&RecordType_ileinner="+ records[0].Id+"&RecordType="+ records[0].Id+"&retURL={! Visit__c.Id}";
{!REQUIRESCRIPT("/soap/ajax/
var recordtypeResultIDD = sforce.connection.query("
records = recordtypeResultIDD.getArray("
window.location="/a0B/e?
What is Cloud
Nitesh Kumawat
2 comments
cloud
Computing provides us a means by which we can access the applications
as utilities, over the Internet. It allows us to create, configure, and
customize applications online.
·
Cloud Computing is an approach to provide the following
services -
1.
SAAS (Software As A Service)
2.
PAAS (Platform As A Service)
3.
IAAS (Infrastructure As A Service)
Ex: Salesforce, Amazon EC2, IBM Blue Cloud, Microsoft Azure
What is Cloud?
The term Cloud refers to a Network or Internet.
In other words, we can say that Cloud is something, which is present at remote
location.
Cloud can provide services over network, i.e., on
public networks or on private networks, i.e., WAN, LAN or VPN.
Applications such
as e-mail, web conferencing, customer relationship management (CRM),all
run in cloud.
Or
What is Cloud Computing?
Cloud Computing refers to manipulating,
configuring, and accessing the applications online. It offers online data storage,
infrastructure and application.
We need not to install a piece of software on our
local PC and this is how the cloud computing overcomes platform dependency
issues. Hence, the Cloud Computing is making our business application mobile
and collaborative.
Basic Concepts
There are
certain services and models working behind the scene making the cloud computing
feasible and accessible to end users. Following are the working models for
cloud computing:
1. Deployment Models
2. Service Models
DEPLOYMENT MODELS
Deployment
models define the type of access to the cloud, i.e., how the
cloud is located? Cloud can have any of the four types of access: Public,
Private, Hybrid and Community.
1. PUBLIC CLOUD
The Public
Cloud allows systems and services to be easily accessible to the general
public.
Public cloud may be less secure because of its openness,
Examples of public clouds include
Amazon
Elastic Compute Cloud (EC2),
IBM’s
Blue Cloud,
Sun
Cloud,
Google
AppEngine and
Windows
Azure Services Platform.
Ex- e-mail.
2. PRIVATE CLOUD
The Private
Cloud allows systems and services to be accessible within an organization.
It offers increased security because of its private nature.
3. COMMUNITY CLOUD
The Community
Cloud allows systems and services to be accessible by group of
organizations.
4. HYBRID CLOUD
The Hybrid
Cloud is mixture of public and private cloud. However, the
critical activities are performed using private cloud while the non-critical
activities are performed using public cloud.
SERVICE MODELS
Service
Models are the
reference models on which the Cloud Computing is based.
These can be categorized into three basic service
models as listed below:
1. Infrastructure as a Service (IaaS)
2. Platform as a Service (PaaS)
3. Software
as a Service (SaaS)
There are many other service models all of which can
take the form like XaaS, i.e., Anything as a Service. This can be
Network as a Service, Business as a Service, Identity as a Service, Database
as a Service or Strategy as a Service. The Infrastructure as a
Service (IaaS) is the most basic level of service. Each of the service
models make use of the underlying service model, i.e., each inherits the
security and management mechanism from the underlying model, as shown in the
following diagram:
INFRASTRUCTURE AS A SERVICE (IAAS)
IaaS provides access
to fundamental resources such as physical machines, virtual machines, virtual
storage, etc.
PLATFORM AS A SERVICE (PAAS)
PaaS provides the runtime
environment for applications, development & deployment tools, etc.
SOFTWARE AS A SERVICE (SAAS)
SaaS model allows to use
software applications as a service to end users.
Benefits
Cloud Computing has numerous advantages. Some of
them are listed below:One can access applications as
utilities, over the Internet.
·
Manipulate
and configure the application online at any time.
· It does not require to install a
specific piece of software to access or manipulate cloud
application.
· Cloud Computing offers online
development and deployment tools, programming runtime environment through Platform
as a Service model.
· Cloud
resources are available over the network in a manner that provides platform
independent access to any type of clients.
· Cloud Computing offers on-demand
self-service. The resources can be used without
interaction with cloud service provider.
· Cloud Computing is highly cost
effective because it operates at higher efficiencies with
greater utilization. It just requires an Internet connection.
· Cloud
Computing offers load balancing that makes it more reliable.
Virtualization
Virtualization
is a technique, which allows to share single physical instance of an
application or resource among multiple organizations or tenants (customers).
It does so by assigning a logical name to a physical resource and
providing a pointer to that physical resource when demanded.
Cloud Computing
has its applications in almost all the fields such as business,
entertainment, data storage, social networking, management, entertainment,
education, art.
Business
Applications
Cloud computing has made businesses more
collaborative and easy by incorporating various apps such as MailChimp,
Chatter, Google Apps for business, and Quickbooks
|
Data Storage
and Backup
Box.com, Mozy, Joukuu are
the applications offering data storage and backup services in cloud.
|
Management
Applications
There are apps available for management task such as
time tracking, organizing notes. Applications performing such tasks are discussed
below:
|
Social
Applications
There are several social networking services
providing websites such as Facebook, Twitter, etc.
|
Entertainment Applications
|
Art Applications
|
Cloud Computing Providers
Various Cloud Computing platforms are available
today. The following table contains the popular Cloud Computing platforms:
|
||||||||||||||||||||||||||||||||||||||



