Salesforce | The inner and outer selects should not be on the same object type on recordtype object

Author - Webner

Problem: SOQL does not support using the same object name in the Subquery which is in use in outer Select.

For Example: We wanted to get the name of the object values (Record type object) using the SOQL having two conditions using different object names in the where condition as Read more…

Heroku | An introduction to Procfile and its use

Author - Webner

Introduction: We can make our Heroku app run different type of processes by creating a Procfile in the app.
There is a specific structure and syntax that we need to follow while creating a Procfile. Following are the main points to be considered while creating a Procfile:

The Procfile must Read more…

LESS Introduction | Dynamic CSS styling

Author - Webner

LESS is an open source CSS pre-processor designed by Alexis Sellier in 2009. It is not exactly CSS but acts like one with the help of Javascript libraries that interpret the stylesheet and make it readable for browsers. The very first benefit of using LESS is that LESS is Read more…

Salesforce | Email workflow created on custom object throwing error while fetching the Related Contact Id

Author - Webner

In one of our Salesforce projects we are working on, we had a custom object with an email trigger that was supposed to send email to the Related Contact. When we clicked the email button to trigger the email sending process, the Related Contact Id was not passed to the Read more…

Salesforce | Show Email sent from Salesforce in activity history

Author - Webner

Problem : How to show Email sent from Salesforce in activity history of an object

Solution : Here are the steps :

1. Set WhatId

2. Make SaveAsActivity true

Code Sample:

Messaging.SingleEmailMessage emailTobeSent = new Messaging.SingleEmailMessage();
List ToAddress = new List();
emailTobeSent Read more…

Cookie messages on websites and cookie law

Author - Richa

Why some sites show cookies message (like this site uses cookies, do you accept?) – is it required, if yes then which body recommends it?

Many websites use cookie messages to store information which is required by them for fulfilling various purposes which includes storing user’s login information, saving passwords Read more…

How to create WSDL web service client using Maven

Author - Rita

Maven provides apache cxf plugin to generate web service client.
We have used below code in our pom.xml file to generate java artifact classes (web service client).

There are two ways to generate client code:

Using complete WSDL URL

Using WSDL artifact

1. Using complete WSDL URL Read more…

MySQL | Insert multiple records and update if record(s) already exist in a single query

Author - Ishpreet Kaur

In MySQL, we generally perform insert, update, select and delete operations on records of table. Multiple Insert operation can also be easily performed on table.

Take an example of Employees table with fields:

Multiple records can be inserted in Employees table in a single query using following MySQL query :

INSERT Read more…

Data Cleansing

Author - Webner

Data Hygiene or Data Cleansing or Data Cleaning – call it by the name you prefer – all point to the process of making the data better than it is before the process is applied. “Better data” means removing what is not required, fixing what is not right, restoring data correctness, and Read more…

Cordova/Phonegap | How to fix footer at bottom when virtual keyboard is opened

Author - Webner

Problem :

Footer is not visible or fixed at bottom, when virtual keyboard is opened in Phonegap/Cordova Application.

Solution :

Consider following div create for footer :

<div data-role=”footer” data-position=”fixed” class=’custom_footer’ data-theme=’b’ data-tap-toggle=”false”></div>

To keep Footer fixed Read more…

Salesforce | Show picklist field value of custom object on Visualforce page

Author - Neha

We can show the picklist field value on Visualforce page in a selectlist ( dropdown) using the following code in the controller class:

public class classname {
public List<SelectOption> selectItemsList() {
List<SelectOption> selectOptions = new List<SelectOption>();
Schema.DescribeFieldResult describeResult = CustomObject__c.PickListFieldName__c.getDescribe();
List<Schema Read more…

Linux | How to grep only uncommented contents from any configuration file

Author - Navneet Kashyap

Problem : How to grep only uncommented contents from any configuration file which is big in size, has many comments and blank lines

Solution: This can be achieved by following single command :

# grep -v ‘^$’ /etc/httpd/conf/httpd.conf | grep -v ‘^ *#’ | less

Explanation of command :

^$ : Matches and removes all blank lines Read more…

Netsuite | Invalid email address or account number error on NetSuite, but passed correct credentials

Author - Neha Mishra

ERROR: Invalid email address or account number error on NetSuite, but passed correct credentials.

Need to authenticate NetSuite sandbox account through java application and fetch all the contacts. Below is the link to the WSDL file used to log in:

Click here

But on attempting the login with Read more…

MySQL | Upgrade MySQL 5.5 to 5.6 in Ubuntu 14.04

Author - Webner

MySql 5.5 is the default version for Ubuntu 14.04

Steps to Upgrade the mysql-server

If you have existing database in Mysql 5.5. It should be migrated automatically.

Take the backup of existing databases:

mysql> mysqldump –lock-all-tables -u root -p -all-databases > backup Read more…

Zoho | Create Zoho Subscription using the PHP and subscription API

Author - Webner

We can create new Zoho Subscriptions via code by using PHP curl and with the help of Subscription APIs.

Below is the sample code which is required to create a subscription:

$headerArray = array(“Content-Type: application/json;charset=UTF-8”,
“X-com-zoho-subscriptions-organizationid: 00000000”,
“Authorization: Zoho-authtoken ——–Auth Read more…

MySQL | Find if particular value is selected in multi pick list

Author - Webner

In simple pick list we can select only one value but in multi pick list we can select one or more values.

Scenario: We had to multi pick list data type field

Fields that we wanted to select :

1. Field_1
2. Field_2
3. Field_3
4. Field_4

Case 1 : Check if Read more…

PHP | Use Of strtr() function

Author - Webner

In PHP if you want to replace multiple variables of the string at one go you could use strtr() instead of using str_replace().

Example :

$vars = array(
‘##conferencelinenumber##’ =>$conferencelinenumber,
‘##pincode##’ =>$pincode,
‘##reminders##’=> ‘ ‘,
‘##name##’ =>$name,
$BODY=strtr Read more…

Moodle/ Totara | Page api to get activity details for particular activity

Author - Kritika Sood

In one of our Totara theme projects, we wanted to hide default breadcrumbs and show our own breadcrumbs on activity page like columns 1, columns 2 or columns 3. To get the activity details for a particular activity, we can write custom queries but as there were multiple activities like Read more…

Salesforce | Split function on some special characters like (.) does not work in apex

Author - Webner

Description: Using a Split function over some special characters like ‘.’ is bit ambiguous, As Apex does not recognise these characters to be part of the splitting string.

For Example: //this will fail reporting a size of 0
string s = ‘first.second’;
string[] part;
part = s.split(‘.’);
System.DEBUG(part.size Read more…

CakePHP | How to skip CakePHP authentication for some controller methods

Author - Rita

Description: By default, CakePHP authentication is applied to all application controllers. So it does not allow users to perform any of the action without login.

Solution: Each controller has a beforeFilter method which runs when some action is called from controller. Add below lines to your method:
Public function beforeFilter Read more…

‹ Prev page1 ... 36 37 38 39 40 41 42 43 44 45 46 ... 54 Next page ›