Totara / moodle does not have the default feature to add custom HTML pages and display on the site. But we can achieve this by installing a plugin:
“General plugins (Local): Static Pages”
Steps to install and use this plugin in Totara:
1. Install the plugin like any other Read more…
In some cases, we need to set CreatedDate for records.
setCreatedDate() method can be used to set CreatedDate for records.
For Example : Set createddate for a contact in test class
Contact con = new Contact()
Test.setCreatedDate(con.Id, datetime.newInstance(2014, 9 Read more…
Following UNION syntax works properly in CakePHP 2.4.6 version but it doesn’t work in CakePHP 2.5.2 version:
$unionQuery = $dbo->buildStatement
‘fields’ => array( required fields),
‘table’ => $dbo->fullTableName(database_table_name),
‘alias’ => ‘customObject1’,
‘limit’ => null,
‘offset’ => null,
‘joins Read more…
Webner has been involved in the development of another highly successful platform – Great British Discounts , Click to view. Owned and promoted by L-EV8 Marketing, Great British Discounts is the go to site for those who want to avail the best deals in life. Great British Discounts is the choice Read more…
2. Remote apex method contains an annotation @RemoteAction.
Example of Read more…
In jQuery line-control editor, values written inside writing space (div) do not get posted to the server by default. This is because although we create textarea while coding, at run time a DIV is created in which user writes. Editor.editor is the Id of div at runtime. On Read more…
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…
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…
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…
We can simply use apex:inputfield and bind the field with date type field and it will automatically use the Salesforce Calander:
</apex:page> Read more…
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
Messaging.SingleEmailMessage emailTobeSent = new Messaging.SingleEmailMessage();
List ToAddress = new List();
emailTobeSent Read more…
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…
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…
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 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…
Footer is not visible or fixed at bottom, when virtual keyboard is opened in Phonegap/Cordova Application.
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…
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 functionName
List options = new List();
Schema.DescribeFieldResult result = ObjectName.FieldName(pick list field name).getDescribe();
List pick = result.getPicklistValues();
for( Schema.PicklistEntry Read more…
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…
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:
But on attempting the login with Read more…