Asynchronous Apex
Asynchronous Apex in Salesforce allows developers to execute operations in a separate thread, enabling tasks to run in the background without impacting the user experience. This approach is particularly beneficial for handling long-running processes, callouts to external systems, and operations
Moodle: Performing search through wildcard queries with ‘Like’ operator
‘Like’ operator of SQL can be used in the following ways in Moodle: Using expression $DB->sql_like: $grade_item_test = $DB->get_records_sql ( ‘SELECT * FROM {grade_items} WHERE ‘.$DB->sql_like(‘idnumber’, ‘:idnum’).’ AND courseid=:cid order by itemmodule’, array (‘idnum’=>’test’,’cid’=> $courseid) ); Using like operator: $grade_item_test
Salesforce | Select * in SOQL and dynamic queries
Execute dynamic query in salesforce. Also retrieve all fields from salesforce object without writing fields names in query. Solution: In Salesforce we can’t write as Select * from object. We have to mention the field specific field name to query
Salesforce | Upload Document in Salesforce using javascript
We can create a document/attachment object record in Salesforce using Javascript by calling Salesforce soap webservice. Note – Variable __sfdcSessionId is used to store sessionid. Script files: <script type=”text/javascript”>// <![CDATA[ __sfdcSessionId = ‘{!$Api.Session_Id}’; // ]]></script> <script src=”/soap/ajax/30.0/connection.js” type=”text/javascript”></script> <script src=”/soap/ajax/30.0/apex.js”
Chargify | How to check for subscriptions having expired credit cards
If we want to check for the subscriptions having Expired Cards in chargify then there are two ways to do that: 1. By using the notification on dashboard (see image below): By clicking on the symbol of notification it will
Postgres | JSONB data type field in PostgreSQL(9.4) and using it in CakePHP
JSONB (JSON Blob) datatype in Postgres is used to save JSON data. We can search on JSONB type of column after creating an index on it. For example: Usage in PostgreSQL: 1. Create table and index CREATE TABLE tests (
Handling twitter and google plus share button in wordpress
Handling content and image sharing with twitter and google plus share buttons in wordpress To achieve dynamic content(including image) sharing from a website with share buttons (or links) for share and likes on social sites like twitter and google plus,
Moodle | Writing HTML content into pdf file and sending the pdf file as attachment
To create a new customized plugin with email functionality and sending a pdf file as attachment requires some simple lines of code with TCPDF library file inside the library directory of moodle. And for performing file operations, filelib.php reference is
Software Testing | Identifying bugs in different ways
In software testing, we have various way to identify the bug/defect. Some of them are as given below: 1. Severity Wise: * Major: When defect affects major functionality. Example: Suppose a Logo text is not Proper that will be affect
Using Google reCaptcha to authenticate user login on login form
Google reCaptcha is a free service API provided by Google to protect your site from unauthorized access, abuses and spam. The API uses advanced risk analysis technique to distinguish among a human being and a bot. The reCaptcha API comes