• Major1507
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 12
    Replies
Hi Everyone, below is my code and I;m getting this issue of - Assertion Failed: Expected: false, Actual: true
@IsTest(SeeAllData = true)
public with sharing class LightningLoginFormControllerTest {

 @IsTest
 static void LightningLoginFormControllerInstantiation() {
  LightningLoginFormController controller = new LightningLoginFormController();
  System.assertNotEquals(controller, null);
 }

 @IsTest
 static void testIsUsernamePasswordEnabled() {
  System.assertEquals(false, LightningLoginFormController.getIsUsernamePasswordEnabled());
 }

 @IsTest
 static void testIsSelfRegistrationEnabled() {
  System.assertEquals(false, LightningLoginFormController.getIsSelfRegistrationEnabled());
 }

 @IsTest
 static void testGetSelfRegistrationURL() {
  System.assertEquals(null, LightningLoginFormController.getSelfRegistrationUrl());
 }

 @IsTest
 static void testAuthConfig() {
  Auth.AuthConfiguration authConfig = LightningLoginFormController.getAuthConfig();
  System.assertNotEquals(null, authConfig);
 }
}

 
Hi, I have the following apex class for file upload. I'm struggling to get the code coverage more than 75%. any help is appreciated.

Apex class - 


public with sharing class customFileUploadctrl {
    @AuraEnabled(cacheable=true)
    public static List<file> getRelatedFiles(String recordId, String sectionType, String screen){
        List<File> files = new List<File>();
        system.debug('screen value is' + screen);
        if(screen == null){
            screen = 'default';
        }

        //retrieve contentDocumentLIst
        List<ContentDocumentLink> contentDocumentList = getContentDocumentList(recordId);
        system.debug('contentDocumentList' + contentDocumentList);

        //setdocumentId
        Set<Id> contentDocumentIdSet = getContentDocumentIdSet(contentDocumentList);

        //retrieve the contentversion for the specific sectionType
        Set<Id> contentDocumentForSectionIdSet = getContentDocumentForSectionIdSet(contentDocumentIdSet,sectionType, screen);
        system.debug('contentDocumentForSectionIdSet' + contentDocumentForSectionIdSet);

        for(ContentDocumentLink conLink : contentDocumentList){
            if(contentDocumentForSectionIdSet.contains(conLink.ContentDocumentId)){
                File file = new File();
                file.Title = conLink.ContentDocument.Title;
                file.Id = conLink.ContentDocument.Id;
                file.CreatedDate = conLink.ContentDocument.CreatedDate;
                file.Type = conLink.ContentDocument.FileType;
                file.Description = conLink.ContentDocument.Description;
                files.add(file);

            }
        }            
        
        return files;
    }

    @AuraEnabled
    public static boolean updateType(List<string> documentArray, string sectionType, string screen){
        system.debug('in the updatetype@@' + sectionType);
        system.debug('screen' + screen);
        if(screen == null){
            screen = 'default';
        }
        List<contentversion> contentVersionList = new List<contentversion>();
        Set<Id> contentDocumentSetId = new Set<Id>();

        /*for(string documentDetails : documentArray){
            contentversion contentVersionItem = new contentversion();
            contentVersionItem.contentDocumentId = Id.valueOf(documentDetails);
            contentVersionItem.Type_fileupload__c = sectionType;
            contentVersionList.add(contentVersionItem);            
        }*/

        for(string documentDetails : documentArray){
            contentDocumentSetId.add(Id.valueOf(documentDetails));
        }
       

        for(contentversion contentversionItem : [SELECT Id, Type__c
                                                    FROM contentversion
                                                    WHERE contentDocumentId=:contentDocumentSetId]){
            contentversion contentVersionRec = new contentversion();
            contentVersionRec.Id = contentversionItem.Id;
            contentVersionRec.Type__c = sectionType;
            contentVersionRec.screen__c = screen;
            contentVersionList.add(contentVersionRec);                                             
        }

        system.debug('contentVersionLis' + contentVersionList);
        update contentVersionList;
        return true;

    }

    private static List<ContentDocumentLink> getContentDocumentList(String recordId){
        List<ContentDocumentLink> contentDocumentList = new List<ContentDocumentLink>();

        return [SELECT ContentDocument.Id, 
                        ContentDocumentId,
                                ContentDocument.Title, 
                                ContentDocument.CreatedDate, 
                                ContentDocument.FileType,
                                ContentDocument.Description
                                    FROM ContentDocumentLink                                     
                                   WHERE LinkedEntityId =: recordId] ;
    }

    private static set<Id> getContentDocumentIdSet(List<ContentDocumentLink> listContentDocumentLinkId){
        set<Id> contentDocumentSetId = new set<Id>();
        for(ContentDocumentLink contentDocItem: listContentDocumentLinkId){
            contentDocumentSetId.add(contentDocItem.ContentDocumentID);
        }
        return contentDocumentSetId;
    }


    private static Set<Id> getContentDocumentForSectionIdSet(Set<Id> contentDocumentSet, String sectionType, String screen){
        Set<Id> contentDocumentForSectionIdSet = new Set<Id>();

        for(ContentVersion conLink : [SELECT ContentDocumentId 
                                                    FROM ContentVersion                                            
                                                    WHERE ContentDocumentId =: contentDocumentSet 
                                                    AND Type__c =: sectionType
                                                    AND screen__C =: screen] ){

            contentDocumentForSectionIdSet.add(conLink.ContentDocumentId); }

        return contentDocumentForSectionIdSet;    
    }



    public class File{
        @AuraEnabled public String Title;
        @AuraEnabled public String Type;
        @AuraEnabled public Id Id;
        @AuraEnabled public Datetime CreatedDate;
        @AuraEnabled public String Description;
    }
}
Test class - 
@isTest
public class customFileUploadctrlTest {

    public static TestMethod void testScenario1(){
       List<String> newStr = new List<String>();
       
       string before = 'Testing base 64 encode';            
         Blob beforeblob = Blob.valueOf(before); 
        
        List<contentversion> conver = new List<contentversion>();
        contentversion rec = new contentversion();
        rec.Title = 'Test';
        rec.screen__c = 'Screen';
        rec.PathOnClient = 'PathTest';
        rec.VersionData = beforeblob;
        rec.Description = 'test description';
        rec.Type__c = 'Invoices';
        conver.add(rec);
        
        insert conver;
      
        List<ContentDocumentLink> cdlink = new List<ContentDocumentLink>();
        set<Id> contentDocumentSetId = new set<Id>();
        
        Test.startTest();
        	customFileUploadctrl.getRelatedFiles('a073G000002LM7hQAG','Test','Test1');
        	customFileUploadctrl.updateType(newStr, 'test','test1');
        Test.stopTest();
    }
}


 
Hi everyone, I'm new to writing test classes and need help to create one of the test class.
Below is the class that I created. can someone help me with the test class for it?
public with sharing class customFileUploadctrl {
    @AuraEnabled(cacheable=true)
    public static List<file> getRelatedFiles(String recordId){
        List<File> files = new List<File>();

        for(ContentDocumentLink conLink : [SELECT 
                                                ContentDocument.Id, 
                                                ContentDocument.Title, 
                                                ContentDocument.CreatedDate, 
                                                ContentDocument.FileType,
                                                ContentDocument.Description
                                                    FROM ContentDocumentLink 
                                                        WHERE LinkedEntityId =: recordId]){
            File file = new File();
            file.Title = conLink.ContentDocument.Title;
            file.Id = conLink.ContentDocument.Id;
            file.CreatedDate = conLink.ContentDocument.CreatedDate;
            file.Type = conLink.ContentDocument.FileType;
            file.Description = conLink.ContentDocument.Description;
            files.add(file);
        }
        return files;
    }


    public class File{
        @AuraEnabled public String Title;
        @AuraEnabled public String Type;
        @AuraEnabled public Id Id;
        @AuraEnabled public Datetime CreatedDate;
        @AuraEnabled public String Description;
    }
}

 
i want to have a Save and Next button in flow using LWC instead of the standard Next button. Can anyone help with the code of the same?
I have a custom lwc component to upload multiple files in a given record. I want that the files uploaded under the Notes and Attachment section of that record to be displayed in a datatable on the same custom component and the user should have access to remove the attachment from the component rather than going to the record and deleting it.
Below is my code:

