Twins Finder - A Antivirus for Attachments

Twins Finder is a utility to find out and defends from storing duplicates attachments based on their data and not by name. 
App comes with good looking responsive UI. This application works like an antivirus.

Defender - Prevent to store duplicate attachments
Finder - Find out duplicate attachments

Twins Finder is a utility to find out and defends from storing duplicates attachments based on their data and not by name. 

We can say its Antivirus for attachments.

Why do we need “Twins Finder” :
Suppose that we have lots of attachments but many of the attachments are same but names are different, it is hard and time consuming to find out these kinds of attachments manually. Twins finder smartly finds out duplicate attachments based on what is inside them.

Get the app from appexchange.

Upload Guru Salesforce Appexchange App - Upload Multiple Attachments with Drag and Drop

Upload Guru is utility app to upload "Attachments" in salesforce. You can add multiple attachments by "Drag and Drop" functionality. You can also store an image as attachment through "Webcam" in computers or through primary or secondary camera in mobile.

Key Features :
1. Upload multiple files with Drag And Drop
2. Use webcam to Capture Image and save as Attachment
3. Upload Attachment directly from Detail Page of any object

Upload Guru is new way to upload multiple files. You can add multiple attachments by "Drag and Drop" functionality. You can also store an image as attachment through "Webcam" in computers or through primary or secondary camera in mobile. It works with both Standard and Custom Objects.

Click here to get it from appexchange....

Show Social Icons On Custom VF Pages in Salesforce


We can add social icons on custom vf pages using  <social:profileViewer entityId="{!contact.id}"></social:profileViewer>.
You just need to pass the contactId or Account Id.

We will found one thing after this that is we don't see linkedin icon on custom page, because  currently Linked in icon is not available in (Custom visual force page) as there is some issue in Linked in and salesforce contract.

Exm Code :
<apex:page standardController="contact"> 
    <social:profileViewer entityId="{!contact.id}"></social:profileViewer>
    <apex:detail inlineEdit="false" relatedList="false" title="false"/>
</apex:page>

Jquery Dialog Box With Salesforce

Click here to get code from my developer org ...

JQuery AutoComplete With Salesforce

I have implemented jquery autocomplete in salesforce with simple steps and code. 

Click here to get code from my developer org ...

Get Picklist Values in Apex Class Salesforce

List<String> options = new List<String>(); Schema.DescribeFieldResult fieldResult = Quote__c.Pricing_Selection__c.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for(Schema.PicklistEntry p : ple){ options.add(p.getValue()); } System.debug('Options====>>>'+options);

Full Calendar with Salesforce

Here is code for full calendar with salesforce.

Click here to get code from my developer org ...

Fetch Email Template With Varible Values

Why we use ? :
In the many case we need to fetch email body of template with filled values of variables.
========================================
Apex Class Code :
Messaging.SingleEmailMessage mail ;
//--------- Html Body Fetching start here ----------
Savepoint sp = Database.setSavepoint();
mail = new Messaging.SingleEmailMessage();
mail.setTargetObjectId(<CONTACT ID>);
mail.setTemplateId(<TEMPLATE ID>);
String body = '';
Boolean isTextTemp ;
try{
     Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
     body += '<html>';
     body += '<Body>';
     if(EMAILTEMPLATEOBJECT.TemplateType.equalsIgnoreCase('text')){
           body = mail.getPlainTextBody();
     }else{
           isTextTemp = false;
           body += mail.getHtmlBody();
           body = body.replace('<meta charset="utf-8">','').replace('<br>','<br/>');
           body += '</body>';
     }
     body += '</html>';
     System.debug('--------HTML BODY WITH VALUES : '+body);
     Database.rollback(sp);
}Catch(Exception e){
    Database.rollback(sp);
}
//--------- Html Body Fetching ending here ----------

=====================================
Note : It only allows to fetch 10 template body at a time . like in loop.
Solution : For this we can use a future method.

Make a HTTP Request in Salesforce

We can make http request in salesforce. We must define a remote site of it before making a http request.

Add site in remote site setting :
Go in the Setup Menu -->Administer ---> Remote Site Settings ---> Add here your site setting

