• Ragnar Lothbrok 7
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 6
    Replies
Hi there,

 I ran into one problem, and it is related to the chat transcript. So whenever the customer selects to chat with a live agent, then the agent selects that request then it opens the conversation page. Under the same conversation page(window where the customer and agent do the chat) there 3 buttons that I can see, out of which i want to remove the 1st one you can see in the below image for the same. If anyone is aware of how to do so or remove these buttons, please guide me through this.User-added image
Hello,

In my org, I have a sendEmail action on Order object which send an email and creates a Task record for that same email.
I had a requirements to associate that Task record to Account and Contact record.
Now this Account and Contact field is on Order object as Lookup.
So, if Order has Account or Contact then Associate that Task to them.
For that i created a flow which will check if Task is created for Order record then get the associated Account and Contact record and link to them with Task record.
Now under Task record we have Related To, Name fields already present for Order and Contact record respectively
So i created a custom field named Related To Account (Lookup to Account) under Activity object, so while creating i got an option to create Related list name/label for that Account object.

Problem : When i sendEmail from Order record -> It creates Task record for that email -> flow associate that Task to Account and contact record
While checking tha Related list under:
Order PageLayout : We can see that Task under Activity History,
Contact PageLayout : We can see that Task under Activity History,
Account PageLayout : We cannot see that Task under Activity History, But we can see Task under Activities Related list that i created when i was creating the lookup field on Activity Object(field: Related To Account)

So I wanted to know why i am not able to see Task under Activity History Realted list on Account Object, but i am able to see under Activities related list.
Please help me understand this.
Hi there,
I have a requirement when i need to send email from order object record.
So when i send email from order record then by default it RelatedTo that same Order record.
I need to make one more thing here is that ,there is an Account lookup field on order, So whenever an email is sent then it should relate to order record as well as the Account record associated with that Order record.

Anyone knows how we ca do that, please guide me in this.
Thanks
Hi there,
So i tried creating the send email quick action
Below is the code from salesforce doc that i am referring to create send email quick action.
.js code :
({
    doInit: function (cmp, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
        var navService = cmp.find("navService");
        var actionApiName = "Global.SendEmail";
        var pageRef = {
            type: "standard__quickAction",
            attributes: {
                apiName : actionApiName
            },
            state: {
                recordId : cmp.get("v.recordId")
            }
        };
        var defaultFieldValues = {
            HtmlBody: "Monthly Review",
            Subject : "Monthly Review"
        }
        pageRef.state.defaultFieldValues = cmp.find("pageRefUtil").encodeDefaultFieldValues(defaultFieldValues);
    
        navService.navigate(pageRef);
    },
})
So here i want to know how can we add default dynamic email template.
How can we add email template. Thanks.
HI All,
I have created an aura component that actually calls the send email global action to send an email.
Then on order object i created an action and called that aura component on that action button.
But when we click on button on record page its appears two modal one with Email and in background modal with header and cancel button.
I dont know how to remove then or eleminate the background modal that is of no use.
.cmp file
<aura:component implements="force:hasRecordId,flexipage:availableForAllPageTypes,force:lightningQuickAction">
    <!--Handler-->
    <lightning:navigation aura:id="navService"/>
    <lightning:pageReferenceUtils aura:id="pageRefUtil"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
</aura:component>

.js file
({
    doInit: function (cmp, event, helper) {
        var navService = cmp.find("navService");
        // var actionApiName = event.getSource().get('v.value');
        var actionApiName = "Global.SendEmail";
        var pageRef = {
            type: "standard__quickAction",
            attributes: {
                apiName : actionApiName
            },
            state: {
                recordId : cmp.get("v.recordId")
            }
        };
        var defaultFieldValues = {
            HtmlBody: "Monthly Review",
            Subject : "Monthly Review"
        }
        pageRef.state.defaultFieldValues = cmp.find("pageRefUtil").encodeDefaultFieldValues(defaultFieldValues);
    
        navService.navigate(pageRef);
    },

    doneRendering: function(cmp, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
    }
})

 
Hi,
I have been try to create the Aura component Quick Action for send email action, and trying to use it in Highlight panel.
We have the dicumentation (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_email_quick_actions.htm) to create send action on button click but i want it on Object specific quick action.
Will that be possible, if so how.