Markup:
<template>
    <div class="ds_custom_body">
        <div class="ds_width-container js-enabled">
            <div class={formGroupClass}>
                <label class="ds_label" for="file-upload">
                    
                <img id="u21_img" class="img " src="https://d1icd6shlvmxi6.cloudfront.net/gsc/7CR7K2/66/9d/a7/669da75ef5c94006bba8c6b217a48a59/images/return_on_investment__3__1/file_upload_u21.svg?pageId=63f05657-437f-4a8d-8fa3-42798c6e5946">
                &nbsp;&nbsp;&nbsp;&nbsp;
                    {fileUploadLabel}
                </label>
                <span id="file-upload-error" class="ds_error-message slds-hyphenate" if:true={hasErrors}>
                    <span class="ds_visually-hidden">Error:</span>&nbsp;{errorMessage}
                </span>
                <input class={inputClass} id="file-upload" name="file-upload" type="file" accept={acceptedFormats}
                    multiple onchange={handleFilesChange} aria-describedby="file-upload-error" hidden />

                <div if:true={fileNames}>
                    {fileNames}
                </div><br />
                <template if:true={data}>
                    <lightning-card title="Uploaded Files" icon-name="standard:account">
                        <div style="width: auto;">
                            <lightning-datatable data={data} 
                                                 columns={columns} 
                                                 key-field="id">
                            </lightning-datatable>
                        </div>
                    </lightning-card>
                </template>
            </div>
        </div>
    </div>
</template>

Js Controller:
import { LightningElement, wire, api, track } from 'lwc';
 import { FlowAttributeChangeEvent } from 'lightning/flowSupport';
 import saveFiles from '@salesforce/apex/FileUploadController.saveFiles';
 import { MessageContext, publish, subscribe, unsubscribe } from 'lightning/messageService';
 import REGISTER_MC from '@salesforce/messageChannel/registrationMessage__c';
 import VALIDATION_MC from '@salesforce/messageChannel/validateMessage__c';
 import VALIDATION_STATE_MC from '@salesforce/messageChannel/validationStateMessage__c';

 const columns = [{
    label: 'Title',
    fieldName: 'FileName',
    type: 'url',
    typeAttributes: {
        label: {
            fieldName: 'Title'
        },
        target: '_blank'
    }
}];
 
 export default class GovFileUpload extends LightningElement {
     
     @api fieldId = "uploadField";
     @api fileUploadLabel = "Upload a file";
     @api acceptedFormats = "image/png, image/jpg, .pdf, .doc, .docx, .zip";
     @api maxFileSizeInMB = 2;
     @api required = false;
     @api errorMessage = "Select a file"; 
 
     @api filesUploadedCollection = []; 
     @api filesUploadedExpanded = []; 
     @api filesUploaded; 
 
     @api useApexToSaveFile;   
     @api recordId = "";
     
     @track hasErrors = false;
     @track fileNames = '';
     @track columns = columns;
 
     get formGroupClass() {
         let formGroupClass = "";
         formGroupClass =  this.hasErrors ? "ds_form-group ds_form-group--error" : "ds_form-group";
         return formGroupClass;
     }
 
     get inputClass() {
         let inputClass = "";
         inputClass =  this.hasErrors ? "ds_file-upload ds_file-upload--error" : "ds_file-upload";
         return inputClass;
     }
 
     handleFilesChange(event) {
         this.clearError();
         let files = event.target.files;
         if(files.length > 0) {
             let filesName = '';
             for (let i = 0; i < files.length; i++) {
                 let file = files[i];
                 filesName = filesName + file.name + ',';
                 if(file.size > (this.maxFileSizeInMB * 1000000)) {
                     this.hasErrors = true;
                     this.errorMessage = `The selected file(s) must be smaller than ${this.maxFileSizeInMB} MB`;
                     return;
                 }
                 let freader = new FileReader();
                 freader.onload = f => {
                     let base64 = 'base64,';
                     let content = freader.result.indexOf(base64) + base64.length;
                     let fileContents = freader.result.substring(content);
                     if (i==0) {
                         this.filesUploaded = file.name;
                     } else {
                         this.filesUploaded = this.filesUploaded + ';' + file.name;
                     }
                     this.filesUploadedCollection.push(file.name);
                     this.filesUploadedExpanded.push({
                         Title: file.name,
                         VersionData: fileContents
                     });
                     this.useApexToSaveFile = true;
                     if(this.recordId !== "" && this.useApexToSaveFile && (i+1) === files.length) {
                         this.handleSaveFiles();
                     } 
                     if((i+1) === files.length) {
                         this.dispatchUploadEvent();
                     }  
                 };
                 freader.readAsDataURL(file);
             }
             this.fileNames = filesName.slice(0, -1);
         }
     }
 
     handleSaveFiles() {
         saveFiles({
             filesToInsert: this.filesUploadedExpanded,
             strRecId: this.recordId
          })
         .then(data => {
         })
         .catch(error => {
             this.hasErrors = true;
             this.errorMessage = error;
         }); 
     }
 
     // messaging attributes
     @wire(MessageContext) messageContext;
     validateSubscription;
 
     // LMS functions
     subscribeMCs() {
         if (this.validateSubscription) {
             return;
         }
         this.validateSubscription = subscribe (
             this.messageContext,
             VALIDATION_MC, (message) => {
                 this.handleValidateMessage(message);
             });
     }
 
     unsubscribeMCs() {
         unsubscribe(this.validateSubscription);
         this.validateSubscription = null;
     }
 
     connectedCallback() {
         // subscribe to the message channels
         this.subscribeMCs();
 
         // publish the registration message after 0.1 sec to give other components time to initialise
         setTimeout(() => {
             publish(this.messageContext, REGISTER_MC, { componentId: this.fieldId });
         }, 100);
     }
 
     disconnectedCallback() {
         this.unsubscribeMCs();
     }
 
     handleValidateMessage(message) {
         this.handleValidate();
     }
 
     @api 
     handleValidate() {
         this.hasErrors = false;
         if(this.required && this.filesUploadedExpanded.length === 0) {
             this.hasErrors = true;
         }
         publish(this.messageContext, VALIDATION_STATE_MC, {
             componentId: this.fieldId,
             isValid: !this.hasErrors,
             error: this.errorMessage
         });
         return !this.hasErrors;
     }
 
     @api 
     clearError() {
         this.hasErrors = false;
     }
 
     dispatchUploadEvent() {
         // tell the flow engine about the upload
         const attributeChangeEvent = new FlowAttributeChangeEvent('value', JSON.stringify(this.filesUploaded));
         this.dispatchEvent(attributeChangeEvent);
 
         // tell any parent components about the upload
         const fileUploadEvent = new CustomEvent('fileUpload', {
             detail: {
                 id: this.fieldId,
                 value: JSON.stringify(this.filesUploaded)
             }
         });
         this.dispatchEvent(fileUploadEvent);
     }

     removeReceiptImage(event) {
        var index = event.currentTarget.dataset.id;
        this.filesData.splice(index, 1);
    }
 
 }

