• Rajesh T 19
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 6
    Replies
I could see the pricebookentry is created for all the currencies(if org has multi-currency enabled ) for each product. Can anyone explain me in simple laymen terms why we are using pricebookentry for adding products in opportunity ?
I have created cutom button which invoke the VF page has Aura component and placed this button on community Case's Record banner section. If User clicks the button system show the pop-up and here user clicks cancel button the page should re-direct to case record page. However it re-direct to record page but it was happening on the Banner section and entire page is not redirected where it shows two header section in the page as below,
User-added image
I have used below code to re-direct but it behaving as above and not working.
window.location.href = '/'+caseId;

Can anyonev help me on how to reload the entire page to re-direct to case record page on Community ?
On community Case detail page, I have used custom button to invoke VF which invoking aura component. After all the scenarios am trying to redirect the user to same record page or to case list view based on user response but it's not working. However the below code working on Lightning and classic context.

Not working on page redirect:
window.location.href = '/'+caseId;
window.location.href = '/'+casekeyprefix;

Aura component:
<aura:component controller="casecontroller" implements="force:appHostable,flexipage:availableForAllPageTypes,forceCommunity:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,force:appHostable,flexipage:availableForAllPageTypes" access="global" >
    <!--Attributes-->
    <aura:attribute name="caseId" type="Id"/>
    <aura:attribute name="source" type="String"/>
    <aura:attribute name="showModal" type="boolean" default="false"/>
     <aura:attribute name="Spinner" type="Boolean" default="false"/>
     <!--Aura Handler-->    
    
    <aura:handler event="aura:waiting" action="{!c.showSpinner}"/>
    <aura:handler event="aura:doneWaiting" action="{!c.hideSpinner}"/>
    <aura:handler name="init" value="{!this}" action="{!c.init}"/>
    
    <aura:handler event="force:navigateToSObject" action="{!c.navigate}"/>
    
         <!--loading spinner start... style=Brand Medium (blue dots)-->
     <aura:if isTrue="{!v.Spinner}">
        <div aura:id="spinnerId" class="slds-spinner_container">
           <div class="slds-spinner--brand  slds-spinner slds-spinner--large slds-is-relative" role="alert">
             <span class="slds-assistive-text">Loading</span>
             <div class="slds-spinner__dot-a"></div>
             <div class="slds-spinner__dot-b"></div>
           </div>
        </div>
     </aura:if>
      <!-- Loading spinner end--> 
    
     <aura:if isTrue="{!v.showModal}">
            <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" 
