• Eclipse Developer
  • NEWBIE
  • 40 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 1
    Replies

What can I add to this component to redirect to a listview page after the finish the flow?

<aura:component implements="force:lightningQuickActionWithoutHeader,flexipage:availableForRecordHome,force:hasRecordId">
    <aura:handler event="force:navigateToSObject" action="{!c.navigate}"/> 
    <!--Custom Styles for Modal Header and Footer-->
    <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>
     
    <!--Declare Attributes-->
    <aura:attribute name="hasError" type="Boolean" default="false"/>
     
    <!--Modal Header--> 
    <div class="modal-header slds-modal__header slds-size_1-of-1">
        <h4 class="title slds-text-heading--medium">Delete Contacts</h4>
    </div>
    <!--End Modal Header--> 
     
    <!--Modal Body-->  
    <div class="slds-modal__content slds-p-around--x-small slds-align_absolute-center slds-size_1-of-1 slds-is-relative">
        <form class="slds-form--stacked">
            <aura:if isTrue="{!!v.hasError}">
                <div class="slds-align_absolute-center">
                    Do you Want to clone?
                </div>
                <aura:set attribute="else">
                    <div>
                        <div class="slds-text-color_error">Error on Contact record deletion.
                            Please forward following error message to your admin:</div>
                    </div>
                </aura:set>
            </aura:if>
            <div>
                <!--Lightning Flow Attribute-->
                <lightning:flow aura:id="OpptyFlow" onstatuschange="{!c.statusChange}"/>
            </div>
        </form> 
    </div>
    <!--End of Modal Body-->
     
    <!--Modal Footer-->
    <div class="modal-footer slds-modal__footer slds-size_1-of-1">
        <lightning:button variant="Brand" class="slds-button" label="Confirm" onclick="{!c.handleConfirm}"/>
        <lightning:button variant="Neutral" class="slds-button" label="Cancel" onclick="{!c.handleClose}"/>
    </div>
    <!--End of Modal Footer-->
</aura:component>
({
    //Confirm 
    handleConfirm : function(component, event, helper) {
        //Find lightning flow from component
        var flow = component.find("OpptyFlow");
        //Put input variable values
        var inputVariables = [
            {
                name : "OpportunityId",
                type : "String",
                value : component.get("v.recordId")
            }
        ];
        //Reference flow's Unique Name
        flow.startFlow("OpportunityCloneFlow", inputVariables);
    },
     
    //Close the quick action
    handleClose : function(component, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
    },
     
    //Flow Status Change
    statusChange : function (component, event, helper) {
        //Check Flow Status
        if (event.getParam('status') === "FINISHED_SCREEN" || event.getParam('status') === "FINISHED") {
            var toastEvent = $A.get("e.force:showToast");
            toastEvent.setParams({
                title: "Success!",
                message: "Opportunity was cloned Successfully!",
                type: "success"
            });
            toastEvent.fire();
            $A.get("e.force:closeQuickAction").fire();
            $A.get('e.force:refreshView').fire();
        } else if (event.getParam('status') === "ERROR") {
            component.set("v.hasError", true);
        }
    }
})

Please help!

I have cloned the opportunity and and it's related list(custom object)using flow, but the process was clone only 1 child record of the related list.

How to clone the list of records?

Please help

I'm trying to deep clone opportunity with a related list(custom object = trade lane),  Opportunity was cloned but related not cloned.

Flow Details
Flow API Name: OpportunityCloneFlow
Type: Screen Flow
Version: 10
Status: Active
Org: SF Desk (Private) Limited. (00D2v000001WLHR)
Flow Interview Details
Interview Label: OpportunityCloneFlow 6/17/2019 8:57 AM
Current User: Muhammad Jawwad (0052v00000Z1hCB)
Start time: 6/17/2019 8:57 AM
Duration: 0 seconds
How the Interview Started
Muhammad Jawwad (0052v00000Z1hCB) started the flow interview.
Some of this flow's variables were set when the interview started.
OpportunityCollection = [Opportunity (0062v00001DCMxhAAH)]
LOOP: OpportunityLoop
Loop Through: [0062v00001DCMxhAAH]
Iteration: 0
Current value of {!OpportunityCollectionVariable}: 0062v00001DCMxhAAH
GET RECORDS: OpportunityClone
Find one Opportunity record where:
Id Equals {!OpportunityCollectionVariable.Id} (0062v00001DCMxhAAH)
Result
Successfully found record.
{!AccountId} = 0012v00002MYNkhAAH
{!CloseDate} = May 26, 2017
{!OpportunityId} = 0062v00001DCMxhAAH
{!OpportunityName} = Burlington Textiles Weaving Plant Generator
{!StageName} = Closed Won
CREATE RECORDS: CloneOpportunity
Create one Opportunity record where:
AccountId = {!AccountId} (0012v00002MYNkhAAH)
CloseDate = {!CloseDate} (May 26, 2017)
Name = {!OpportunityName} (Burlington Textiles Weaving Plant Generator)
StageName = {!StageName} (Closed Won)
Result
A record is ready to be created when the next screen, pause, or local action is executed or when the interview finishes.
FAST LOOKUP: TradeLaneCollection
Find all Trade_Lane__c records where:
Opportunity__c Equals {!OpportunityId} (0062v00001DCMxhAAH)
Store those records in {!TradeLaneRecords}.
Save these field values in the variable: Name, Opportunity__c
Result
Successfully found records.
LOOP: TradeLaneLoop
Loop Through: [a002v000043gglkAAA]
Iteration: 0
Current value of {!TradeLaneRecordsVariable}: a002v000043gglkAAA
CREATE RECORDS: CreateTradeLane
Create one Trade_Lane__c record where:
Opportunity__c = {!NewOpportunityId} (null)
Result
Failed to create record.
Error Occurred: This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [Opportunity__c]. You can look up ExceptionCode values in the SOAP API Developer Guide.
'Please help me
How to deep clone opportunity with related list custom object?
Suggest me the best solution, please.
when I convert a lead, the description text goes from to contact. Is there a way to copy the description text into the Account Description?
Hey Guys
I have live agent setup and community where I populate the button. Problem is button work with live agent smoothly but, when I online through omnichannel the button seems to be "Agent Offline.
Please suggest me the best solution.
I have deployed a chat button on the community, in the beginning, the chat button works smoothly but suddenly the button only shows Agent Offline. please help