MetaXml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>55.0</apiVersion>
    <isExposed>true</isExposed>
    <description>This help users select and upload a file.</description>
    <masterLabel>Gov File Upload</masterLabel>
    <targets>
        <target>lightning__FlowScreen</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__FlowScreen">
            <property name="fieldId" type="String" label="Field Id" required="true" default="uploadField" description="Field Id - must be unique to this process"/>
            <property name="fileUploadLabel" type="String" label="Field Label" default="Upload a file" description="The label to display"/>
            <property name="acceptedFormats" type="String" label="Accepted File Formats" default="image/png, image/jpg, .pdf, .doc, .docx, .zip" description="A valid case-insensitive filename extension, starting with a period (.) character. For example: .jpg, .pdf, or .doc."/>
            <property name="maxFileSizeInMB" type="Integer" label="Max Files Size Allowed (in MB)" default="2" description="The maximum file size allowed to upload in MB (Max Value should not be greater than Salesforce Standards)"/>
            <property name="required" type="Boolean" label="Required?" default="false" description="If True, user must enter at least one file."/>
            <property name="errorMessage" type="String" label="Error Message" default="Select a file" description="Error Message to display"/>
            <property name="useApexToSaveFile" type="Boolean" label="Use Apex Function to Save File"  default="true" description="Must be set to True - {!$GlobalConstant.True}. [This feature is not yet enabled]"/>
            <property name="recordId" type="String" label="Related Record ID" description="The ID of the Salesforce record to associate the files with.  A value must be entered or the flow will fail."/>        
            <property name="filesUploaded" type="String" label="Uploaded file names" description="Semi-colon delimited list of file names uploaded. Text variable. Output only."/>
            <property name="filesUploadedCollection" type="String[]" label="Uploaded file names Collection" description="A collection variable to hold the names of any files uploaded. Output only."/>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

Apex Controller:
public with sharing class FileUploadController {
    
    @AuraEnabled
    public static void saveFiles(List<Object> filesToInsert, String strRecId) { 
        List<Id> lstCntVerIds = new List<Id>();
        List<ContentVersion> lstVersionsToInsert = new List<ContentVersion>();
        for (Object objFile : filesToInsert) {
            FileInfo fileData = (FileInfo)JSON.deserialize(JSON.serialize(objFile), FileInfo.class);
            ContentVersion objCntVersion = new ContentVersion();
            objCntVersion.PathOnClient = fileData.Title;
            objCntVersion.Title = fileData.Title;
            objCntVersion.VersionData = fileData.VersionData;
            lstVersionsToInsert.add(objCntVersion);
        }
        
        if(!lstVersionsToInsert.isEmpty()) {
            List<Database.SaveResult> res = Database.INSERT(lstVersionsToInsert);
            for (Database.SaveResult saveResult : res) {
                if(saveResult.isSuccess()) {
                    lstCntVerIds.add(saveResult.getId());
                }
            }
            List<ContentDocumentLink> lstCntDocLinkToInsert = getLstCntDocLink(lstCntVerIds, strRecId);
            if(!lstCntDocLinkToInsert.isEmpty()) {
                try {
                    List<Database.SaveResult> res2 = Database.INSERT(lstCntDocLinkToInsert);
                } catch (DmlException dmlEx) {
                    throw new AuraHandledException('Could not insert document to database. Check user permissions ' + dmlEx.getMessage());
                }
            }
        }  
    }
    
    private static List<ContentDocumentLink> getLstCntDocLink(List<Id> lstCntVerIds, String strRecordId) {
        List<ContentDocumentLink> lstCntDocLink = new List<ContentDocumentLink>();
        List<ContentVersion> lstContVersion = new List<ContentVersion>();
        if(!lstCntVerIds.isEmpty()) {
            if(ContentVersion.SObjectType.getDescribe().isAccessible()) {
                lstContVersion = [SELECT ContentDocumentId FROM ContentVersion WHERE Id IN :lstCntVerIds];
            }
            for(ContentVersion objCntVer : lstContVersion) {
                ContentDocumentLink objCntDocLink = new ContentDocumentLink();
                objCntDocLink.ContentDocumentId = objCntVer.ContentDocumentId;
                objCntDocLink.LinkedEntityId = strRecordId;
                objCntDocLink.ShareType = 'V';
                lstCntDocLink.add(objCntDocLink);
            }
        }
        return lstCntDocLink;
    }
    
    public class FileInfo {
        public String Title;
        public Blob VersionData;
    }
    
}

​​​​​​​​​​​​​​
I have a scenario where I have a custom object "Stock Count" that has a lookup to product and a number field. 
I'm creating an opportunity with amount - 4 and adding a line item for the smae product.
I need to write a trigger that updates the stock number from 10 to 6 as we are selling 4.
I also need a test class showing positive, negative, bulk and user profile test.
I want to make the Notes records uneditable once they are saved. There also should be no permission to delete the Notes.
Please let me know if this is possible through OOTB configuration or would we need to create a custom component to acheive this functionality.
public class PagerDutyUtility {
   @TestVisible private Static Integer WAITTIME;
   @TestVisible private Static String APIKey;
   @TestVisible private Static String errorResponse;
   @TestVisible private Static Integer PERCALL;
   @TestVisible private Static Integer TIMEOUT;
    
    public static void getCustomSetting() {
        //get default settings
        PDConfig__c config = PDConfig__c.getOrgDefaults();
        WAITTIME = 1000;
        APIKEY = config.API_Key__c;
        errorResponse = config.Default_Error__c;
        PERCALL = Integer.valueOf(config.PerCall__c);
        TIMEOUT = Integer.valueOf(config.timeout__c); 
    }
    
