Posts

Showing posts from November, 2019

How to change Page Layout

First of all you need to go to :  Setup => Search Profile                                        ==> Select profile you have used                                       ===> Select Object Setting    and choose object you used                                       ====> Now you can edit on  Record Types and Page Layout Assignments You can change by record type.                                       

How to use method "Future in Apex"

Future method is used to run code that took to long to process, so if you don't want to wait it working, you can used this @future for running it as backgound. public PageReference TestOne() { TestTwo('This is future method'); return null; } @future(callout=true) private static void TestTwo(String desc){ System.debug(desc); }

How to extends class in apex

// class one public virtual class MyCodeController { } // class two public class TestController extends MyCodeController { public TestController{ super(); } }

How to create e.force:showToast whith link

Image
In your controller showToast: function (type, message) { var toastEvent = $A.get('e.force:showToast'); var mode = 'dismissible'; var duration = 3000; if (type === 'error') { duration = 20000; } toastEvent.setParams({ type: type, mode: mode, duration: duration, message:"You Message", messageTemplate: "The record '{0}' has been updated successfully.", messageTemplateData: [{ label:"#123456", url: "/Your record Id" }] }); toastEvent.fire(); }