Salesforce | How to get Salesforce lookup field object id using javascript

Author - Webner

Suppose we have the following lookup field on a VF page:
<apex:inputField id=”owner” value=”{!Event.Ownerid}”>
To get value of above lookup field using field id in javascript, if we directly use document.getElementById(‘{!$Component.owner}’).value, it will return Read more…

Salesforce | [message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out

Author - Kiran Preet

While upserting records using SFDC php API we were facing following exception :

[message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out.

This exception was showing up frequently when we were upserting records using PHP API. The username, password and security token which we were using were Read more…

Linux | Multi Factor Authentication (MFA) without password

Author - Navneet Kashyap

When implementing Multi Factor Authentication (MFA) for linux server with ssh-key and google-authenticator only with no password it was prompting us to enter password for user but we wanted authentication without password.

Steps to solve this:

1.  Install google authenticator (centos 64-bit) in a new Read more…

AWS S3 | How to get the count of files in a folder in AWS S3

Author - Kiran Preet

There was a task in which we were required to get each folder name with count of files it contains from an AWS S3 bucket. If we used the general approach to start a counter and increment that in a foreach loop we were getting the exact count of files Read more…

Java | Remove duplicate objects from Java Hashsets and Hashmap keys

Author - Webner

In Java, a Hashset, theoretically, cannot contain any duplicate values but it is not valid when you store user defined objects in it. Same is true in case of Hashmap keys which supposedly cannot be duplicate. The reason is, how will Java interpreter know if our custom defined objects are Read more…

JQuery | Check/uncheck the radio button on click using jquery

Author - Ishpreet Kaur

When we click radio button, it gets checked. Once it gets checked it doesn’t get unchecked when again clicked. We can use checkbox for checked/unchecked status of input, but sometimes requirement arises when we need to use radio button for checked/unchecked status instead of checkbox.


Suppose Read more…

Salesforce Integration | Upsert multiple records with single connection in PHP

Author - Kiran Preet

When we create connection with “SforceEnterpriseClient”, we can upsert one record and then we need to recreate connection for next upsert, which eventually can result in the exception:
“UnexpectedErrorFault: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.”
The solution is to use “SforcePartnerClient” instead of “SforceEnterpriseClient”.

An example with steps to upsert records in Read more…

Java | What is the default location for maven repository and how we can modify it

Author - Rita

To print maven default configurations, run following command:

mvn -X
This will show you maven default configurations similar to following:
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-i386 Read more…

Salesforce | Check who is accessing your Salesforce account manually or through code

Author - Kiran Preet

To check the login history of your Salesforce account (who is accessing your Salesforce account manually or through API calls) follow these steps :

1. Click on setup.

2. Click login history as shown in image below and you will find the information related to your login sessions Read more…

How to add ©, ®, ™ symbols to the text in Windows, Linux and Mac

Author - Webner

For Windows:

Hold down the alt key and use the num pad of your keyboard to create these symbols:

For copyright – 0169 – ©
Registered – 0174 – ®
Trademark – 0153 – ™

For Mac:

Hold down the alt key and press the desired letter of your keyboard to create these symbols manually:

For copyright – Alt+g Read more…

PHP | How to call SOAP based web services from php

Author - Rita

We were working on codeigniter website project. We had wsdl web services available to access our backend functionality. We had configured a WSDL Client in our php code but it was not working.

Sample Code:
$testSoapClient = new SoapClient(TYPE_WSDL_PATH_HERE, array(‘trace’ => 1));
catch (Exception $e)
echo ‘Provider not Read more…

Selenium | Use of Robot Class to handle Dialog box

Author - Webner

When we write selenium script for downloading files over internet through Mozilla Firefox following dialog box appears to save or open the file:

Note: This dialog box cannot be handled with simple find element functions like:

******So we Read more…

Google Maps | Display routes to different locations from common starting point

Author - Webner

Suppose in Google Maps you want to display routes to different locations from common starting

For this we need accurate lat/long of the origin and destination addresses (only 1 origin and multiple destinations). We will use following statement to draw 1 route and run it in a loop Read more…

Subclipse – How to disconnect and connect your project to a repository

Author - Rita

Right click on project -> Team ->select Disconnect option, following dialog box will appear:

Now if you want to delete complete svn metadata information, select the respective option and click yes.

Now your project is totally independent and you can attach it to any repository.

Now you Read more…

Salesforce | Read csv file, insert objects and get results back in Apex visualforce page

Author - Shalini

If you have a csv file with raw data and you want to read it using apex, convert to sfdc objects and insert these, then get success and failure results back then following steps and code can help you:

1. Create an Apex Class which will read the CSV Read more…

Sendgrid | How to send bulk emails in one batch using sendgrid in php

Author - Manju Kashyap

Recently we were working on a project in which the requirement was to send emails to 500 users at a time. Earlier, emails were being sent to 500 users in a loop 1 by 1 in which sendgrid-API was being called 500 times and this was consuming very huge Read more…

Mysql | Maximum execution time of 360 seconds exceeded at data import time

Author - Webner

In one of the project we had to import some .csv files into Mysql database. Files were of size 80mb and more. When we tried to upload the files through phpmyadmin it was resulting in timeout error – Maximum execution time of 360 seconds exceeded (see image below):

A better solution Read more…

Salesforce | Passing data from one Visualforce page to another

Author - Webner

There was a situation when we were required to pass some values from one visualforce page to another. For achieving this we invoked the second VF page by calling the controller extension of this page using following code.

In the code segment below we are passing two parameters along the Read more…

Salesforce | How to access php code in salesforce apex class

Author - Webner

We can access the php code in salesforce using @future(callout=true/false). The function we make for accessing the php code in apex class is of static type and does not return any value.

public static void function_Name()
//variable declaration
Http h Read more…

Joomla- Database Error: Unable to connect to the database

Author - Webner

While working with Joomla if you get an error – “Database Error: Unable to connect to the database:Could not connect to database”, check following properties in Joomla’s configuration.php file :

//given values are sample data only.

var $dbtype = ‘mysql’;

var $host = ‘localhost’;

var $user = ‘user_jo151’;

var $password = ‘YourPassword’;

var Read more…

‹ Prev page1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 Next page ›