Thanks.
Hi there,
Today i was working on LWC Component which will give user an UI to send email with default email template assigned to that email.
Although i tried to get the email template from Apex class and used to in Email.
But it was not giving the correct format and data in email template.
Below is the .img for the same:
User-added imageIf anyone know how we can add and the same formattion as email template and data in template automatically appears. Please guide me in this. Thanks
Hi there,
I have been working on some integration class, and i am new to integration things.
Below is my main class that reads the payload data and updates it, under that i try to created Test class for it but  when i Run that test class it gives me an error like in .img.
There is also a Flow which invokes when Account record gets updated.
Main Class :
@RestResource(urlMapping='/accountInterestUpdate/*')
global with sharing class accountInterestUpdate {
    @HttpPost
    global static void doPost() {
        Map<String, Object> requestBody= (Map<String, Object>)JSON.deserializeUntyped(RestContext.request.requestBody.toString());
        Map<String, Object> requestBody1 = new Map<String, Object>();
        for(String s: requestBody.keySet()){
            requestBody1.put(s.toLowerCase(),requestBody.get(s));
        }
        system.debug('requestBody' +requestBody);
        String buyerId = String.valueOf(requestBody1.get('buyerid'));
        String subStatus = String.valueOf(requestBody1.get('interested'));
        String buyerEmpId = String.valueOf(requestBody1.get('buyeremployeeid'));
        String subsId = String.valueOf(requestBody1.get('subscriptionid'));
        Account account = [SELECT ID, Name, API_Buyer_Id__c, Contact_Buyer_Id__c, Interested__c FROM Account WHERE API_Buyer_Id__c = :buyerId LIMIT 1];
        if(subStatus == 'true'){
            account.Interested__c = true;
            account.Contact_Buyer_Id__c = buyerEmpId;
        }
        else{
            account.Interested__c = false;
            account.Contact_Buyer_Id__c = buyerEmpId;
        }
       update account;
    }
}
Test Class :
@isTest
public class accountInterestUpdateTest {
    @isTest 
     static void testPostMethod(){
        Test.startTest();
        Account acc = new Account();
        acc.Name = 'Test Account';
        acc.API_Buyer_Id__c = '234567';
        acc.Interested__c = true;
        insert acc;
        RestRequest req = new RestRequest(); 
        RestResponse res = new RestResponse();
        req.requestURI = '/services/apexrest/accountInterestUpdate/';
        String JSONMsg = '{"buyerId" : "'+acc.API_Buyer_Id__c+'","Interested":"true"}';
        req.requestBody = Blob.valueof(JSONMsg);
        req.httpMethod = 'POST';
        RestContext.request = req;
        RestContext.response= res;
        accountInterestUpdate.doPost();
        Test.stopTest();
    }
     @isTest static void testPostMethodInterestedFalse(){
        Test.startTest();
        Account acc = new Account();
        acc.Name = 'Test Account';
        acc.API_Buyer_Id__c = '234567';
        insert acc;
        Contact con = new Contact();
        con.FirstName = 'test';
        con.LastName = 'contact';
        con.AccountId = acc.id;
        insert con;
        RestRequest req = new RestRequest(); 
        RestResponse res = new RestResponse();
        req.requestURI = '/services/apexrest/accountInterestUpdate/';
        String JSONMsg = '{"buyerId" : "'+acc.API_Buyer_Id__c+'","Interested":"false"}';
        req.requestBody = Blob.valueof(JSONMsg);
        req.httpMethod = 'POST';
        RestContext.request = req;
        RestContext.response= res;
        accountInterestUpdate.doPost();
        Test.stopTest();
    }
}
.img
User-added image
User-added image
So, if anyone know anything, please help me in that. Any help is appreciated.
Hello there,
I have a checkbox field named as "Reviewed Cases". I want to make this field dependent (checked) only when there is a change in case owner field and the newly selected owner is of specific profile like ("AST Incident", "AST Support").
So is there a way that we can achieve this with validation rule or with some other way would be really appreciated.
Thank You.
Hello there,
I have a requirement for showing confirmation dialog box with ok and cancel button when user try to change the owner of the case from the field “Case Owner” in case page layout. Now this confirmation dialog box only shown if the new owner of case will be associated to some specific Profile (Like : Covid rep Profile).
User-added imageIn short, as a User when I try to change the case owner to “Covid rep Profile” user and click on the “Change Owner” button then I should get the confirmation box with ok and cancel button. If I click Ok, then the owner should change and If I click cancel then changing of case owner will be stopped or cancelled.
User-added imageAnd if the owner is other than “Covid rep Profile” user then it should work as normal standard way.
Do I have to create a Standard controller extention, but I am not familiar with this process at all, and any help would be very much appreciated.  
Please help however you can by telling me how to create a custom extentsion or whatever to achieve this functionality.
Thank you so much!
Hi there,
Is there a way that we can target the event of a field (Standard field - Case Owner) and make it run based on some profile and show pop-up confirmation message and once its confirmed change owner else dont change the owner.
How can we do this?
Thank you.
Hi there,
I have a requirement, in which i need to show a custom Pop-Up message with OK and Cancel button only -> whenever a case is transferred from CSR profile user to MSR profile user.
And if user clicks on OK button in pop-up it shoud proceed and complete the transfer of case ownership and If user clicks Cancel button then the process of transfer will stop.
Please assist me with this.
Any help is Appreciated. Thanks :)
Hello,
I am new to Apex coding, and also I am not comfortable to write test class. Can anyone help me to write the test class for this Apex class method. And also if you can suggest me how to start on writing test class so that i can also create one.
Apex Class Method :
@AuraEnabled
    public static string opportunityProductCreation(Id oppId, List<OpportunityLineItemWrapper> oliData)
    {
        //Start
        Id oppRecordId;
        string error=null;
        try {
            if (oppId == null) {
                return null;
            }else {
                oppRecordId = oppId;
            }         

            if(oliData.size()==0)
            {
                error ='Creation of Opportunity products is failed due to empty data';
            }
            
            if(oliData.size()>100)
            {
                error = 'Please make sure to upload not more than 100 records at a time.';
            }
            
            List<OpportunityLineItem> lineItemInsertList = new List<OpportunityLineItem>();

            //set of map to store productId that needs to be inserted
            Set<id> prdIdset = new Set<id>();        
            for (OpportunityLineItemWrapper olwrp : oliData) {
                prdIdset.add(olwrp.selectedProductId);
            }

            //map to store the productId as key with pricebookentryId as value
            Map<string,string> prodPbeMap = new Map<string,string>();
            for(PricebookEntry pe:[select id,IsActive,CurrencyIsoCode,Product2Id,Pricebook2Id,
                                Pricebook2.IsStandard,Name from PricebookEntry 
                                where Product2Id IN:prdIdset and Pricebook2.IsStandard=true and CurrencyIsoCode='USD'])
            {
                prodPbeMap.put(pe.Product2Id,pe.id);
            }

            for(OpportunityLineItemWrapper lwrp:oliData)
            {
                OpportunityLineItem li = new OpportunityLineItem();            
                li.OpportunityId = oppRecordId; 
                li.PricebookEntryId = prodPbeMap.get(lwrp.selectedProductId);
                
                //check for competitor
                if(lwrp.competitor!=null){                  
                    li.CompetitorName__c = lwrp.competitor;                    
                }
                //check for resalePrice
                if(lwrp.resalePrice!=null){
                    li.ResalePrice__c = decimal.valueOf(lwrp.resalePrice);                    
                }
                //check for targetCost
                if(lwrp.targetCost!=null){
                    li.TargetPrice1__c = decimal.valueOf(lwrp.targetCost);
                }
                //check for orderQuantity
                if(lwrp.orderQuantity!=null){
                    li.Quantity = decimal.valueOf(lwrp.orderQuantity);
                }
                //check for mPrice
                if(lwrp.mPrice!=null)
                {
                    li.UnitPrice = decimal.valueOf(lwrp.mPrice);
                    li.Price1__c = decimal.valueOf(lwrp.mPrice);
                }
                if(lwrp.mPrice==null)
                {
                    li.UnitPrice = 0;
                }
                //check for perUnit
                if(lwrp.perUnit!=null){
                    li.PriceUnit__c= decimal.valueOf(lwrp.perUnit);                    
                } 

                //This is for temporary purose - default the currency as user currency
                string userCurr = UserInfo.getDefaultCurrency();                
                li.PriceCurrency1__c = userCurr;

                lineItemInsertList.add(li); 
            }
             // Check for duplicate Pricebook Entry list and avoid duplicate Line item creation
            Set<string> pbEntryIdSet= new Set<string>();
            List<OpportunityLineItem> lineItemFinalList = new List<OpportunityLineItem>();
            for(OpportunityLineItem ol:lineItemInsertList)
            {
                if(pbEntryIdSet.add(ol.PricebookEntryId))
                {
                    lineItemFinalList.add(ol);
                }
            }

            system.debug('--lineItemInsertList--'+lineItemInsertList);
            system.debug('--lineItemFinalList--'+lineItemFinalList);
            
            if((String.isEmpty(error)) && (lineItemFinalList.size()>0))
            {            
                insert lineItemFinalList;
                error='SUCCESS';
                return 'SUCCESS';
            }
            
            return error;

        } catch (Exception e) {
            system.debug('Error Msg-- ' + e.getMessage() + 'Error Line No-- ' + e.getLineNumber());
            SC_ExceptionLogHandler.createExceptionLog(e,'PartsComponentCls');
            throw new AuraHandledException(e.getMessage());
        }
        //End
    }