If a case has been in the 'closed' status for more than 10 business days and the client responds to the ticket, then create a new case?

 

Please help

1.If a ticket has been in the 'waiting on client' status for 24 business hours, then mark the ticket as 'closed' & send the client an automated message stating that we are closing the ticket


2.If a ticket has been in the 'closed' status for less than 10 business days and the client responds to the ticket, then mark the ticket as 'open' in the rep's queue

3.If a ticket has been in the 'closed' status for more than 10 business days and the client responds to the ticket, then create a new ticket

We have a onshore queue, it should automatically get routed to one of the Pods queue through a round robin basis. We have Pod 1, Pod 2, Pod 3, Pod 4. Need to distribute cases evenly through round robin


Please help

What can I add to this component to redirect to a listview page after the finish the flow?

<aura:component implements="force:lightningQuickActionWithoutHeader,flexipage:availableForRecordHome,force:hasRecordId">
    <aura:handler event="force:navigateToSObject" action="{!c.navigate}"/> 
    <!--Custom Styles for Modal Header and Footer-->
    <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>
     
    <!--Declare Attributes-->
    <aura:attribute name="hasError" type="Boolean" default="false"/>
     
    <!--Modal Header--> 
    <div class="modal-header slds-modal__header slds-size_1-of-1">
        <h4 class="title slds-text-heading--medium">Delete Contacts</h4>
    </div>
    <!--End Modal Header--> 
     
    <!--Modal Body-->  
    <div class="slds-modal__content slds-p-around--x-small slds-align_absolute-center slds-size_1-of-1 slds-is-relative">
        <form class="slds-form--stacked">
            <aura:if isTrue="{!!v.hasError}">
                <div class="slds-align_absolute-center">
                    Do you Want to clone?
                </div>
                <aura:set attribute="else">
                    <div>
                        <div class="slds-text-color_error">Error on Contact record deletion.
                            Please forward following error message to your admin:</div>
                    </div>
                </aura:set>
            </aura:if>
            <div>
                <!--Lightning Flow Attribute-->
                <lightning:flow aura:id="OpptyFlow" onstatuschange="{!c.statusChange}"/>
            </div>
        </form> 
    </div>
    <!--End of Modal Body-->
     
    <!--Modal Footer-->
    <div class="modal-footer slds-modal__footer slds-size_1-of-1">
        <lightning:button variant="Brand" class="slds-button" label="Confirm" onclick="{!c.handleConfirm}"/>
        <lightning:button variant="Neutral" class="slds-button" label="Cancel" onclick="{!c.handleClose}"/>
    </div>
    <!--End of Modal Footer-->
</aura:component>
({
    //Confirm 
    handleConfirm : function(component, event, helper) {
        //Find lightning flow from component
        var flow = component.find("OpptyFlow");
        //Put input variable values
        var inputVariables = [
            {
                name : "OpportunityId",
                type : "String",
                value : component.get("v.recordId")
            }
        ];
        //Reference flow's Unique Name
        flow.startFlow("OpportunityCloneFlow", inputVariables);
    },
     
    //Close the quick action
    handleClose : function(component, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
    },
     
    //Flow Status Change
    statusChange : function (component, event, helper) {
        //Check Flow Status
        if (event.getParam('status') === "FINISHED_SCREEN" || event.getParam('status') === "FINISHED") {
            var toastEvent = $A.get("e.force:showToast");
            toastEvent.setParams({
                title: "Success!",
                message: "Opportunity was cloned Successfully!",
                type: "success"
            });
            toastEvent.fire();
            $A.get("e.force:closeQuickAction").fire();
            $A.get('e.force:refreshView').fire();
        } else if (event.getParam('status') === "ERROR") {
            component.set("v.hasError", true);
        }
    }
})

Please help!