    @AuraEnabled 
    public static List<PagerDutyWrapper> initializeData() {
        getCustomSetting();
        
        List<PagerDutyWrapper> data = new List<PagerDutyWrapper>();
        Map<String, String> businessServices = new Map<String, String>(); 
        
        //get all business services and dependencies
        PagerDutyBusinessServices pdbs = fetchBusinessServices();
        system.debug(pdbs);
        if(pdbs != null) {
            PagerDutyBusinessDependencies deps = new PagerDutyBusinessDependencies();
            deps.relationships = new List<PagerDutyBusinessDependencies.Relationship>();
            for(PagerDutyBusinessServices.cls_business_services pdb : pdbs.business_services) {
                PagerDutyWrapper pdw = new PagerDutyWrapper();
                pdw.serviceID = pdb.id;
                pdw.serviceName = pdb.name;
                pdw.services = new List<PagerDutyData>();
                deps.relationships.addAll(fetchBusinessDependencies(pdb.Id).relationships);
                data.add(pdw);
            }          
            
            //get all services
            List<String> serviceIDs = new List<String>();
            PagerDutyServices pds = fetchServices();
            if(pds != null) {
                //gather all service IDs
                for(PagerDutyServices.cls_services service : pds.services) {
                    serviceIDs.add(service.id);
                }
            }
            
            //sort relationships
            for(PagerDutyBusinessDependencies.Relationship relationship : deps.relationships) {
                for(PagerDutyWrapper wrapper : data) {
                    if(wrapper.serviceID == relationship.dependent_service.id) {
                        for(PagerDutyServices.cls_services service : pds.services) {
                            if(service.Id == relationship.supporting_service.id) {
                                if(wrapper.services.size() > 0) {
                                    Boolean found = false;
                                    for(PagerDutyData wrapperservice : wrapper.services) {
                                        if(wrapperservice.serviceID == relationship.supporting_service.id) {
                                            //already exists, no need to replicate.
                                            found = true;
                                            break;
                                        }
                                    }
                                    if(!found) {
                                        wrapper.services.add(new PagerDutyData(service.ID, service.Name, null));
                                    }
                                } else {
                                    wrapper.services.add(new PagerDutyData(service.ID, service.Name, null));
                                }
                            }
                        }
                    }
                } 
            }
            
            //gather all Incidents from Service IDs
            PagerDutyIncidents pdis = fetchIncidents(serviceIDs);
            
            //parse through all services and IDs to create PagerDutyData records and store them in List
            for(PagerDutyServices.cls_services service : pds.services) {
                Map<Integer, Map<String, String>> incidents = new Map<Integer, Map<String, String>>();
                for(PagerDutyIncidents.cls_incidents incident : pdis.incidents) {
                    if(incident.service.id == service.id) {
                        Integer incidentnum = incident.incident_number;
                        Map<String,String> incidentdata = new Map<String, String>();
                        incidentdata.put('title', incident.title);
                        incidentdata.put('created_at', incident.created_at);
                        incidentdata.put('status', incident.status);
                        incidentdata.put('description', incident.description);
                        incidentdata.put('incident_number', String.valueOf(incident.incident_number));
                        incidentdata.put('id', incident.Id);
                        if(incident.priority != null) {
	                        incidentdata.put('priority', incident.priority.summary);
                        } else {
                            incidentdata.put('priority', '');
                        }
                        incidents.put(incidentnum, incidentdata);
                    }
                }
                
                for(PagerDutyWrapper wrapper : data) {
                    for(PagerDutyData existingPDD : wrapper.services) {
                        if(existingPDD.serviceID == service.ID) {
                            existingPDD.setIncidents(incidents);
                        }
                    }
                }
                //PagerDutyData newPDD = new PagerDutyData(service.ID, service.Name, incidents);
                //data.add(newPDD);
            }
        }
        
        system.debug('+++ ' + data);
        return data;
    }
    
    public static PagerDutyServices fetchServices() {
        if(APIKey == null) {
            getCustomSetting();
        }
        String response = getAllServices();
        if(response != null && response != errorResponse) {
            return (PagerDutyServices)JSON.deserialize(response, PagerDutyServices.class);
        }
        
        return new PagerDutyServices();
    }
    
    public static String getAllServices() {
        String endPoint = '/services?limit=' + PERCALL;
        String apiResponse = PagerDutyUtility.getResponse(endPoint, 'GET', '', '5000', APIKey);
        return apiResponse;
    }
       
    public static PagerDutyIncidents fetchIncidents(List<String> serviceIDs) {
        PagerDutyIncidents pdis = new PagerDutyIncidents();
        pdis.incidents = new List<PagerDutyIncidents.cls_incidents>();
        
        Integer offset = 0;
        PagerDutyIncidents newpdis = new PagerDutyIncidents();
        do {
            String response = getAllIncidents(serviceIDs, offset);
            if(response != null && response != errorResponse) {
                newpdis = ((PagerDutyIncidents)JSON.deserialize(response, PagerDutyIncidents.class));
                
                pdis.incidents.addAll(newpdis.incidents);
                offset += PERCALL;
            }
        } while(newpdis.more == true);
        return pdis;
    }
    
    public static String getAllIncidents(List<String> serviceIDs, Integer offset) {
        String endPoint = '/incidents?';

        endPoint += 'time_zone=UTC&since=2020-01-01T00:00:00Z&statuses[]=triggered&statuses[]=acknowledged&statuses[]=resolved&until=' + string.valueof(date.today().addDays(1)).split(' ')[0] + '&limit=' + PERCALL;

        if(offset != null) {
            endpoint += '&offset=' + offset;
        }        
        
        String apiResponse = PagerDutyUtility.getResponse(endPoint, 'GET', '', '10000', APIKey);
        return apiResponse;
    }
    
    public static PagerDutyBusinessServices fetchBusinessServices() {
        String response = getAllBusinessServices();
        if(response != null && response != errorResponse) {
            return (PagerDutyBusinessServices)JSON.deserialize(response, PagerDutyBusinessServices.class);
        }
        
        return new PagerDutyBusinessServices();
    }
    
    public static String getAllBusinessServices() {
        if(APIKey == null) {
	        getCustomSetting();
        }
        
        String endPoint = '/business_services';
        
        String apiResponse = PagerDutyUtility.getResponse(endPoint, 'GET', '', '10000', APIKey);
        system.debug(apiResponse);
        return apiResponse;
    } 
    
    public static PagerDutyBusinessDependencies fetchBusinessDependencies(String bsID) {
        String response = getAllBusinessDependencies(bsID);
        if(response != null && response != errorResponse) {
            return (PagerDutyBusinessDependencies)JSON.deserialize(response, PagerDutyBusinessDependencies.class);
        }
        
        return new PagerDutyBusinessDependencies();
    }
    
    public static String getAllBusinessDependencies(String bsID) {
        if(APIKey == null) {
	        getCustomSetting();
        }
        
        String endPoint = '/service_dependencies/business_services/' + bsID;
        
        String apiResponse = PagerDutyUtility.getResponse(endPoint, 'GET', '', '10000', APIKey);
        return apiResponse;
    }
    