Thanks.
Hello there.

Does anyone have an idea that how can we send the bell notification in Salesforce along with the record link in that. If it is possible please guide me how to do that, if not then why.

Requirements : Oppotunity  Account Owner logs into SF
Received a bell notification with the link to the Opportunity.

Thanks.
Hi,
Can Anyone know how can we make the "Submit for Approval" button available on community. Beacause there is a requirement of sending approval from Community page.

Also the buttons(all even the dropdown) on the below image is showing on community Opportunity detail Page but those button is non-clickable(non responsiveImage from the community page).
Although the user has all access for the (Partner profile).
Does anyone know about this issue how can we resolve these.
 
Hi,
I have a Lwc component there i am showing the list of fields with 3 rows, for that row we have values in it and that value is comming from this code :
getPickListValues({
            objApiName: 'OpportunityContactRole',
            fieldName: 'Role'
            })
            .then(data => {
                //console.log('OUTPUT : Picklist data :',data);
                for (let index = 0; index < data.length; index++) {
                    if(data[index].label=='L3' || data[index].label=='L4' || data[index].label=='L5'){
                        this.temp.push(data[index]);
                    }                    
                }
                this.options = this.temp;
                console.log('OUTPUT : TempData',this.options);
            })
            .catch(error => {
                console.log('OUTPUT Error: ',error);
            });

