+ Start a Discussion
santhiya duraisanthiya durai 

Need help on Quick action for update a status field

Hi,
Here is the usecase.
On Opportunity record, I want to show a Archive button. Onclick of the Archive button a prompt must display “Do you want to Archive the record?” , Cancel and Continue button must be displayed. Onclick of Cancel button the prompt must be closed.
Onclick of the Continue button the status of the record must be updated as ‘Archived’ and the Name of the record must be appended with ‘_Archived’. How can achieve this use case?
I have tried to create a flow and called from Quick action, but in flow i am not able to update a Status field? Does Lightning component required to achieve this case?
Best Answer chosen by santhiya durai
sachinarorasfsachinarorasf
Hi santhiya,

We can achieve this through the lightning component. We have to call our lightning component through the lightning-quick action button and in the apex controller we get an Opportunity record through recordId and when we click on the Continue button then we call an apex method that updates status and Opportunity name.

I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.

Thanks and Regards,
Sachin Arora
www.sachinsf.com

All Answers

sachinarorasfsachinarorasf
Hi santhiya,

We can achieve this through the lightning component. We have to call our lightning component through the lightning-quick action button and in the apex controller we get an Opportunity record through recordId and when we click on the Continue button then we call an apex method that updates status and Opportunity name.

I hope you find the above solution helpful. If it does, please mark it as Best Answer to help others too.

Thanks and Regards,
Sachin Arora
www.sachinsf.com
This was selected as the best answer
madhav sharma 1madhav sharma 1
Dialer System Options for Call Centers – What You Need to Know
Thanks to this digital age, thousands of process automations made possible by numerous technological advances have inspired companies to constantly strive for excellence. For example, in the call center industry, one of the biggest investments for companies is a digital solution which they call the numbering system.
Basically, a dialing system is a computer program that automatically places outgoing calls to customers from a contact center. Its main goal is to reduce the cost incurred to make phone calls by eliminating many error prone and repetitive jobs, but apart from that it also improves process efficiency by automatically connecting available call center agents to customers waiting.
Another interesting feature of the dialing system is its automated dialing which omits the task of call center agents to manually enter phone numbers, which can be time consuming for them. With a good numbering system, agents will be able to improve their productivity as most of their time will be spent in real conversations with customers.
What does a numbering system look like?
Back then, numbering systems came with hardware components that had to be set up like a telephone. These days, however, they have evolved and become purely software. With advancements in technology come growing and varying expectations of people for how a numbering system should work. For this reason, the developers have categorized the numbering systems according to their areas of interest.
Types of use of dialing systems call centers
When it comes to choosing between sales dialing systems for your business or call center, there are usually three options to choose from and each has its pros and cons in trying to reach your goals. prospects.

