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
Salesforce | Visualforce Component to AWS S3
Description : To access the features provided by amazon for storage and cloud computations from a visualforce component , the S3 service uses information from the form’s input fields to authorize uploads, and to set the properties of uploaded file
jQuery and HTML5 validations together
When we use HTML5 validation on form fields like required attribute, input type email, pattern attribute etc, then form data is not submitted until all HTML5 validations are passed. But if we associate some jquery code to the submit button
Java | Execute SQL script using Maven
Whenever there is a change in the database whether we are altering database structure or adding/updating data inside database most of the times we create a script file and run it manually. We can automate this process using Maven. Solution:
PHP | strpos() and result compare
strpos($wholeText, $findText) in PHP returns position from which the $findText value starts if it is present in $wholeText. If it is not found then this function returns false. Fun starts when text is found at the very beginning (at position
Salesforce | Delete the Info/list of records permanently from Salesforce Recycle Bin
You are not able to delete the records permanently and the records will be stored into the Recycle bin till 15 days from the deletion date: Number of records stored in recycle bin = 5000* Number of Licenses your organisation
PHP – Get files modified on a particular date
Solution: In following example we have filtered files which are modified on current date (today’s date): $source= “C:\wamp\www\Files\”; $files = scandir($source); $archiveFiles = array(); foreach($files as $file) { if (!in_array($file,array(“.”,”..”))) { $lastModified = date(‘d/m/y’,filemtime($source . ‘/’ .$file)); IF($lastModified==date(“d/m/y”)) { array_push($archiveFiles, $file);
Moodle/Totara | Moodle not inserting values to new column added to an existing table
In Moodle, if we alter a table by adding a new column to it and use Moodle $DB->insert_record(‘table_name’,$dataobject) , it inserts the value which are assigned to old columns but not to the newly created columns. For Example: if we
Selenium | How to locate an element with css selector and set value in it using code
See the image below and html source of it. There is an element with name “email”. If we want to access that field and set a value in it, we can achieve that with this sample code: public void test()
Salesforce | Get all the documents located in ‘My Personal Documents’ folder
In Salesforce, we can get list of all the documents located in a particular folder by using the following query : folderId = [SELECT Id FROM Folder WHERE Name = ‘FolderName’] [SELECT Id, Name FROM Document WHERE FolderId =:folderId] But