And the Html code is :
<template for:each={contactList} for:item="contact" for:index="index">
                <tr key={contact.Id}>
                    <td>
                        <!--<lightning-formatted-text data-index={index} value= {contact.role}></lightning-formatted-text>-->
                        <div class="slds-var-m-bottom_medium slds-var-p-right_medium">
                            <template if:true={options}>
                                <lightning-combobox data-index={index} class="myCombobox"  placeholder={label.Contact_Role_Placeholder} name="Role" value= {contact.role}                   
                                    options={options} onchange={onRoleChange} >
                                </lightning-combobox>
                            </template>
                            <!--<p>Selected value is: {contact.role}</p>-->
                        </div>
                    </td>
                <td>
<template>

And the UI is here :
User-added image
I wanted to have the default value for each row. On pageLoad directly, I tried but unable to do that, please guide me how to achieve that.
Thanks
Hi there,
Can anyone help me to write the test class or guide me how to write for this apex class :
public without sharing class PdrNewOpportunityController {

    private static final String VALIDATION_EXCEPTION = 'FIELD_CUSTOM_VALIDATION_EXCEPTION';

    @AuraEnabled

    public static Id saveOpportunity(Map<String, Object> fieldMap, List<Map<String, Object>> contactList){

        Opportunity opp;

        try{

            opp = createOpportunity(fieldMap);

            createContactRoles(contactList, opp.Id);

        } catch (Exception e){

            System.debug('Error Msg-- ' + e.getMessage() + 'Error Line No-- ' + e.getLineNumber());

            SC_ExceptionLogHandler.createExceptionLog(e,'PdrNewOpportunityController');

            throw new AuraHandledException(parseValidationError(e.getMessage()));

        }

        return opp.Id;

    }

    private static Opportunity createOpportunity(Map<String, Object> fieldMap) {

        Opportunity opp = new Opportunity();

        Map<String, Schema.SObjectField> oppFieldDescribeMap = Schema.SObjectType.Opportunity.fields.getMap();

        for (String fieldName : fieldMap.keySet()) {

            if (oppFieldDescribeMap.get(fieldName).getDescribe().getType() == Schema.DisplayType.DATE) {

                opp.put(fieldName, parseDate(fieldMap.get(fieldName)));

            } else {

                opp.put(fieldName, fieldMap.get(fieldName));

            }

        }

        insert opp;

        return opp;

    }

    private static void createContactRoles(List<Map<String, Object>> contactList, Id opportunityId) {

        List<OpportunityContactRole> contactRoles = new List<OpportunityContactRole>();

        for (Map<String, Object> contactRoleData : contactList) {

            String role = (String)contactRoleData.get('role');

            if (!String.isEmpty(role)) {

                contactRoles.add(new OpportunityContactRole(

                    OpportunityId = opportunityId,

                    Role = (String)contactRoleData.get('role'),

                    ContactId = extractContactIdFromUrl((String)contactRoleData.get('fullNameUrl'))

                ));

            }

        }

        if (!contactRoles.isEmpty()) { insert contactRoles; }

    }

    private static Id extractContactIdFromUrl(String fullNameUrl) {

        return fullNameUrl.substringAfter('contact/').substringBefore('/view');

    }

    private static Date parseDate(Object dateObj) {

        String dateStr = (String)dateObj;

        List<String> dateParts = dateStr.split('-');

        return Date.newInstance(

            Integer.valueOf(dateParts[0]),

            Integer.valueOf(dateParts[1]),

            Integer.valueOf(dateParts[2])

        );

    }

    private static String parseValidationError(String errorMsg) {

        String parsedMessage = errorMsg;

        if (!String.isEmpty(errorMsg) && errorMsg.containsIgnoreCase(VALIDATION_EXCEPTION)) {

            parsedMessage = errorMsg.substringAfter(':').substringAfter(',');

            // replace field API name with label, if an Opportunity field is mentioned

            if (parsedMessage.containsIgnoreCase('__c]')) {

                String fieldName = parsedMessage.substringAfterLast('[').substringBefore(']');

                Map<String, Schema.SObjectField> oppFieldDescribeMap = Schema.SObjectType.Opportunity.fields.getMap();

                if (oppFieldDescribeMap.containsKey(fieldName)) {

                    String fieldLabel = oppFieldDescribeMap.get(fieldName).getDescribe().getLabel();

                    parsedMessage = parsedMessage.substringBeforeLast('[') + fieldLabel;

                }

            }

        }

        return parsedMessage;

    }

}