1. Powerful dialers
Also known as a preview dialer, an electric dialer (https://www.callmaker.se/hur-fungerar-en-dialer/" style="color:#0563c1; text-decoration:underline) is ironically the slowest type of sales dialing system due to its 1: 1 call ratio capability. Powerful dialers allow sales agents to preview sales. Information and profile of their prospects, giving them the freedom to decide whether or not to continue calling.
In addition to the “click to call” feature that initiates an actual call, the powerful dialers also allow agents to reach their prospects through voicemail. According to experts, electric dialers are the best type when following a consultative selling approach. As prospects are carefully screened, the likelihood of achieving a good call workflow increases, which is downright great for the business.

2. Progressive dialers
In terms of efficiency and effectiveness, progressive dialers are a bit better than powerful dialers. Although they are mostly similar, for example in terms of 1: 1 call ratio capability, one of their main differences is the mechanism or logic used, i.e. an overview of the prospect's information is no longer available, which means that the agent can only see the prospect's profile after a phone call is made. While a ringing tone is in progress, the agent is also shown who is calling the system, but the agent does not have the ability to choose which prospect to call. While this might seem like a downside to agents (https://show.zohopublic.com/publish/mk25me6ec72e92b6d414188bdc08775e35d83), it also keeps them from picking their leads, making it easier to get the maximum number out.

3. Predictive dialers
Compared to powerful and progressive dialers, predictive dialers are considered to be the fastest in processing lead reach and conversion without the 1: 1 call ratio restriction. In fact, predictive dialers are considered the Ferrari of the. numbering systems for call centers. Predictive dialers can even facilitate the 3: 1, 5: 1 or 7: 1 call ratio.
However, in order for a call center to get the most out of using a predictive dialing system, many agents need to work on their leads simultaneously, i.e. at least 10 sales agents. And if the call center, for example, uses a 5: 1 ratio, what will happen is: the main dialer will make 50 phone calls or 5 calls per agent. This is the efficiency at best.
However, since an ordinary predictive dialing system uses a voicemail detection feature, when an agent makes an outgoing call and tries to reach a lead, the wait time can be costly and it is one of the factors. its drawbacks. The good news is that with a scripted business model, it will be possible to successfully make outgoing calls and reach them within a short period of time.
 
santhiya duraisanthiya durai
Hi @sachinarorasf 

Thanks for your response. I have created a Quick Action called "Archive" and Lightning component. And I am calling lightning component on clickof  "Archive". Now I want disable or restrict a user to Archive again on Archived record.( When the Status is Archived, user doesn't allowed to Archive again). How can I achive this?

Class:
public class ArchiveRecord {

    @AuraEnabled
    public static void getItemSetupForm(Id itemsetupId){
        Item_Setup__c itemsetup= [Select Id, Name,Processed__c,Item_Setup_Form_Status__c from Item_Setup__c where Id=:itemsetupId];
        itemsetup.Item_Setup_Form_Status__c='Archived';
        update itemsetup;
        
        if(itemsetup.Item_Setup_Form_Status__c=='Archived'){
          itemsetup.Name=itemsetup.Name +'_Archived';
        }
        upsert itemsetup;
}
  }

Component:
<aura:component controller="ArchiveRecord" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader" access="global">
   <aura:html tag="style">
        .cuf-content {
        padding: 0 0rem !important;
        }
        .slds-p-around--medium {
        padding: 0rem !important;
        }       
        .slds-modal__content{
        overflow-y:hidden !important;
        height:unset !important;
        max-height:unset !important;
        }
    </aura:html>
    
    <aura:attribute name="showSpinner" type="boolean" />
    <aura:attribute name="accessFlag" type="boolean"/>
    <aura:attribute name="noAccessFlag" type="boolean"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:if isTrue="{!v.accessFlag}">
     <div class="modal-header slds-modal__header slds-size_1-of-1">
        <h4 class="title slds-text-heading--medium">Archive Item Setup Form</h4>
    </div>
    <!--End Modal Header--> 
     
    <!--Modal Body-->  
    <div class="slds-modal__content slds-p-around--x-large slds-align_absolute-center slds-size_1-of-1 slds-is-relative">
        <form class="slds-form--stacked">
           
                <div class="slds-align_absolute-center">
                    <b>Do you want to Archive this record?</b>
                </div>            
            
        </form> 
    </div>
    <!--End of Modal Body-->
     
    <!--Modal Footer-->
    <div class="modal-footer slds-modal__footer slds-size_1-of-1">
        <lightning:button variant="Neutral" class="slds-button" label="Cancel" onclick="{!c.cancelBtn}"/>
        <lightning:button variant="Brand" class="slds-button" label="Continue" onclick="{!c.updateStatus}"/>
        
    </div>
        
    </aura:if>
    
</aura:component>

Controller:
({
    updateStatus : function(component, event, helper) {
    var itemsetupId=component.get("v.recordId");
        var action=component.get("c.getItemSetupForm");
        action.setParams({"itemsetupId":itemsetupId
            
        });
        action.setCallback(this,function(response){
            
            var state=response.getState();
            if(state==="SUCCESS"){
               let toastEvent = $A.get("e.force:showToast");
                toastEvent.setParams({
                    "title": "Success!",
                    "message": "The record Archived Successfully",
                    "type": "success"   
                });
                toastEvent.fire();
            }
             else if (state === "ERROR")
        {
            alert("Failed");
        }
              var dismissActionPanel = $A.get("e.force:closeQuickAction");
                dismissActionPanel.fire();  
              $A.get('e.force:refreshView').fire();
             component.set("v.showSpinner",false);
        });
        $A.enqueueAction(action);
    },

    cancelBtn : function(component, event, helper) {
        // Close the action panel
        var dismissActionPanel = $A.get("e.force:closeQuickAction");
        dismissActionPanel.fire();
    }
    
})