aria-modal="true" aria-describedby="modal-content-id-1" 
class="slds-modal slds-fade-in-open">
                <div class="slds-modal__container">
                    <header class="slds-modal__header">
                        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{! c.hideModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
<h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">
User Confirmation</h2>
                    </header>
                    <!--Modal/Popup Box Body Starts here-->
    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                        <p><b>Please click Ok button to delete the case or click cancel button to re-direct to Draft case. 
                            </b>
                        </p>
                    </div>
                    <!--Modal/Popup Box Footer Starts here-->
                    <footer class="slds-modal__footer">
                        <lightning:button variant="neutral"
                                          label="Cancel"
                                          title="Cancel"
                                          onclick="{! c.tocasepage }"/>
                        <lightning:button variant="brand"
                                          label="OK"
                                          title="OK"
                                          onclick="{!c.deletecase}"/>
                    </footer>
                </div>
            </section>
            <div class="slds-backdrop slds-backdrop_open"></div>
        </aura:if>
</aura:component>

Controller.Js:
({
    init : function(component, event, helper) {
        var caseId = component.get("v.caseId");
        var action = component.get("c.validatecaseexist");
        action.setParams({ "caseId" : caseId});
        action.setCallback(this, function(response) {
            var state = response.getState();
            console.log('state:: '+ state);
            if (state === "SUCCESS") {
                var ispresent = response.getReturnValue();
                if(ispresent === "True"){
                    component.set("v.showModal", true);
                }
                else if(ispresent === "False"){
                    
                }
            }
            else{
                console.log('Error in Init');
            }
        });
       $A.enqueueAction(action);
    },
    tocasepage : function(component, event, helper) {
        var caseId = component.get("v.caseId");
        window.location.href = '/'+caseId;
    },
     deletecase : function(component, event, helper) {
        var getcaseId = component.get("v.caseId");
        console.log('CasegetID:: '+ getcaseId);
        var casekeyprefix = getcaseId.substring(0, 3);
        var action = component.get("c.deletecasedetails");
        action.setParams({ "caseId" : getcaseId});
         console.log('CasegetID:: '+ getcaseId);
         action.setCallback(this, function(response) {
            var state = response.getState();
            console.log('state:: '+ state);
             if (state === "SUCCESS") {
                 var Isdeleted = response.getReturnValue();
                 if(Isdeleted === "True"){
                    window.location.href = '/'+casekeyprefix;
                }
                 else if(Isdeleted === "False"){
                    window.location.href = '/'+caseId;
                 }
             }
         });
         $A.enqueueAction(action);
    },
        // this function automatic call by aura:waiting event  
    showSpinner: function(component, event, helper) {
       // make Spinner attribute true for display loading spinner 
        component.set("v.Spinner", true); 
        console.log('inside show spinner');
   },
    
     // this function automatic call by aura:doneWaiting event 
    hideSpinner : function(component,event,helper){
     // make Spinner attribute to false for hide loading spinner    
       component.set("v.Spinner", false);
    }  
})

Application:
<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:DraftCaseDeletion_Comp"/>
</aura:application>

I'm new to Aura lightning and Community site, can anyone help me on how to navigate to case record page or case list view ? 

When user clicks delete(custom button) on Case page it should delete the case record and show user as record deleted successfully post page should re-direct to Case list view page.

Whether it can be achieve by using Screen Flow if triggered from Custom button ? or else which is the correct way to implement this functionality ?

I read some blogs states only sharing rules for the current user are considered for the class it seems sharing rules on the record level visibility. But some blogs says Field level security of the current user also enforced.
 Am confused here so can anyone tell me what are all the functions are considered when using Sharing keyword.

 

When I gone through the below code which already present in the system , I couldn't understand the function. Can anyone help me

Code in the Apex class:

Type theBatchType = Type.forName( con.BatchClass__c );
theBatch = ( Abstractclass )theBatchType.newInstance();
// Here con.BatchClass__c class extends the 

I could see in some scenarios developers using below code to map the child records with Parent.(e.x., Contact with Account)
for(Contact con: newcontact){
                    if(con.AccountId != null){
                        if(!maponobject.containsKey(con.AccountId)) {
                        maponobject.put(Con.AccountId, new List<Contact>());
                        } } }
but in some cases developer using the below code however the functionality is same as above,
for (Contact con: newcontact){
           if(con.AccountId != Oldcon.AccountId){
                  if(!maponobject.containsKey(con.AccountId)){
                   maponobject.put(con.AccountId, new List<Contact>{con});
                  } } }

What is difference on both code(why {con} added on second one but not in first ) and how the value is putting on the maponobject on both cases?
In my scenario, when calling the future methods has heavy loads it leads to Apex CPU time limit issue. I need to send the process result to users so if someone knows please help me on how to achieve this  if CPU time limit issue occurs.
In an existing scenario, helper.js calling the server side - Apex class Method 1 at first and based on the response calling again the Call back- Method 2(Apex class). But according to business situationwe need to add the callback -  Method 3(Apex class) based on the response from callback(Method 1) and after that based on Method 3 needs to call the callback - Method 2(Apex class). Is it possible to do it?
By my user account I can't see this button in the some opportunity but for the same Opportunity some other users able to see them. Can anyone knows on this please help here
In our sandbox there are around 100 Apex classes having older version which was created few years ago. Now I needs to update it to current version so please guide me who has idea on this? 

Thanks in advance !
There is already  Apexclasses in our Sandbox and our team modified some methods in few classes and tried to save but facing the above error. Can anyone please tell about why this is happening ?
Approver User(3rd approver) is not receiving email consistently for approval request from Salesforce and it strange few weeks ago,same user received email for few approval request.
Note: 2nd approver and 3rd approver user profile set up is not modified recently and seems both have access for this.
 
I have checked the email logs,unfortunately there were no email triggered during that time.

Functionality - Our Approval process depends on Manager of submitter or quote owner. And All approval email is triggered from Apttus package.

1st,2nd,3rd - approver also having same role hierarchy.

Some one pls help on this.
When record is transferred from production to development org, for (example)particullary England user must have country=England  in opportunity, but in that Oppportunity record it showing some other country instead of England,guide me how to solve,but for other country user opportunity record is showing user country??
i have opportunity and custom object(lookup realationship) ...but when two fields in custom object met the condition then opportunity object field want to update ='true' ....to done by trigger
In my scenario, when calling the future methods has heavy loads it leads to Apex CPU time limit issue. I need to send the process result to users so if someone knows please help me on how to achieve this  if CPU time limit issue occurs.
There is already  Apexclasses in our Sandbox and our team modified some methods in few classes and tried to save but facing the above error. Can anyone please tell about why this is happening ?
i have opportunity and custom object(lookup realationship) ...but when two fields in custom object met the condition then opportunity object field want to update ='true' ....to done by trigger