    @AuraEnabled        
    public static List<PagerDutyUtility.PagerDutyMessage> fetchIncidentLogs(String incidentID) {
        getCustomSetting();
        
        List<PagerDutyUtility.PagerDutyMessage> messages = new List<PagerDutyUtility.PagerDutyMessage>();
        
        List<PagerDutyIncidentLogs.cls_log_entries> logs = new List<PagerDutyIncidentLogs.cls_log_entries>();
        Integer offset = 0;
        
        String response = PagerDutyUtility.getAllIncidentLogs(incidentID, offset);
        if(response != null) {
            try {
                PagerDutyIncidentLogs newLogs = new PagerDutyIncidentLogs();
                do { 
                    newLogs = (PagerDutyIncidentLogs)JSON.deserialize(response, PagerDutyIncidentLogs.class);   
                    
                    for(PagerDutyIncidentLogs.cls_log_entries entry : newLogs.log_entries) {
                        logs.add(entry);
                    }
                    
                    offset += PagerDutyUtility.PERCALL;
                } while(newLogs.more == true);
                
                for(PagerDutyIncidentLogs.cls_log_entries log : logs) {
                    if(log.message != null && log.message != '') {
                        PagerDutyUtility.PagerDutyMessage message = new PagerDutyUtility.PagerDutyMessage();
                        message.message = log.message;
                        message.createdBy = log.agent.summary;
                        message.createdAt = log.created_at;
                        messages.add(message);
                    }
                }
                
            } catch(Exception e) {
                system.debug('error while parsing messaages: ' + e.getMessage());
            }
        }
        
        return messages;
    }

    public static String getAllIncidentLogs(String incidentID, Integer offset) {
        String endPoint = '/incidents/' + incidentID + '/log_entries?';

        endPoint += '&limit=' + PERCALL;

        if(offset != null) {
            endpoint += '&offset=' + offset;
        }        
        
        String apiResponse = PagerDutyUtility.getResponse(endPoint, 'GET', '', '10000', APIKey);
        return apiResponse;
    }
        
    public static String getResponse(String requestEndpoint, String requestMethod, String requestBody, String requestTimeout, String subdomainAPIKey) {
        String standardReturnError = errorResponse;
        String baseURL = 'callout:PagerDutyGetServices'; //TO STORE IN CUSTOM METADATA TYPE LATER
        String defaultAPIKey = subdomainAPIKey;
        if(defaultAPIKey == null) {
            defaultAPIKey = 'mR-xFeyseUf2ksHksdhY'; //REMOVE LATER
        }
        

        //Build Request
        HttpRequest sendRequest = new HttpRequest();
        if(String.IsNotBlank(requestEndpoint)) {
            sendRequest.setEndPoint(baseURL + requestEndpoint);
        } else {
            System.Debug('PagerDutyUtility -> Endpoint cannot be blank!');
            return standardReturnError;
        }
        if(String.IsNotBlank(requestMethod)) {
            sendRequest.setMethod(requestMethod);
        } else {
            System.Debug('PagerDutyUtility -> requestMethod cannot be blank!');
            return standardReturnError;
        }
        if(String.IsNotBlank(requestTimeout)) {
            //Set timeout to specified limit
            sendRequest.setTimeout(Integer.ValueOf(requestTimeout));
        } else {
            //If a timeout limit is not specified, default it to 5 seconds
            sendRequest.setTimeout(5000);
        }
        
        sendRequest.setHeader('Content-Type','application/json;charset=utf-8');
        sendRequest.setHeader('Accept', 'application/vnd.pagerduty+json;version=2');
        String headerValue = defaultAPIKey;
        String authorizationHeader = 'Token token=' + headerValue;
        sendRequest.setHeader('Authorization', authorizationHeader);

        if(String.IsNotBlank(requestBody) && !'GET'.equals(requestMethod)) {
            sendRequest.setBody(requestBody);
        }
        
        system.debug(sendRequest.getEndpoint());
        //Build Response
        Http http = new Http();
        HttpResponse apiResponse = new HttpResponse();
        apiResponse = http.send(sendRequest);
        if(apiResponse == null) {
            throw new BaseException.NullPointerException('There was a problem performing the callout.'); //create from base exception class
        }
        System.debug('*** ' + apiResponse.getBody());
        if(apiResponse.getStatusCode() == 200 || apiResponse.getStatusCode() == 201 || apiResponse.getStatusCode() == 202) {
            return apiResponse.getBody();
        } else if(apiResponse.getStatusCode() == 403) { //rate limit error
            //wait 1 second and retry
            System.debug('*** PagerDutyUtility -> Rate limit exceeded, waiting 1 second and retrying');
            for(integer i = 0; i < WAITTIME; i++) { }
            
            return PagerDutyUtility.getResponse(requestEndpoint, requestMethod, requestBody, requestTimeout, subdomainAPIKey);
        } else {
            System.Debug('*** PagerDutyUtility -> Bad Response - ' + apiResponse.getBody());
            return 'Bad Response - ' + apiResponse.getBody();
        }
        
    }
    
    public Class PagerDutyWrapper {
        @AuraEnabled
        public String serviceID {get; set;}
        @AuraEnabled
        public String serviceName {get; set;}
        @AuraEnabled
        public List<PagerDutyData> services {get; set;}      
        
        @AuraEnabled
        public String getStatus() {
            String response = 'Active';
            for(PagerDutyData service : services) {
                if(service.serviceStatus != 'Active') {
                    if(service.serviceStatus == 'Acknowledged' && response == 'Active') {
                        response = 'Acknowledged';
                    }
                    if(service.serviceStatus == 'Triggered' && (response == 'Active' || response == 'Acknowledged')) {
                        response = 'Triggered';
                    }
                }
            }
            
            return response;
        }
    }
    
    public Class PagerDutyData {
        @AuraEnabled 
        public String serviceID {get; set;}
        @AuraEnabled
        public String serviceName {get; set;}
        @AuraEnabled
        public String serviceStatus {get {
            return getStatus();
        } set;}
        @AuraEnabled
        public List<PagerDutyIncident> incidents {get; set;}
        
        public PagerDutyData(String sId, String sName, Map<Integer, Map<String, String>> pdis) {
        	this.serviceID = sId;
            this.serviceName = sName;
            this.incidents = new List<PagerDutyIncident>();
            if(pdis != null && !pdis.isEmpty()) {
                for(Integer pdikey : pdis.keySet()) {
                    PagerDutyIncident pdi = new PagerDutyIncident();
                    pdi.num = pdis.get(pdikey).get('incident_number');
                    pdi.title = pdis.get(pdikey).get('title');
                    pdi.createdAt = pdis.get(pdikey).get('created_at');
                    pdi.status = pdis.get(pdikey).get('status');
                    pdi.description = pdis.get(pdikey).get('description');
                    pdi.incidentId = pdis.get(pdikey).get('id');
                    
                    if(pdi.status != 'resolved') {
                        system.debug('+++' + pdi.incidentId);
                    }
                    this.incidents.add(pdi);
                }
            }
            this.serviceStatus = getStatus();
        }
        
        private void setIncidents(Map<Integer, Map<String, String>> pdis) {
            for(Integer pdikey : pdis.keySet()) {
                PagerDutyIncident pdi = new PagerDutyIncident();
                pdi.num = pdis.get(pdikey).get('incident_number');
                pdi.title = pdis.get(pdikey).get('title');
                pdi.createdAt = pdis.get(pdikey).get('created_at');
                pdi.status = pdis.get(pdikey).get('status');
                pdi.description = pdis.get(pdikey).get('description');
                pdi.priority = pdis.get(pdikey).get('priority');
                pdi.incidentId = pdis.get(pdikey).get('id');
                
                this.incidents.add(pdi);
            }
        }
        
        private string getStatus() { //status options = Active, Acknowledged, Triggered
            String status = 'Active';
            for(PagerDutyIncident incident : incidents) {
                if(incident.status != 'resolved') {
                    if(incident.priority == 'P1') {
                        status = 'Triggered';
                    } else if(incident.priority != null && incident.priority != '') {
                        if(status != 'Triggered') {
                            status = 'Acknowledged';
                        }    
                    }                    
                }
            }
            return status;
        }
    }
    
