Java | Check if JSON field has a value before extracting

Author - Webner

We are using Json to retrieve value of a field from Json object but when field has no value it gives an error. For example from Blackboard LMS we can retrieve value of email field from JSON object with this code:
first.getJSONObject(i).getJSONObject(“contact”).getString(“email”))

And if Read more…

AssignTo method in apex (Salesforce)

Author - Kiran Preet
|
0 Comments
|

AssignTo method is a getter method in Salesforce. It is used to assign the value of an attribute to a class variable in the associated custom component controller. Getter and Setter methods or a property with get and set values must be defined, if this attribute is to be used Read more…

iCal attachment introduction

Author - Kailash
|
0 Comments
|

What is iCal attachment

iCal attachment isn event that we put into the email so that when the receiver will click the it, an event will be added to his calendar. It looks like this in email:

Example of iCal attachment format for IPL Match on Friday 09 Read more…

Selenium | Select item from listbox having dynamic id of options

Author - Webner
|
0 Comments
|

In Selenium script if we want to select a value in a dropdown but value of attribute ‘id’ of the options in the dropdown keep on changing every time then we need to find the option based on some other locator instead of ‘id’. In sample code below option is Read more…

Salesforce | Get list of Salesforce sobjects and fields in PHP

Author - Webner

Problem: How to get list of all the Salesforce sobjects in php. Also get fields of each sobject.

Solution: First we need to install Salesforce php toolkit for this. Once you have it then this is the sample code:
require_once(SFDCPHPtoolkit / soapclient / SforcePartnerClient.php ‘);
$mySforceConnection = new Read more…

phpMyAdmin | Different methods to View Table Constraints

Author - Ishpreet Kaur

How to view List of constraints of tables of Database in phpMyAdmin

There are various ways by which we can view the list of constraints applied to tables of given database in PhpMyadmin. Let’s see few methods here:

Suppose we have a database named CollegeDb Read more…

Explanation of Column3 in Moodle/Totara

Author - Kajal Marwaha

Column 3 layout in Moodle is basically dividing the screen into 3 parts .

user setting options Layout (pre )
content layout (region)
editing layout (post)

user setting options Layout (pre): In column3 layout pre region is the first column. This column is at  the left of the content. This Read more…

Purpose of Security.salt and Security.cipherSeed in CakePHP

Author - Ashish

cipherSeed in CakePHP
cipherSeed is used in Security::cipher() function to seed rand(). Seed means to give the initial value to rand() function to start and based on that the future values by rand() function are generated. In php, before 4.2.0 version, Random Number Read more…

Java | Concept of Fail Fast and Fail Safe Iterators

Author - Richa

The terms Fail Fast and Fail Safe iterators come into picture when we deal with Concurrency issue while programming in Java. In Java, while iterating over a collection if multiple threads modify the collection (such as adding a new element, deleting an element or updating the value of an element Read more…

Heroku | The datasource configuration “default” was not found in database.php

Author - Webner

Heroku throwing ERROR: “The datasource configuration “default” was not found in database.php” with database configuration already present for cakephp app.

In one of our cakephp projects hosted on Heroku we used PostgreSql database. For configuring the database to connect to app code we renamed the database.php.default file Read more…

How to convert an object into Json String in Unity3D Script (C#)

Author - Shalini

How to convert an object into JSON String in Unity3D Script (C#)?

Let’s say I have a class:
class User {
String firstName;
String lastName;
String userName;
}
User obj = new User
{
firstName = “Shalini”,
lastName = “Vashist”,
userName = “shalini.vashist”
};
And In
return I need a JSON string like this Read more…

Ajax call example

Author - Webner
|
0 Comments
|

How to call ajax function and then fill the data received from server in a table.

Suppose the is html code of view. On change in selection of the dropdown getfun() function is called that will send an ajax call to server:
<div >

<div &gt Read more…

Salesforce Mobile | Error: OAUTH_APPROVAL_ERROR_GENERIC

Author - Webner
|
0 Comments
|

SALESFORCE MOBILE

Authorization Error after successful login from mobile in salesforce connected app

When a user requests their Salesforce data from within the external application (the consumer’s page), the user must be authenticated by Salesforce.
After login into the native salesforce mobile app using the Oauth login app gives Read more…

How to install .box extension Virtual Machine

Author - Webner

To install and use .box extension machine we have to follow these steps:

1.  Installing Virtualbox:
$ sudo  apt-get install virtualbox
$ sudo apt-get install virtualbox-dkms
2.   Installing vagrant:

Please don’t install the repository version, because this is very old and the Read more…

NetSuite API | operator undefined for search

Author - Neha Mishra
|
0 Comments
|

On filtering contacts coming from Netsuite CRM based on last modified date, gives error “operator undefined for search”:

Below is the code that retrieves all the contacts from Netsuite CRM:
ContactSearch custSearch = new ContactSearch();
ContactSearchBasic custSearchBasic = new ContactSearchBasic();
custSearch.setBasic(custSearchBasic);
SearchResult result = _port.search(custSearch);
To filter Read more…

CSS3 Viewport units vh, vw, vmin and vmax explained

Author - Kiran Preet

CSS3 Viewport units vh, vw, vmin and vmax explained

Sometimes we need to fit our webpage content into viewport (visible browser window). Some developers achieve this using Javascript by checking the size of viewport and then they resize the content accordingly to fit it in the viewport. When user resizes Read more…

Selenium | Opening and closing browser tabs with Key controls

Author - Webner
|
0 Comments
|

We can use Robot class to open and close tabs in Selenium but we also have the Key_Control concept. These are keyboard shortcuts to open and close the tabs in browser :

Ctrl+t (Open New tab)
Ctrl+w (Close tab)

We can use these keyboard shortcuts in Selenium script also Read more…

Salesforce | Passing data via Javascript to Apex Controller

Author - Komal

Some situations occur when we become unable to pass the data from visualforce page to apex controller directly.  For example: Suppose you have three divs (todoDiv, doingDiv, doneDiv) that are showing some tasks through the List from apex controller. It has the drag and drop functionality that allows the user Read more…

Salesforce | System.Callout Exception: Unauthorized End Point

Author - Webner
|
0 Comments
|

I tried to send REST request to my server on click of a custom button in Salesforce. It shows me “unauthorized end point exception”.

Solution : To resolve this issue we need to add the server address as a remote site in Salesforce. Here are the steps to add remote site Read more…

Selenium Locators

Author - Webner
|
0 Comments
|

To locate elements in Selenium WebDriver, we can use findElement() for single element and findElements() to locate a list of elements satisfying the search criteria. List of different ways in which both the methods can be used are given below:
driver.findElement(By.id())
driver.findElement(By.name())
driver.findElement 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 Next page ›
Send your message