Thursday, January 17, 2013

Live Chat Agent Chat Support in Salesforce




1). Download the following PDF Book and do the steps descripes in Tutorial 5

     http://www.salesforce.com/us/developer/docs/workbook_service_cloud/workbook_service_cloud.pdf

2)At the time you got two set of codings in two steps (This codes are used after finising your chat configuration)

3) After complete the process create a  webpage with 2 buttons using the above copied code.
   (create the online chat button at the place of Online chat code here)
   (create the offline chat button at the place of Offline chat code here)

4)Then Click the online Chat button the request is send to salesforce page

5) Accept the request in your salesforce page

6) Now you can chat from any webpage to salesforce chatter

Get the image or documents from Salesforce Document Object



1. Upload one image or file in Document object

2. Go to Document Object

3. Select your folder which you add your file

4. Click the viwe button near to your file name

5. Select the URL displed

6. Use this link for display the image

ex:

<img src="https://force.com/servlet/servlet.FileDownload?file=12331441431212"/>

OrgWideEmailAddress Used to Send the Email Using our own Mail ID


//Set Own Email address as From address as well as Reply to Email

  1) Go to Administration setup -> Email Administration ->Org Wide Email Address
 
  2) Add New Email Address with Name in Org Wide Email Address
 
  ex
 
  Display Name :Raja
  Email :xxx@gmail.com
 
  3)Then go to Send Email Code Part
 
  Sample Code
   
  OrgWideEmailAddress[] owea = [select Id from OrgWideEmailAddress where Address = 'xxx@gmail.com'];
 
                         
                            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
                            String[] toAddresses = new String[]{emailLead.Email};
                           
                            mail.setOrgWideEmailAddressId(owea.get(0).Id);
                            mail.setToAddresses( toAddresses );
                            mail.setSubject('Welcome to xxx!');                      
                           
                            StaticResource[] leadEmailNormalTemp = [SELECT Id, Body FROM StaticResource WHERE Name = 'LeadEmailTemplate'];
                            StaticResource[] leadEmailMobileTemp = [SELECT Id, Body FROM StaticResource WHERE Name = 'LeadMobileEmailTemplate'];
                          
                            mail.setHtmlBody((leadEmailMobileTemp[0].Body).toString());
                            newMail.add(mail);

Simple Example for Apex Class and Test Class


/*----------- Apex Class---------- */

public class arithmaticCalculationClass{

    Integer answer;
   
    public void add(Integer a, Integer b){
   
        answer = a+b;
    }
   
    public void subtract(Integer a, Integer b){
   
        answer = a-b;
    }
   
    public void multiply(Integer a, Integer b){
   
        answer = a*b;
}
   
    public void division(Integer a, Integer b){
   
        answer = a/b;
    }
   
}


/*-------------Test Class --------------*/

@isTest

public class arithmeticCalculationTestClass{  
   
    static testMethod void testMyClass(){
   
        Integer x=20;
        Integer y=30;          
        arithmaticCalculationClass ins = new arithmaticCalculationClass();
        ins.add(x,y);
        ins.subtract(x,y);
        ins.multiply(x,y);
        ins.division(x,y);    
    }
}

SALESFORCE GUIDE URL's



Details Uniform Resource Locator
Salesforce Change
Set Setup
http://www.luneos.com/blog/salesforce-change-sets/
Create New Sandbox http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_intro_get_dev_account.htm
Wrapper Class Example http://wiki.developerforce.com/page/Wrapper_Class
Sorting Table in Page http://wiki.developerforce.com/page/Sorting_Tables
Wealth Engine For Salesforce https://ap1.salesforce.com/packaging/installPackage.apexp?p0=04t50000000LkXe
Wealth Engine Demo http://appexchange.salesforce.com/listingDetail?listingId=a0N30000003JcirEAC
Check Spelling Button in
 Salesforce
http://ap1.salesforce.com/help/doc/en/customize_ui_settings.htm
Upload Picture in Contact
 Record
http://www.youtube.com/watch?v=6bzm2O5FVGM
Code Samples http://wiki.developerforce.com/page/Code_Samples#Writing_a_JAVA_program_to_connect_to_Salesforce.com
Java to salesforce Integration http://www.forcetree.com/2011/12/java-to-salesforcecom-integration-using.html
Add Print Preview Button
in Standart Page 
http://wiki.developerforce.com/page/Visualforce_Extended_Print_Preview
Salesforce for outlook https://salesforce.adobeconnect.com/_a13852757/outlookintro
Salesforce Training  https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=training&instance=AP1&release=180.9.2
Salesforce videos http://www.salesforce.com/services-training/training_certification/online/
Explanation For Salesforce Field Data types http://salesforce-tutorials.blogspot.in/
Object, Validation Rule, Trigger,Work Flow,
Email Template,Tab,Test Cases Tutorial
http://shivasoft.in/blog/salesforce/step-by-step-salesforce-tutorial-%E2%80%93-creating-fields-%E2%80%93-2-of-n/
Displaying a PDF attachment on a record http://salesforcetutorials.wordpress.com/2012/01/22/displaying-a-pdf-attachment-on-a-record/
Salesforce Technical help blog http://forcesecrets.blogspot.in/search?updated-min=2012-01-01T00:00:00-08:00&updated-max=
2013-01-01T00:00:00-08:00&max-results=3
Email handler in Salesforce http://wiki.developerforce.com/page/An_Introduction_To_Email_Services_on_Force.com
Advanced Formula Examples http://ap1.salesforce.com/help/doc/en/useful_advanced_formulas.htm
Salesforce Customer Support Full Tutorial https://help.salesforce.com/apex/HTViewHelpDoc?id=overview.htm&language=en_US
Salesforce Facebook http://www.facebook.com/salesforce
Salesfoce Experts Blog http://forcebydesign.com/2009/07/useful-salesforcecom-short-hand-and-keyboard-shortcuts/
Gmail to Salesforce http://www.salesforce.com/smallbusinesscenter/faq/email.jsp
Salesforce for outlook video http://www.salesforce.com/smallbusinesscenter/faq/email.jsp
Starting a career as
 ForceDotCom Developer