    public Class PagerDutyIncident {
        @AuraEnabled
        public String num {get; set;}
        @AuraEnabled
        public String title {get; set;}
        @AuraEnabled
        public String createdAt {get; set;}
        @AuraEnabled
        public String status {get; set;}
        @AuraEnabled
        public String description {get; set;}
        @AuraEnabled
        public String priority {get; set;}
        @AuraEnabled 
        public String incidentId {get; set;}
    }
    
    public Class PagerDutyMessage {
        @AuraEnabled
        public String message {get; set;}
        @AuraEnabled
        public String createdBy {get; set;}
        @AuraEnabled
        public String createdAt {get; set;}
    }
}

 
Here are the Details of the requirement:
1) Create new case and assign to queue
2) Either a member of the queue or the queue manager changes the case ownership from the queue to a specific user/member of the queue
3) If after 24 hours from case creation, the case is still owned by the queue, send a notification to the queue manager
4) Queue manager changes ownership of overdue case from queue to queue member
 
I am able to capture the selected values in the dual list box and able to show it in console but how do I show the selected value in my data table that is present in another component.
Below is the code.
<!-- MultiPicklist.cmp-->

<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" controller="SampleAuraController">
	<!--Declare Event Handlers-->
    <aura:handler name="init" action="{!c.doInit}" value="{!this}" description="Call doInit function on component load to get picklist values"/>
     
    <!--Declare Attributes-->
    <aura:attribute name="GenreList" type="List" default="[]" description="Genre Picklist Values"/>
    <aura:attribute name="selectedGenreList" type="List" default="[]" description="Selected Genre Picklist Values"/>
    
    <aura:attribute name="GenreList1" type="List" default="[]" description="Genre Picklist Values"/>
    <aura:attribute name="selectedGenreList1" type="List" default="[]" description="Selected Genre Picklist Values"/>
    
     <aura:attribute name="isOpen" type="boolean" default="true"/>
    
    <aura:registerEvent name = "loadMyEvent" type = "c:Result"/>
    
    <aura:if isTrue="{!v.isOpen}">
    <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_small" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1">
  <div class="slds-modal__container">
    <header class="slds-modal__header">
        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{!c.closeModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
      <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">Estimate Opportunity</h2>
    </header>
    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
         <div class="slds-section slds-is-open" aura:id="Section">
        <!--section header-->
        <h3 class="slds-section__title">
            <button aria-controls="List" class="slds-button slds-section__title-action">
                <span onclick="{!c.toggleSection}" data-auraId="Section">
                    <lightning:icon iconName="utility:switch"
                                    size="x-small"
                                    class="slds-section__title-action-icon slds-button__icon_left"
                                    alternativeText="button icon" 
                                    />
                </span>
                <span class="slds-truncate" title="Industry">Industry</span>
            </button>
        </h3>
        <!--section body-->
        <div class="slds-section__content" id="List">
     <lightning:dualListbox aura:id="selectGenre"
                               name="Genre"
                               sourceLabel="Available"
                               selectedLabel="Chosen"
                               options="{!v.GenreList}"
                               value="{!v.selectedGenreList}"
                               onchange="{!c.handleGenreChange}"/>
    </div>
        </div>
         
        
        
        
        
        
        <div class="slds-section slds-is-open" aura:id="Section1">
        <!--section header-->
        <h3 class="slds-section__title">
            <button aria-controls="List" class="slds-button slds-section__title-action">
                <span onclick="{!c.toggleSection1}" data-auraId="Section1">
                    <lightning:icon iconName="utility:switch"
                                    size="x-small"
                                    class="slds-section__title-action-icon slds-button__icon_left"
                                    alternativeText="button icon" 
                                    />
                </span>
                <span class="slds-truncate" title="Account Source">Account Source</span>
            </button>
        </h3>
        <!--section body-->
        <div class="slds-section__content" id="List">
     <lightning:dualListbox aura:id="selectGenre1"
                               name="Genre1"
                               sourceLabel="Available"
                               selectedLabel="Chosen"
                               options="{!v.GenreList1}"
                               value="{!v.selectedGenreList1}"
                               onchange="{!c.handleGenreChange1}"/>
    </div>
        </div>
        
      </div>
    <footer class="slds-modal__footer">
      <button class="slds-button slds-button_neutral" onclick="{!c.closeModel}">Cancel</button>
      <button class="slds-button slds-button_brand" onclick="{!c.Estimating}">Estimate</button>
    </footer>
  </div>
</section>
    </aura:if>
</aura:component>



<!-- Multipicklistcontroller.js-->
({
    doInit: function(component, event, helper) {
        var action = component.get("c.getPiklistValues");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS"){
                var result = response.getReturnValue();
                var plValues = [];
                for (var i = 0; i < result.length; i++) {
                    plValues.push({
                        label: result[i],
                        value: result[i]
                    });
                }
                component.set("v.GenreList", plValues);
            }
        });
        $A.enqueueAction(action);
        
        var action1 = component.get("c.getPiklistValues1");
        action1.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS"){
                var result = response.getReturnValue();
                var plValues1 = [];
                for (var i = 0; i < result.length; i++) {
                    plValues1.push({
                        label: result[i],
                        value: result[i]
                    });
                }
                component.set("v.GenreList1", plValues1);
            }
        });
        $A.enqueueAction(action1);
    },
    
    closeModel: function(component, event, helper) {
      // for Hide/Close Model,set the "isOpen" attribute to "Fasle"  
      component.set("v.isOpen", false);
   },
    
    handleGenreChange: function (component, event, helper) {
        //Get the Selected values   
        var selectedValues = event.getParam("value");
         
        //Update the Selected Values  
        component.set("v.selectedGenreList", selectedValues);
    },
    
    handleGenreChange1: function (component, event, helper) {
        //Get the Selected values   
        var selectedValues = event.getParam("value");
         
        //Update the Selected Values  
        component.set("v.selectedGenreList1", selectedValues);
    },
     
    getSelectedGenre : function(component, event, helper){
        //Get selected Genre List on button click 
        var selectedValues = component.get("v.selectedGenreList");
        console.log('Selectd Genre-' + selectedValues);
    },
    
    Estimating : function(component, event, helper){
        var navigateEvent = $A.get("e.force:navigateToComponent");
        var selectedValues = component.get("v.selectedGenreList");
        console.log('Selectd Genre-' + selectedValues);
        console.log("Navigate1"+navigateEvent);
        navigateEvent.setParams({
            componentDef: "c:Estimate",
            componentAttributes: {  
            }
            //You can pass attribute value from Component1 to Component2
            //componentAttributes :{ }
        });
        navigateEvent.fire();
    },
    
    toggleSection : function(component, event, helper) {
        // dynamically get aura:id name from 'data-auraId' attribute
        var sectionAuraId = event.target.getAttribute("data-auraId");
        // get section Div element using aura:id
        var sectionDiv = component.find(sectionAuraId).getElement();
        /* The search() method searches for 'slds-is-open' class, and returns the position of the match.
         * This method returns -1 if no match is found.
        */
        var sectionState = sectionDiv.getAttribute('class').search('slds-is-open'); 
        
        // -1 if 'slds-is-open' class is missing...then set 'slds-is-open' class else set slds-is-close class to element
        if(sectionState == -1){
            sectionDiv.setAttribute('class' , 'slds-section slds-is-open');
        }else{
            sectionDiv.setAttribute('class' , 'slds-section slds-is-close');
        }
    },
    
    toggleSection1 : function(component, event, helper) {
        // dynamically get aura:id name from 'data-auraId' attribute
        var sectionAuraId = event.target.getAttribute("data-auraId");
        // get section Div element using aura:id
        var sectionDiv = component.find(sectionAuraId).getElement();
        /* The search() method searches for 'slds-is-open' class, and returns the position of the match.
         * This method returns -1 if no match is found.
        */
        var sectionState = sectionDiv.getAttribute('class').search('slds-is-open'); 
        
        // -1 if 'slds-is-open' class is missing...then set 'slds-is-open' class else set slds-is-close class to element
        if(sectionState == -1){
            sectionDiv.setAttribute('class' , 'slds-section slds-is-open');
        }else{
            sectionDiv.setAttribute('class' , 'slds-section slds-is-close');
        }
    },
})