String payLoad = 'some_data=value+1&some_more_data=value+2&etc_etc';
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://www.contoso.com/');
req.setMethod('POST');
req.setBody(payLoad);
HttpResponse res = h.send(req);

system.debug(‘Response :’+res.getBody());

Test User Creation In Salesforce

Account accObj = new Account();
accObj.name='test';
insert accObj;

contact con = new contact();
con.firstname = 'test';
con.lastname = 'test';
con.Email = 'test@test.com';
con.AccountId = accObj.id;
insert con;

Profile p = [SELECT Id FROM Profile WHERE Name='System Administrator'];
Database.DMLOptions dmo = new Database.DMLOptions();
dmo.EmailHeader.triggerUserEmail = false;
User u = new User(alias = 'standt', email=con.email,
emailencodingkey='UTF-8', lastname=con.lastname,
firstname=con.firstname, languagelocalekey='en_US',
localesidkey='en_US', profileid = p.Id, contactId=con.Id,
timezonesidkey='America/Los_Angeles',
username=con.email);
u.setOptions(dmo);
insert u;
System.runAs(u) {

}

Multiple File Uploading in Salesforce

We can able to upload multiple files at a time.
On the page we define the id of record in which the all attachments will be saved/attached. You can also customize the code as you want.

Click here to get code from my developer org ...

You can see more about it from tehnrd.

Salesforce Offline Connect

Help Links :
1 : Installing Connect Offline
2 : What is Your Default Connect Offline Briefcase Contents?
3 : Logging in to Connect Offline
4 : Working with Connect Offline
========================================
Where/Why we use ? :
Suppose that a company ABC have lots of trucks for transportation.Company needs that whenever truck driver delivers these stuffs, they shoud to be update status of things.
Problem is that many times drivers have no net. So in this case we can use connect offline to update status at offline . Whenever they catch net , data will sync with cloud.
========================================
Steps to make possible :
1. Click on User name ==> My Settings ==> Expand Personal in side bar ==> Click on Advance User Details ==> check the Offline User

2. Click on Setup ==> Desktop Administration ==> Offline Briefcase Configurations 

=: Create new Offline Briefcase Configuration after this create dataset in this briefcase

3. Download Software : Click on User name ==> My Settings ==> Expand Desktop Add Ons in side bar ==> Click on force.Com Offline Connect ==> Install Now


4. After the software instalation open the SW and fill username and check all the check all the check boxes only first time.


5. Go offline and click open SW again , login without check the any checkbox .It will open a browser within salesforce offline.

======================================
Some tricks must be follow before run SW :
If you have windows 8 or 8.1 then we need to change compatibility of software.
Right Click on SW ==> compatibility Tab ==> Set to Windows Xp 3
======================================
Note : Offline Connect Works in only IE 6,7,8 only.

Extract Image from RTF (Rich Text Area) Salesforce

String ​imgPath = String.valueOf(<RTF filed>);
imgPath = imgPath.subString( (imgPath.indexof('src')+5),imgPath.indexof('"',imgPath.indexof('src')+5));

Exp : String ​imgPath = String.valueOf(accObj.nyRtf__c);
imgPath = imgPath.subString( (imgPath.indexof('src')+5),imgPath.indexof('"',imgPath.indexof('src')+5));

Get Relationship Name between Parent And Child Object Salesforce

String parentObj = 'Account';
String childObj = 'Contact';

Map<String,Schema.SObjectField> fieldMap = Schema.getGlobalDescribe().get(childObj).getDescribe().fields.getMap();

for(Schema.SObjectField f:fieldMap.values()){
   String type = String.valueOf(f.getDescribe().getReferenceTo());
   if(type.contains(parentObj)){
       system.debug('Field Name:- ' + f.getDescribe().getName());
   }
}

You Tube Integration with salesforce

You need a google api key for access data from youtube.
Steps to create api key :
1. Go here : https://console.developers.google.com/project 
2. Click on Create Project, put name of project then Create (Wait)
3. Go on -->Api & Outh ---> Credentials
4. Click on Create New Key
5. Select Server Key
6. Now Copy The Api Key and put in code ( private static final String API_KEY = ''; )

Click here to get code from my developer org ...