Activity › Forums › Salesforce® Discussions › What is the use of virtual keyword for a class in Salesforce? Salesforce® Discussions What is the use of virtual keyword for a class in Salesforce? Posted by Ratnesh on July 21, 2020 at 6:19 AM What is the use of virtual keyword for a class in Salesforce? Kirandeep replied 5 years, 10 months ago 2 Members · 1 Reply 1 Reply Kirandeep Member July 21, 2020 at 12:51 PM If you use the ‘virtual‘ keyword, then it indicates that this class can be extended and overrides are allowed. If the methods need to be overridden, then the classes should be declared with the virtual keyword. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me