<!-- Estimate.cmp -->
<aura:component controller="tableWithManageCtrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
     <aura:handler name="init" value="this" action="{!c.doInit}"/>
     <aura:attribute name="searchResult" type="List" description="use for store and display account list return from server"/>
     <aura:attribute name="options"
                      type="List"
                      default="[
                               {'label': 'Type', 'value': 'Type'},
                               {'label': 'Industry', 'value': 'Industry'},
                               {'label': 'Account Source', 'value': 'AccountSource'}
                               ]"/>
    
    <aura:attribute name="selectedValues" type="List" default="Name"/>
    <aura:attribute name="isOpen" type="boolean" default="false"/>
        
  <!--Use aura:if tag to display Model Box, on the bese of conditions. [isOpen boolean attribute] -->   
    <aura:if isTrue="{!v.isOpen}">
   <!--###### MODAL BOX Start From Here ######--> 
      <div role="dialog" tabindex="-1" aria-labelledby="header99" class="slds-modal slds-fade-in-open ">
        <div class="slds-modal__container">
          <!-- ###### MODAL BOX HEADER Part Start From Here ######-->
          <div class="slds-modal__header">
            <button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.closeModel}">
              X
            <span class="slds-assistive-text">Close</span>
            </button>
            <h2 id="header99" class="slds-text-heading--medium">Manage Table Columns</h2>
          </div>
          <!--###### MODAL BOX BODY Part Start From Here ######-->
          <div class="slds-modal__content slds-p-around--medium">
              <div class="slds-p-around_medium">
                  <lightning:checkboxGroup aura:id="mygroup"
                                           name="checkboxGroup"
                                           label="Manage Cloumn"
                                           options="{! v.options }"
                                           value="{! v.selectedValues }"
                                           />
              </div>  
            </div>
          <!--###### MODAL BOX FOOTER Part Start From Here ######-->
          <div class="slds-modal__footer">
             <button class="slds-button slds-button--neutral" onclick="{!c.closeModel}" >Done</button>
          </div>
        </div>
      </div>
      <div class="slds-backdrop slds-backdrop--open"></div>
      <!--###### MODAL BOX Part END Here ######-->
 </aura:if>
    
    <div class="slds-m-around--large">  
        <!--###### lightning button icon for show/hide columns popup ######-->	
        <div class="slds-clearfix">
            <div class="slds-float_right">
               <lightning:buttonIcon size="large" onclick="{!c.openModel}" iconName="utility:matrix" variant="bare" title="manage table columns" alternativeText="Settings" iconClass="dark"/>
            </div>
        </div>
     
        <br/><br/> 
	  <!--###### lightning data table start ######-->		
      <table class="slds-table slds-table_bordered slds-table_cell-buffer">
         <thead>
            <tr class="slds-text-title_caps">
                <!--<th scope="col">
                    <div class="slds-truncate" title="Account Name">Account Name</div>
                </th>  -->              
				<!--###### the value of element attribute in child component must be same as checkboxGroup value  ######-->		 
                <c:MainComp list="{!v.selectedValues}"  element="Type"> 
                    <th scope="col"><div class="slds-truncate" title="Type">Type</div></th>
                </c:MainComp>
                <c:MainComp list="{!v.selectedValues}"  element="Industry">
                    <th scope="col"><div class="slds-truncate" title="Industry">Industry</div></th>
                </c:MainComp>
                <c:MainComp list="{!v.selectedValues}"  element="AccountSource">
                    <th scope="col"><div class="slds-truncate" title="AccountSource">Account Source</div></th>
                </c:MainComp>
            </tr>
         </thead>
         <tbody>
        
            <!--### display all records of searchResult attribute by aura:iteration ###-->
            <aura:iteration items="{!v.searchResult}" var="acc">
               <tr>
                
                 <!--<td><div class="slds-truncate">{!acc.Name}</div></td>-->
                 <c:MainComp list="{!v.selectedValues}"  element="Type">  
                   <td><div class="slds-truncate">{!acc.Type}</div></td>
                 </c:MainComp>
                 <c:MainComp list="{!v.selectedValues}"  element="Industry"> 
                   <td><div class="slds-truncate">{!acc.Industry}</div></td>
                 </c:MainComp>
                 <c:MainComp list="{!v.selectedValues}"  element="AccountSource"> 
                   <td><div class="slds-truncate">{!acc.AccountSource}</div></td>
                 </c:MainComp>
               </tr>
            </aura:iteration>
         </tbody>
      </table>
   </div>
 
</aura:component>

<!-- EstimateController.js-->

({
    doInit: function(component, event, helper) {
        var action = component.get("c.fetchAccount");
        action.setCallback(this, function(response) {
            var state = response.getState(); 
            if (state === "SUCCESS") {
                var storeResponse = response.getReturnValue();
                // set searchResult list with return value from server.
                component.set("v.searchResult", storeResponse);
            }
            
        });
        $A.enqueueAction(action);
    },
    openModel: function(component, event, helper) {
        // for Display Model,set the "isOpen" attribute to "true"
        component.set("v.isOpen", true);
    },
    
    closeModel: function(component, event, helper) {
        // for Hide/Close Model,set the "isOpen" attribute to "Fasle"  
        component.set("v.isOpen", false);
    },
})