Thanks.
Hi,
I am trying to insert products from lwc component to opportunity object from community. I have a component where there is an option for searching the product based on input and then there is "SAVE" button onclick() it saves the selected product to opportunity. So while searching the product the code is like : 
Select Id,Name,ProductID__c,OldMaterialNumber__c From Product2 where Name like : searchTxt With SECURITY_ENFORCED LIMIT 1000

and for saving the product code is like:
public static List<OpportunityLineItem> opportunityProductCreation(Id oppId, List<OpportunityLineItemWrapper> oliData){
        List<OpportunityLineItem> oliList = new List<OpportunityLineItem>();
        id oppRecordId = oppId;
        try {
            if(oliData.size()>0){  
                system.debug('Whole wrapper data print'+oliData);
                system.debug('incoming Opp ID'+oppId);
                for(OpportunityLineItemWrapper oli: oliData){
                    system.debug('Single data at once'+oli);
                    OpportunityLineItem oppLineItem = new OpportunityLineItem();
                    oppLineItem.product2Id          =   oli.selectedProductId;
                    oppLineItem.Opportunityid       =   oppRecordId;
                    oppLineItem.Quantity            =   decimal.valueOf(oli.orderQuantity);
                    oppLineItem.TargetPrice1__c =   decimal.valueOf(oli.targetCost);
                    oppLineItem.ResalePrice__c      =   decimal.valueOf(oli.resalePrice);
                    oppLineItem.CompetitorName__c = oli.competitor;
                    oppLineItem.PriceUnit__c    =   decimal.valueOf(oli.perUnit);
                    oppLineItem.Price1__c     =   decimal.valueOf(oli.Price);
                    oliList.add(oppLineItem);
                }
                system.debug('check all OPPLINEITEM data before insertion');
                insert oliList;
            }
            return oliList;
        } catch (Exception e) {
            system.debug('Error Msg-- ' + e.getMessage() + 'Error Line No-- ' + e.getLineNumber());
            SC_ExceptionLogHandler.createExceptionLog(e,'pdrPartsComponentCls');
            throw new AuraHandledException(e.getMessage());
        }

    }