http://force.siddheshkabe.co.in/2012/01/starting-career-as-forcedotcom.html
Salesforce Useful blog http://force.siddheshkabe.co.in/
Solution for ActionSupport on  Lookups
 for a Visualforce Page
http://force.siddheshkabe.co.in/2012/06/solution-for-actionsupport-on-lookups.html
Easiest AJAX Pagination on Visualforce http://force.siddheshkabe.co.in/2010/08/easiest-ajax-pagination-on-visualforce.html
Displaying Aggregate result on Visualforce using SOQL http://force.siddheshkabe.co.in/2010/11/displaying-aggregate-result-on.html
Generating Barcode image on
Visualforce and Formula Field: Salesforce Code Tip
http://force.siddheshkabe.co.in/2010/12/generating-barcode-image-on-visualforce.html
Salesforce for Outlook Tips and Tricks http://starrforce.com/2011/05/secrets-of-salesforce-com-outlook-
integration/?_hse=krajaduraimca@gmail.com&_hsmi=LN2447062&_hsh=
cc8ea6ef41cff273143cda741d8a1b60&utm_campaign=LeadNurturing_2012+Optimization%2B+Campaign_Email1
How to Benefit from Salesforce
Criteria Based Sharing Rules
http://starrforce.com/2011/03/how-to-benefit-from-salesforce-criteria-based-sharing-
rules/?_hse=krajaduraimca@gmail.com&_hsmi=LN2447062&_hsh=cc8ea6ef41cff273143cda741d8a1b60&utm_campaign=LeadNurturing_
2012+Optimization%2B+Campaign_Email1
Simplify the Creation of
Visualforce Email Templates
http://starrforce.com/2011/05/simplify-the-creation-of-visualforce-email-templates/
?_hse=krajaduraimca@gmail.com&_hsmi=LN2447062&_hsh=cc8
ea6ef41cff273143cda741d8a1b60&utm_campaign=LeadNurturing_2012+Optimization%2B+Campaign_Email1
General Info About Programming


http://www.dummies.com/how-to/content/the-technical-details-of-writing-a-program.html

Wednesday, January 9, 2013

JavaScript and HTML



You can think of JavaScript as an extension to HTML; an add-on, if you will.
Here's how it works. HTML tags create objects; JavaScript lets you manipulate those objects. For example, you use the HTML <BODY> and </BODY> tags to create a Web page, or document. As shown in Table 1, after that document is created, you can interact with it by using JavaScript. For example, you can use a special JavaScript construct called the onLoad event handler to trigger an action — play a little welcoming tune, perhaps — when the document is loaded onto a Web browser. Examples of other HTML objects that you interact with using JavaScript include windows, text fields, images, and embedded Java applets.
Table 1: Creating and Working with Objects
Object
HTML Tag
JavaScript
Web page
<BODY> . . . </BODY>
document
Image
<IMG NAME="myImage">
document.myImage
HTML form
<FORM name="myForm"> . . . </FORM>
document.myForm
Button
<INPUT TYPE="button" NAME="myButton">
document.myForm.myButton
To add JavaScript to a Web page, all you have to do is embed JavaScript code in an HTML file. Below the line in which you embed the JavaScript code, you can reference, or call, that JavaScript code in response to an event handler or an HTML link.
You have two choices when it comes to embedding JavaScript code in an HTML file:
·         You can use the <SCRIPT> and </SCRIPT> tags to include JavaScript code directly into an HTML file.
In the example below, a JavaScript function called processOrder() is defined at the top of the HTML file. Further down in the HTML file, the JavaScript function is associated with an event handler — specifically, the processOrder button's onClick event handler. (In other words, the JavaScript code contained in the processOrder() function runs when a user clicks the processOrder button.)
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
// JavaScript statements go here
function processOrder() {
// More JavaScript statements go here
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="myForm">
<INPUT TYPE="button" NAME="processOrder" VALUE="Click to process your order" onClick="processOrder();">
...
</HTML>
·         You can use the <SCRIPT> and </SCRIPT> tags to include a separate, external JavaScript file (a file containing only JavaScript statements and bearing a .js extension) into an HTML file.
In the example below, the JavaScript processOrder() function is defined in the myJSfile.js file. The function is triggered, or called, when the user clicks the Click Here to Process Your Order link.
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript" SRC="myJSfile.js">
</SCRIPT>
</HEAD>
<BODY>
<A HREF="javascript:processOrder();">Click here to process your order.</A>
...
</BODY>
</HTML>
Because Web pages aren't made of HTML alone, JavaScript provides access to more than just HTML objects. JavaScript also provides access to browser- and platform-specific objects. Browser plug-ins (such as RealPlayer and Adobe Acrobat), the name and version of a particular viewer's browser, and the current date are all examples of non-HTML objects that you can work with by using JavaScript.
Together, all the objects that make up a Web site — HTML objects, browser- and platform-related objects, and special objects built right into the JavaScript language — are known as the document object model (DOM).
·                     Add a Comment

Salesforce - Generate dynamic inner query to fetch parent and related child records

Use Case: In many scenarios, we need to clone the records with related child records. Issue / Limitation: We may simply use the "cl...