function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bhanu_prakashbhanu_prakash 

bulk transfer of cases in lighting

Hi Team,

I need to implement bulk transfer of records of case to change owner . How can i acheive it on lightning?

 User-added image

Thanks for advance.

Regards,
Bhanu
Gaurav Saraswat 35Gaurav Saraswat 35
Hey,

In lightning we are still not allowed to use lightning component on list view button. So in lightning experience you have to use same visualforce page buttons just like we do in salesforce classic. But for the lightning experience you can implement the slds classes inside your visualforce page.

To use slds in visualforce page you need to use <apex:slds /> tag inside your <apex:page> tag and then you will be able to utilize all avaiable classes. 

And if you really stick to use develop lightning component, the only option is to use it on visaulforce page using lightning out but it will be more complicated to fetch all selected record id from list view in vf and then pass them into lightning component. So I will suggest you to use visualforce page with slds classes for the lightning experience.

For more information you can follow the below link :- 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_styling_slds.htm

 
bhanu_prakashbhanu_prakash
Thaanks bro. we need to use mass transfer of cases in lightning. How can i bypass standrad case to my vfpage.if do you have any code refers help me lot :)
Gaurav Saraswat 35Gaurav Saraswat 35
Custom controller :- 

private ApexPages.StandardSetController standardController;

    public constructor(ApexPages.StandardSetController standardController)
    {
        this.standardController = standardController;
    }
    
    public PageReference orderItems(){
        Map<Id,sObject> selectedProducts = new Map<Id,sObject>((List<InvProductComponent__c>) standardController.getSelected());
        // do with anything you need to do with selected products. 
        
        return new PageReference('/'+InvProductComponent__c.sObjectType.getDescribe().getKeyPrefix());
    }

for complete code you can follow the below link in which you can find a sample visualforce page with standard controller and custom controller to access the standard set controller 

https://hastebin.com/ejobesacug.xml


Hope it helps and concludes your question.