So here while inserting Data i am recieving this error: 
Insert failed. 
    First exception on row 0; first error: REQUIRED_FIELD_MISSING, 
    Error: You can't select products until you've chosen a price book for this opportunity on the products related list.: []

So can anyone help me what i have to do inorder to save the opportunity from community side.
Thanks.
Hi there,
I wanted to create the OpportunityLineItem record from the the data that is passed from js. I have data in Array of object form.
Please anyone guide me in this, and how i can achieve this,
Below is the required code:
Js code:
let jsonString =[
{
"orderQuantity":"1",
"molexPrice":"1200",
"targetCost":"1150",
"perUnit":"1",
"resalePrice":"1250",
"competitor":"NoPlex",
"ProductName":"LEGEND PLATE, BLANK",
"ProductId":"01t0q000003s2nPAAQ"
},
{
"orderQuantity":"2",
"molexPrice":"1000",
"targetCost":"10000",
"perUnit":"1000",
"resalePrice":"1100",
"competitor":"MyMolex",
"ProductName":"CABLE HARNESS EMERGENCY HAMMER",
"ProductId":"01t0q0000023INwAAM"
}
]
let jsonString = JSON.stringify(this.temp);
        console.log('OUTPUT ::: ',jsonString);
        opportunityProductCreation({oppId : this.recordId, oliData : jsonString})
        .then(result=>{
            console.log(result);
            if(result){
                this.data = result;
            }
        }).catch(error => {
               this.data = undefined;
     });
