If You have Person Accounts enabled and you insert an Account using (name='xxx') a Business Account is created. If you insert a account using (Lastname ='yyy') a person account is created.

Relationship tip:When being read as a value, if c.Account is null, then c.Account.Name evaluates to null,but does not yield a NullPointerException.When being modified, if c.Account is null, modifying c.Account.Name does yield a NULL pointer exception.

A LIST can contain unto four levels of nested lists.

Use the Comparable interface to implement a custom sort for Lists.100>

Let's take the scenario of Account - Contact. On the Account Detail page you have the Contact related list. When a user clicks on the 'New' button in the 'Contact' related list, a Contact Edit Screen shows up. When the user clicks 'Save' he is redirected to the 'Contact Detail Page'.

You want to redirect the user to the parent 'Account Detail Page' instead.

STEP 1:

Create a Custom button on Contacts as shown below.

STEP 2:

Analyzing the 'Button or Link URL':

/003/e?retURL=%2F{!Account.Id}&saveURL=%2F{!Account.Id}

003 - Denotes Contact (The child record, will be different for each object. Click on the standard NEW button of any object and you could find out the unique code for that object)

retURL=%2F{!Account.Id} - the URL you want to redirect the user to when he clicks CANCEL. %2F denotes a '/' and the merge field {!Account.Id} gives the Account to redirect to.

saveURL - similar to retURL except that it defines the URL to redirect to after the user clicks 'SAVE'

List can have duplicate entries. The integer 10 is added twice to the list.

List is a ordered collection, meaning that each element is stored in a specific position. An element can be accessed using its location (also called as Index). The index always starts with 0.

List can also contain SObject records, here is a sample code. Note that removing/adding a record to the list does not add it to the database. You should explicitly use the DML commands insert/upsert/delete.

List<Account> listsample = [Select Id,Name from Account limit 5];
system.debug('The Account Name at index 0 is'+listsample[0].Name);
system.debug('The size of the list is'+listsample.size());
//Adding a element to the list
listsample.add(new Account(Name='testlistsample'));
system.debug('The size of the list now is'+listsample.size());
//Remove a element from the list
listsample.remove(5);
system.debug('The size of the list now is'+listsample.size());

SET:

A set is an unordered collection. Elements in a set are not stored in a specific order and you cannot access an element using an index.

A Map is a collection of Key Value pairs. Each key corresponds to an element. Below is a diagram which illustrates this.

A major difference between a Map and a List is traversal. In a List you will have to loop through each element to find out a specific element, whereas in a map you could fetch it directly using the key. This greatly reduces processing time.

Integrate SAP with Salesforce CRM & Force.com using Informatica

Moving data between applications and keeping them synchronized has historically been extremely difficult and time consuming. With Informatica Cloud, it's never been easier to integrate SAP with your growing list of software as a service (SaaS) applications such as Salesforce CRM. For example, salesforce.com customers can quickly synchronize accounts and contacts, process new orders, or export and massage data for integrated reporting and analysis without having to write custom code. With a business user interface designed to simplify complex tasks and the ability to easily automate and schedule data synchronization and replication tasks, Informatica Cloud will help you take back your weekends and get more from your business application investments.

No Custom Coding and Rapid Deployment

Informatica Cloud is a multitenant data integration service specifically designed for self-service data integration, with hybrid deployment options that ensure IT governance and control. With Informatica Cloud, SAP integration with Force.com requires no custom coding. A wizard-based interface allows users to create, schedule, and manage tasks on the web, and more complex workflows can be developed and shared as a service so you can synchronize Force.com with customer, product, order, and other master data from SAP, as well as other enterprise applications.

Informatica Cloud SAP Benefits:

Extend the market-leading Informatica Platform to the cloud with the #1 data integration solution for salesforce.com customers.

Overriding Standard Buttons

Let's Override the 'NEW' button. Click on the 'Edit' link next to the 'NEW' button. You will see a page as below.

After selecting the 'Visualforce Page' radio button, you can select the page of your choice from the drop down beside.

NOTE:

Sometimes, you might not be able to see your Visualforce Page in the dropdown. This is because for your Visualforce page to be listed here, it should have the 'standardController' attribute on the 'apex:page' tag set to the current object you want to override.

For ex: If you want to override the 'NEW' button of 'ACCOUNT' with a Visualforce Page named 'ACCNEWVF', then the visualforce page should look something like this

If you check the code, you could see that we have the 'styleclass' attribute specified for the inputtextarea's.

And this styleclass name is used in the document.ready() function to specify the character limits. You could use the 'id' attribute as well, but make sure you reference id's using the $Component notation.