Salesforce | Show Email sent from Salesforce in activity history

Author - Webner
|
0 Comments
|

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();
ToAddress.add(‘Example@gmail.com’);
emailTobeSent.setToAddresses(ToAddress);
emailTobeSent.setSubject(‘Subject);
emailTobeSent Read more…

Cookie messages on websites and cookie law

Author - Richa
|
0 Comments
|

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
|
0 Comments
|

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
|
0 Comments
|

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
|
0 Comments
|

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
|
2 Comments
|

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
|
0 Comments
|

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(
‘##session_date##’=>$sessiondate,
‘##session_time##’=>$sessiontime,
‘##conferencelinenumber##’ =>$conferencelinenumber,
‘##pincode##’ =>$pincode,
‘##coachingcommnets##’=>$coachingcomments,
‘##actioncommitmnets##’=>$actioncommitmnets,
‘##reminders##’=> ‘ ‘,
‘##name##’ =>$name,
‘##breakline##’=>'<br><br>’,
);
$BODY=strtr Read more…

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

Author - Kritika Sood
|
0 Comments
|

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
|
0 Comments
|

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…

Java | Delete empty string from list or array

Author - Webner

public class deleteEmptyStringQuick
{
public static void main(String[] args)
{
String[] emptyStringArray={“test”,”test1″,””,”test3″,””,”test4″};
ArrayList arrayListOfEmptyString=(ArrayList) Arrays.asList(emptyStringArray);

//normally we will do this
ArrayList filteredList = new ArrayList();
for(String string: arrayListOfEmptyString)
{
if(!string.isEmpty())
{
filteredList.add(string);
}
}

//You can achieve this with single line as well:
filteredList Read more…

How to handle grub rescue problem in dual boot systems

Author - Webner

Description: In a dual boot system (Ubuntu/windows), if you delete the boot partition of ubuntu or delete the Linux operating system by formatting the drive then you will face the grub rescue problem.

In this problem we have two cases:

You have deleted the boot partition of Read more…

PHP | Header function not working

Author - Webner

Code :
Function getredirect($subcontactid)
{
echo”contactid”.$subcontactid;
header(“location:https://subscriptions.zoho.com/app#/customers/$subcontactid”);
exit;
}

The header function in the above code does not work. But when we remove the echo from the code, it works properly.

Code after removing echo :
Function getredirect($subcontactid)
{
header(“location:https://subscriptions Read more…

iOS | Inconsistent Status Bar in iOS Phonegap Application

Author - Vivek Gautam
|
0 Comments
|

Problem : Header goes under the status bar and menu button is not clickable in Phonegap/Cordova Application.

Solution :

In the iOS version 7.0, App View covers full screen including the status bar, and the view starts from top of the screen i.e. origin(0,0); which was not Read more…

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