I am new to the salesforce, anyone help is appreciated :D
Thank you.
:
Hello, could you give me a guide how to build a test class for the apex class I made. I never did code test classes, so i would be very thankful :D
Apex code:
public with sharing class PdrCustomFileUploadctrl {
    @AuraEnabled
    public static String uploadFile(String base64, String filename, String recordId) {
            ContentVersion cv = createContentVersion(base64, filename);
            ContentDocumentLink cdl = createContentLink(cv.Id, recordId);
            if (cv == null || cdl == null) { return null; }
            return cdl.Id;
    }
    private static ContentVersion createContentVersion(String base64, String filename) {
        ContentVersion cv = new ContentVersion();
        cv.VersionData = EncodingUtil.base64Decode(base64);
        cv.Title = filename;
        cv.PathOnClient = filename;
        try {
        insert cv;
        return cv;
        } catch(DMLException e) {
        System.debug(e);
        return null;
        }
    }
    private static ContentDocumentLink createContentLink(String contentVersionId, String recordId) {
                if (contentVersionId == null || recordId == null) { return null; }
        ContentDocumentLink cdl = new ContentDocumentLink();
        cdl.ContentDocumentId = [
        SELECT ContentDocumentId 
        FROM ContentVersion 
        WHERE Id =: contentVersionId 
        WITH SECURITY_ENFORCED
        ].ContentDocumentId;
        cdl.LinkedEntityId = recordId;
        try {
        insert cdl;
        return cdl;
        } catch(DMLException e) {
        System.debug(e);
        return null;
        }
    }
}

 
HI All,
I have created an aura component that actually calls the send email global action to send an email.
Then on order object i created an action and called that aura component on that action button.
But when we click on button on record page its appears two modal one with Email and in background modal with header and cancel button.
I dont know how to remove then or eleminate the background modal that is of no use.
.cmp file
<aura:component implements="force:hasRecordId,flexipage:availableForAllPageTypes,force:lightningQuickAction">
    <!--Handler-->
    <lightning:navigation aura:id="navService"/>
    <lightning:pageReferenceUtils aura:id="pageRefUtil"/>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
</aura:component>

.js file
({
    doInit: function (cmp, event, helper) {
        var navService = cmp.find("navService");
        // var actionApiName = event.getSource().get('v.value');
        var actionApiName = "Global.SendEmail";
        var pageRef = {
            type: "standard__quickAction",
            attributes: {
                apiName : actionApiName
            },
            state: {
                recordId : cmp.get("v.recordId")
            }
        };
        var defaultFieldValues = {
            HtmlBody: "Monthly Review",
            Subject : "Monthly Review"
        }
        pageRef.state.defaultFieldValues = cmp.find("pageRefUtil").encodeDefaultFieldValues(defaultFieldValues);
    
        navService.navigate(pageRef);
    },

    doneRendering: function(cmp, event, helper) {
        $A.get("e.force:closeQuickAction").fire();
    }
})

 
Hello there,
I have a checkbox field named as "Reviewed Cases". I want to make this field dependent (checked) only when there is a change in case owner field and the newly selected owner is of specific profile like ("AST Incident", "AST Support").
So is there a way that we can achieve this with validation rule or with some other way would be really appreciated.
Thank You.
Hi there,
I have a requirement, in which i need to show a custom Pop-Up message with OK and Cancel button only -> whenever a case is transferred from CSR profile user to MSR profile user.
And if user clicks on OK button in pop-up it shoud proceed and complete the transfer of case ownership and If user clicks Cancel button then the process of transfer will stop.
Please assist me with this.
Any help is Appreciated. Thanks :)
Hi,
Can Anyone know how can we make the "Submit for Approval" button available on community. Beacause there is a requirement of sending approval from Community page.

Also the buttons(all even the dropdown) on the below image is showing on community Opportunity detail Page but those button is non-clickable(non responsiveImage from the community page).
Although the user has all access for the (Partner profile).
Does anyone know about this issue how can we resolve these.
 
Hi there,
So the situation is, on opportunity list view page i want a quick action that can be used for creating an opportunity from there, instead of Standard "New" button.
How can we achieve this functionality.
Any help appreciated. Thanks.
Hi there,
So here, the situation is I have a community page on which i have to show opportunity list view. So for tat i added record list of opportunity, but now i am not able to see the New button on that. Although the user has object permission - Read, Create, Edit.
Any help is appreciated.
Thanks