Popular posts from this blog
Check all checkbox while setting FLS from Profile
Open your Browser Press Ctrl + D to create a bookmark. Click on Edit. Enter Name as desired, eg: chkAll - ReadAll In the URL Enter the code below, and Click Save. To Check All Read-Only Checkbox javascript:(function(){var x = document.querySelectorAll(".readonlyCol input");for (var i = 0; i < x.length; i++) { x[i].checked=true;}})(); javascript:(function(){var x = document.querySelectorAll(".displayedCol input");for (var i = 0; i < x.length; i++) { x[i].checked=true;}})(); To UnCheck All Read-Only Checkbox javascript:(function(){var x = document.querySelectorAll(".readonlyCol input");for (var i = 0; i < x.length; i++) { x[i].checked=false;}})(); javascript:(function(){var x = document.querySelectorAll(".displayedCol input");for (var i = 0; i < x.length; i++) { x[i].checked=false;}})();
Allow other users to unlock record in approval process
Lock() and unlock() methods in the System.Approval Class let you lock and unlock records by passing in record IDs or sObjects. Enable the feature by :- Setup --> Process Automation Settings --> Enable record locking and unlocking in Apex. Create a Detail Page Button and associate it with the Visualforce Page and place it on the Page Layout. Create a Visualforce Page <apex:page standardController="Order" extensions="OrderLockUnlockController" action="{!unlock}"> </apex:page> Create a Class public class OrderLockUnlockController{ private Id recId; public OrderLockUnlockController(ApexPages.StandardController stdCtrl) { recId = stdCtrl.getId(); } public PageReference unlock(){ if (Approval.isLocked(recId)) { Approval.unlock(recId); } PageReference pageRef = new PageReference('/'+recId); pageRef.setRedirect(true); r...
Comments
Post a Comment