/* SampleAuraController*/
public class SampleAuraController {
     
    @AuraEnabled
    public static List <String> getPiklistValues() {
        List<String> plValues = new List<String>();
         
        //Get the object type from object name
        Schema.SObjectType objType = Schema.getGlobalDescribe().get('Account');
         
        //Describe the sObject using its object type.
        Schema.DescribeSObjectResult objDescribe = objType.getDescribe();
         
        //Get the specific field information from field name
        Schema.DescribeFieldResult objFieldInfo = objDescribe.fields.getMap().get('Industry').getDescribe();
         
        //Get the picklist field values.
        List<Schema.PicklistEntry> picklistvalues = objFieldInfo.getPicklistValues();
        //Add the picklist values to list.
        for(Schema.PicklistEntry plv: picklistvalues) {
            plValues.add(plv.getValue());
            
        }
        plValues.sort();
        return plValues;
    }
    
    @AuraEnabled
    public static List <String> getPiklistValues1() {
        List<String> plValues1 = new List<String>();
         
        //Get the object type from object name
        Schema.SObjectType objType = Schema.getGlobalDescribe().get('Account');
         
        //Describe the sObject using its object type.
        Schema.DescribeSObjectResult objDescribe = objType.getDescribe();
         
        //Get the specific field information from field name
        Schema.DescribeFieldResult objFieldInfo = objDescribe.fields.getMap().get('AccountSource').getDescribe();
         
        //Get the picklist field values.
        List<Schema.PicklistEntry> picklistvalues = objFieldInfo.getPicklistValues();
        //Add the picklist values to list.
        for(Schema.PicklistEntry plv: picklistvalues) {
            plValues1.add(plv.getValue());
            
        }
        plValues1.sort();
        return plValues1;
    }

}

/*tableWithManageCtrl*/

public class tableWithManageCtrl {
    @AuraEnabled
    public static List < account > fetchAccount() {
        
        List < Account > returnList = new List < Account > ();
        
        for (Account acc: [select id, Name, Type, Industry, Phone, Fax, AccountSource from account LIMIT 10]) {
            returnList.add(acc);
        }
        return returnList;
    }
}

 
I need to create a lightning component for a survey where there are 10 questions. Each questions answer has 4 options with a checkbox in front of each value of the answer.
after submitting the survey, total score has to be calculated based on the value selected.
Option 1 - 1point
Option 2 - 2points....and so on.

Please help
Hi, 
I need to write a trigger to calculate total score based on the picklist value selected.
Suppose there are 4 picklist fields, and each value in every field is assigned some points. so when the record is saved, TOTAL SCORE should be calculated based on the values selected from the picklist fields.
Any help is appreciated.
Thanks
I want to collpase the accordion in lightning on page load...I need it only in lightning
 
Any help is appreciated.
I have a delete button and using that i have to delete the selected value in the Picklist.
This needs to be done in lightning.

Any help is appreciated.
Thank ypu
User-added image
This is my lightning component where I'm selecting a field from contact and selecting an operator based on the data type of the field and finally providing a value.

I need to search records in contact object based on these selected criteria.

Thank you
I have two radiobuttons contact and account and one picklist.
I want that the values of the picklist should be the fields of contact when i select contact in radio button and the value of the picklist should change to fields of account if i select account in the radio button.
This should be done in lightning.

Any help is appreciated.

Thank you 
I have to create a picklist field in which i have to show some of the fields(custom and standard) as the picklist values.
any help is appreciated.

Thank you
Hi, 
I have a requirement to have a checkbox in front of each option of the scrollable list so that the user can select multiole options.
Here is my code:

Component:
<tr>
                        <div class="slds-form-element slds-size--1-of-1">
                                  <table class="slds-table slds-table--bordered slds-table--cell-buffer" value = "true">
                                      <tr>
       						<ui:inputCheckbox aura:id="box3" change="{!c.selectAll}"/>
         					<ui:inputselect aura:id="accIndustry" class="slds-dropdown"  multiple="true" change="{!c.handleSelectChangeEvent}"/>                       
                                      </tr>
                                      </table>
                            </div>
            		</tr>

Controller.js
({
doInit: function(component, event, helper) {
        helper.fetchPickListVal(component, 'skience__Relationship_Type__c', 'accIndustry');
     var page = component.get("v.page") || 1;
        
      var recordToDisply = component.find("recordSize").get("v.value");
        
      helper.getContact(component, page, recordToDisply);
    },
    handleSelectChangeEvent: function(component, event, helper) {
       
        alert(event.getSource().get("v.value"));
    },

Its not working.
Any help would be appreciated​
I have two radio buttons,
1-Contact, 2-Account.  
When i click on contact a search query should run on contact and when i click account the search query should run on account.   I need this to work on lightning.

Any help is appreciated.
Here are the Details of the requirement:
1) Create new case and assign to queue
2) Either a member of the queue or the queue manager changes the case ownership from the queue to a specific user/member of the queue
3) If after 24 hours from case creation, the case is still owned by the queue, send a notification to the queue manager
4) Queue manager changes ownership of overdue case from queue to queue member
 
Hi, 
I need to write a trigger to calculate total score based on the picklist value selected.
Suppose there are 4 picklist fields, and each value in every field is assigned some points. so when the record is saved, TOTAL SCORE should be calculated based on the values selected from the picklist fields.
Any help is appreciated.
Thanks
I have two radiobuttons contact and account and one picklist.
I want that the values of the picklist should be the fields of contact when i select contact in radio button and the value of the picklist should change to fields of account if i select account in the radio button.
This should be done in lightning.

Any help is appreciated.

Thank you 
Hi, 
I have a requirement to have a checkbox in front of each option of the scrollable list so that the user can select multiole options.
Here is my code:

Component:
<tr>
                        <div class="slds-form-element slds-size--1-of-1">
                                  <table class="slds-table slds-table--bordered slds-table--cell-buffer" value = "true">
                                      <tr>
       						<ui:inputCheckbox aura:id="box3" change="{!c.selectAll}"/>
         					<ui:inputselect aura:id="accIndustry" class="slds-dropdown"  multiple="true" change="{!c.handleSelectChangeEvent}"/>                       
                                      </tr>
                                      </table>
                            </div>
            		</tr>

Controller.js
({
doInit: function(component, event, helper) {
        helper.fetchPickListVal(component, 'skience__Relationship_Type__c', 'accIndustry');
     var page = component.get("v.page") || 1;
        
      var recordToDisply = component.find("recordSize").get("v.value");
        
      helper.getContact(component, page, recordToDisply);
    },
    handleSelectChangeEvent: function(component, event, helper) {
       
        alert(event.getSource().get("v.value"));
    },

Its not working.
Any help would be appreciated​
I have two radio buttons,
1-Contact, 2-Account.  
When i click on contact a search query should run on contact and when i click account the search query should run on account.   I need this to work on lightning.

Any help is appreciated.