• VRK
  • NEWBIE
  • 195 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 78
    Questions
  • 65
    Replies
Hi ..
HI i am created one formula field which fetch value of StageName( picklist ) value.
if picklist value select As 01 - Funded, the formula field updated As 01.
if picklist value select As 02 - Approved, the formula field updated As 02.
Below coding is working fine, But i need write Dynmic instead of pass static Values.
We have 100 picklist values, So is there any way to write logic as dynamic ..

IF(ISPICKVAL( StageName , "01 - Funded"), "01",
IF(ISPICKVAL( StageName , "02 - Approved"), "02",
IF(ISPICKVAL( StageName , "03 - Underwriting - In Process"), "03",
IF(ISPICKVAL( StageName , "04 - Term Sheet Issued/Pre-Underwriting"), "04", ""))))

Thanks
VRK
  • March 25, 2021
  • Like
  • 0
Hi
i am having issues with Custom Clone button , can anyone pls check and  help on this .
Issue :
When click on Custom Clone Button , open popup page and close WITHOUT modify any fields on the popup page.
When refresh page, duplicate record is created .

Issue Replication steps:
Navigate to any opportunity record page and click on Custom Clone Button 
ii. Then open popup window with existing record Values
iii. click on Cancel Button ( Not selecting Save Record)
iv. Refresh page, then duplicate opporunity record created.

code:
comp:
<aura:component controller="NYL_CloneDeal"  implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access="global" >
    <aura:attribute name="recordId" type="Id" /> 
                  
   <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>  
</aura:component>

Controller:
({
     doInit : function(component, event, helper) {
        var action = component.get("c.cloneDealWithTeam");
        action.setParams({ "DealID": component.get("v.recordId")});
        action.setCallback( this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var result = response.getReturnValue();  
                 if(result.includes('error')){               /// display error message 
                   alert(result); 
                    return false;
                     
                }  
                    window.open(window.location.origin + '/' + result + '/e?retURL=' + result,'_self');
               
                var dismissActionPanel = $A.get("e.force:closeQuickAction");
                dismissActionPanel.fire();
            }
        });
        $A.enqueueAction(action);
    },
})


Apex class:

@AuraEnabled
  webservice static String cloneDealWithTeam(String DealID) {
    Boolean roleOriginator1 = false;
    Boolean mcfRoleOriginator1 = false;
    Integer iterationNumber = -1;
    Integer mcfIterationNumber = -1;
    Integer index;
    Integer mcfIndex;
    Opportunity clonedOppty;
    
    try {
        Set<String> fieldsToBeCloned = new Set<String>{'issuer_account__c','est_total_lien_leverage__c','investment_bank__c', 
                                                       'project_name__c', 'description', 'deal_category__c',
                                                       'accountid', 'classification__c', 'alternate_senior_leverage__c', 'alternate_total_leverage__c', 'junior_debt_pricing__c'};
      String objectName = 'Opportunity';
      String query = 'SELECT';
      String oppId = DealID;
            
      //be carefull here... you might hit heap size issues if there are too many fields on the object
      Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(objectName).getDescribe().fields.getMap();
           
      // Grab the fields from the describe method and append them to the queryString one by one.
      for(String s : objectFields.keySet()) {
        
        if (fieldsToBeCloned.contains(s)) //Only copy certain fields not all as per: T-550675
          query += ' ' + s + ',';
      }


      //strip off the last comma
      query = query.removeEnd (',');
            
      // Add FROM statement
      query += ' FROM ' + objectName;
            
      // Add on a WHERE/ORDER/LIMIT statement as needed
      query += ' WHERE ID = :oppId';
      Opportunity oldOppty = database.query(query);
      
      clonedOppty = oldOppty.clone(false, true, false, false);
      System.debug(clonedOppty.Id+'cloned Opty:'+clonedOppty);
    
        clonedOppty.OwnerId = UserInfo.getUserId();
         try {
          insert clonedOppty;
        } catch (DMLException ex) { 
          System.debug(ex.getMessage());
          return 'Error:'+ex.getMessage();
        }
         
        if (clonedOppty.ID != null) {
          
            List<Deal_Team__c> mcfDealTeam =  getMCFDealTeam(DealID);
            mcfDealTeam = mcfDealTeam.DeepClone(false,false,false);
            
            List<OpportunityTeamMember> opptyTeam = getOpportunityTeam(DealID);
            opptyTeam = opptyTeam.DeepClone(false,false,false);
            for (OpportunityTeamMember teamMember : opptyTeam) {
                iterationNumber = iterationNumber + 1;
                
                if(teamMember.TeamMemberRole == 'Originator 1'){
                  roleOriginator1 = true;
                  index = iterationNumber;
                }
                else{
                  teamMember.OpportunityID = clonedOppty.ID;
                }
                
            }
            System.debug('roleOriginator:'+roleOriginator1);
            System.debug('OTM1:'+opptyTeam);
            if(roleOriginator1){
              opptyTeam.remove(index);
              OpportunityTeamMember otm = new OpportunityTeamMember();
              otm.OpportunityID = clonedOppty.ID;
              otm.TeamMemberRole = 'Originator 1';
              otm.userId = UserInfo.getUserId();
              opptyTeam.add(otm);
              System.debug('OTM2:'+opptyTeam);
            }
            
            if(!roleOriginator1){
              
              OpportunityTeamMember otm = new OpportunityTeamMember();
              
              otm.OpportunityID = clonedOppty.ID;
              otm.TeamMemberRole = 'Originator 1';
              otm.userId = UserInfo.getUserId();
              
              opptyTeam.add(otm);
              System.debug('OTM3:'+opptyTeam);
            }
            
            
            try {
              insert opptyTeam;
              insert mcfDealTeam;
            } catch (DMLException ex) {
              System.debug('****1****'+ex.getMessage()+'*****Line Number:'+ex.getLineNumber());

              return 'Error:' + ex.getMessage();
            }
            
        }
     
      
    } catch (Exception e){
      System.debug('*****2***'+e.getMessage());
        return 'Error: ' + e.getMessage();
    }

    System.debug('****3****'+clonedOppty.ID);

    return clonedOppty.ID;
  }
  
Thanks
VRK
 
  • March 20, 2021
  • Like
  • 0
Hi 
I am creating  New Action Under 
Buttons, Links, and Actions 
for Lighting Component.

can some one help how to create below URL as Lighting Custom Component :

../{!$Label.Opportunity_NewButton_DealTeamObjectPrefix}/e?{!$Label.Opportunity_NewButton_DealTeamObject_OpportunityName_HTML_ElementId}={!Opportunity.Name}&{!$Label.Opportunity_NewButton_DealTeamObject_OpportunityNameLookup_HTML_ElementId}={!Opportunity.Id}&retURL={!Opportunity.Id}&saveURL={!Opportunity.Id}

Can anyone help on this.

Thanks
VRK
  • February 18, 2021
  • Like
  • 0
Hi 
Is it possible to send Email  with  Attachments to the Contact through Batch Apex.
lets explain little bit clear :
Test contact already have File 1 & File2.
So, 
I send to Send Email to ' Test Contact' along with  File1 & File2 ....through Batch Apex.

I am not sure, is it possible or not?
if possible, can some one provide any sample code for this requirment

Thanks
VRK

 
  • February 17, 2021
  • Like
  • 0




Custom links not appearing in ligthing

Hi folks,
I can able to see Custom inks in Classic version But unable to see in Lighitng Version.
All links are URL like below :

https://xxxx. salesforce.com/001/e?retURL=%2F001%2Fo&RecordType=01261000000WzE9&ent=Account

can some one help me how to show these Custom links in Lighting also...
if not possible , is there any way to display in Lighting ?
Thanks
VRK

  • February 17, 2021
  • Like
  • 0
Hi folks,
Below logic for 
When Deal Team records created, then same records created into Opp Team member records .
But , i required Logic AS :
If already records available in Opp Team Member , Then we can skip and create only new records
can any one helpme how to write logic for this :

global class BatchClass implements Database.Batchable<sobject>{
    
   Set<Id> dealIds = new Set<Id>();
   String sQuery;
   map<id, opportunity> mapOppIdRec = new map<id, opportunity>();
    // Start Method
    global Database.Querylocator start (Database.BatchableContext BC) {
        String sQuery;
       List<Deal_Team__c> listDealIds = [SELECT Name, Description, Deal__c FROM Deal_Team__c WHERE createdDate = yesterday];
       if (listDealIds.size()>0){
            sQuery='SELECT Name, Description, Deal__c FROM Deal_Team__c'; 
        }else {
            sQuery='SELECT Name, Description, Deal__c FROM Deal_Team__c where id=null';
        }
        return Database.getQueryLocator(sQuery);
    }
    
    // Execute method
    global void execute (Database.BatchableContext bc , List<Deal_Team__c> records){
        if (records.size()>0){
            List<OpportunityTeamMember> listToBeInserted = new List<OpportunityTeamMember>();           
            for (Deal_Team__c dealTeams : records){ 
            OpportunityTeamMember newOtm = new OpportunityTeamMember();
            newOtm.OpportunityId = dealTeams.Deal__c;
            //newOtm.CreatedBy = 'OpportunityTeamMember is created by' +userInfo.getUserId();
            listToBeInserted.add(newOtm);
            }         
            upsert listToBeInserted;     
        }
    }
 
    // Finish Method
    global void finish(Database.BatchableContext BC) {}
}
  • February 01, 2021
  • Like
  • 0
HI 
Email Tab under Activity is Missing in Sandbox, its available in Production.
I tried in add in Edit Lighting Record pages, But i can't .
This issue appears recently....
Any one idea how to fix this ?

User-added image
  • January 20, 2021
  • Like
  • 0

Hi
When upload attachements for Case Documnet Object getting View State Error .
Below scenario , getting View State Error:
Business tryng to upload PDF Documents more than 2 mb, getting this View State Error. 

When try to upload small size files more than 30+ also not getting this Error .
But, in our code we didn't mention anywhere File Size , pls let me know if required any modifications on below code :
VF Page :
---------

<apex:page docType="html-5.0" standardController="Case" extensions="CaseDocumentFileUploadCX" title="Upload Case document">
    <apex:includeScript value="{!URLFOR($Resource.jquery)}"  />
    <apex:form id="uploadForm">

    <script>
        var $jQuery = jQuery.noConflict();

        $jQuery(document).ready(function(){
            var $uploadNameInput = $jQuery('[id$="uploadFileName"]');
            //$uploadNameInput.prop('readonly', true);

            $jQuery('[id$="fileUploadInput"]').on('change', function(){
                var $this = $jQuery(this);
                $jQuery('[id$="documentLabel"]').val($this.val().split(/(\\|\/)/g).pop());
                //$uploadNameInput.prop('readonly', false);
                $uploadNameInput.val($this.val().split(/(\\|\/)/g).pop());
                //$uploadNameInput.prop('readonly', true);
                //refreshPage();
            });
            
            
        });
        
        </script>
        <script type="text/javascript">
        var caseDocId;
        var caseId = '{!caseId}';
        function evaluateCaseDoc() {
            $jQuery('#okuploadbtn').hide();
            $jQuery('#msg').text('Uploading');


            Visualforce.remoting.Manager.invokeAction(
                '{!$RemoteAction.CaseDocumentFileUploadCX.evaluate}',
                '{!jsonString}',
                '{!uploadFileName}',
                function(result1, event){
                    caseDocId = result1;
                    Visualforce.remoting.Manager.invokeAction(
                        '{!$RemoteAction.CaseDocumentFileUploadCX.executeRequest}',
                        result1,
                        function(result2, event){
                            $jQuery('#msg').text(result2);
                            if(result2 === 'Document Upload SUCCESSFUL!'){
                                $jQuery('#donebtn').show();
                            }else{
                                $jQuery('#retrybtn').show();
                            }
                        }, 
                        {escape: true}
                    );
            }, 
                {escape: true}
            );
        }
        
        </script>
        <!--<apex:actionFunction name="createCaseDoc" action="{!evaluate}" />-->
        <apex:actionFunction name="reupload" action="{!reupload}" />
        <apex:actionFunction name="loadCaseDoc" action="{!loadCaseDoc}" />
        <apex:outputPanel id="showstate"/>
        <apex:pageBlock id="filePageBlock" >
            <apex:pageMessages />
            <apex:pageBlockSection columns="1" title="File selection" id="fileSelection" >
                <apex:pageBlockSectionItem >
                    <apex:outputLabel value="{!$ObjectType.CaseDocument__c.Fields.FilePath__c.Label}" />
                    <apex:inputFile value="{!fileUpload.body}" filename="{!fileUpload.name}" id="fileUploadInput" fileSize="{!caseDoc.FileSize__c}" contentType="{!caseDoc.MimeType__c}" style="width:100%;height:20px;" />
                </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
        <apex:pageBlock id="fileSelectionDetails" >
            <apex:pageBlockSection columns="1" title="File upload details">
                <apex:inputField value="{!caseDoc.Name}" label="{!$ObjectType.CaseDocument__c.Fields.Name.Label}" id="documentLabel" required="true" style="width:50%;" />
                <apex:inputText value="{!uploadFileName}" label="File name" id="uploadFileName" style="width:50%;" />
                <apex:inputField value="{!caseDoc.MimeType__c}"  rendered="false" label="{!$ObjectType.CaseDocument__c.Fields.MimeType__c.Label}" style="width:50%;"  />
                <apex:inputField value="{!caseDoc.BusinessCode__c}" style="width:50%;" />
                <apex:inputField value="{!caseDoc.CaseId__c}" label="{!$ObjectType.CaseDocument__c.Fields.CaseId__c.Label}" id="fileUploadCase" style="width:50%;"  />
            </apex:pageBlockSection>
            
            <apex:commandButton action="{!showCheckOpen}" value="Upload" />
        </apex:pageBlock>
        
        <apex:outputPanel id="showFileOpenPopUp">
          <apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!showFileOpenPopUp}"/>
            <apex:outputPanel styleClass="custPopup overlayDialog cssDialog inlineEditDialog" style="display:block; visibility:visible;" layout="block" rendered="{!showFileOpenPopUp}">
              <div class="topRight">
                <div class="topLeft">
                  <h2></h2>
                </div>
              </div>
              <br />
              <apex:outputPanel id="msgLabelClass" rendered="{!showFileOpenPopUp}">
                  <div id="msg">{!$Label.CheckFileOpenDialogMessage}</div>
                  <br />
                  <br />
              </apex:outputPanel>                         
              <div class="buttons zen" style="margin-left: 100px; ">
                 <input id = "okuploadbtn" class="btn" width="20px" type="button" value="{!$Label.CheckFileOpenDialogOkButton}" onclick="evaluateCaseDoc();return false; "  />
                 <input id = "donebtn" style="display:none;" class="btn" width="20px" type="button" value="{!$Label.CheckFileOpenDialogOkButton}" onclick="window.open('/'+caseDocId,'_self');"  />
                <input id = "retrybtn" style="display:none;" class="btn" width="20px" type="button" value="{!$Label.CheckFileOpenDialogOkButton}" onclick="window.open('/apex/CaseDocumentFileUpload?id='+caseId,'_self');"  />
                </div>
            </apex:outputPanel>
        </apex:outputPanel>
                
    </apex:form>

    <style>

      [id$='msgLabelClass'] {
         display: inline;        
      }

      [id$='msgLabelClass'] > label {
         margin-left: 10px;
        block-width: 260px;
         display: inline-block;
      }

      [id$='msgLabelClass'] + table {
         margin-left: 10px;
         display: inline;
         vertical-align: middle;
         width: auto;
      }

      .custPopup{
         background-color: white;
         z-index: 100;
         left: 50%;
         position: absolute;
         /* These are the 3 css properties you will need to change so the popup 
            displays in the center of the screen. First set the width. Then set 
            margin-left to negative half of what the width is. You can add 
            the height property for a fixed size pop up if you want.*/
         width: 300px;
         height: 130px;
         margin-left: -250px;
         top:100px;
         padding-bottom: 15px;
      }

      .custPopup h2 {
                margin-right: 30px;
      }
      
      .popupBackground{
                background-color:black;
                opacity: 0.20;
                filter: alpha(opacity = 20);
                position: absolute;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                z-index: 99;
      }
    </style>    
</apex:page>

Apex class:
----------------
/**
 * @description Extension controller class for Case Document file upload functionality

 */
global with sharing class CaseDocumentFileUploadCX {
    public Document fileUpload {get;set;}
    public String uploadFileName {get;set;}
    public CaseDocument__c caseDoc {get;set;}
    public Case currentCase {get;set;}
    public Integer fileSize {get;set;}
    public String jsonString {get;set;}
    //19.JAN.2015 Yogesh Gupta, NYLIM  Added new Dialog
    public Boolean showFileOpenPopUp{get;set;}
    public String caseDocId {get;set;}
    public String caseId {get;set;}
    private boolean isSuccess;

    private static String injectHeader = ' DMS Document Maintenance (From Case Document)'; 
    private static String injectTempHeader = ' DMS Document Maintenance Temp (From Case Document)';
    private static Set<String> injectStates = new Set<String>{'5.4.a'};
    private static Set<String> injectTempStates = new Set<String>{'4.2.a','4.1.a','5.4.b'};
    

    global CaseDocumentFileUploadCX(ApexPages.StandardController controller) {
        currentCase = (Case) controller.getRecord();
        caseId  = currentCase.Id;
        fileUpload = new Document();
        uploadFileName = '';
        fileSize = 0;
        caseDoc = new CaseDocument__c();
        caseDoc.CaseId__c = currentCase.Id;
        caseDoc.MimeType__c = '';
        isSuccess = false;
    }

     @RemoteAction
    global static String evaluate(String jsonString, String uploadFileName ){
        PageReference newPage = null;
            
        System.debug('uploadFileName ::: ' + uploadFileName);
        String caseDocId;
         CaseDocument__c caseDoc = (CaseDocument__c) JSON.deserialize(jsonString, CaseDocument__c.class);
        //hideFileOpenPopUpPanel();
        if (uploadFileName != null && uploadFileName != '') {
            // Fetch file upload settings for the current user's profile
            FileUploadSettings__c fileUploadSettings = FileUploadSettings__c.getInstance(UserInfo.getProfileId());
            if (fileUploadSettings == null) {
                fileUploadSettings = FileUploadSettings__c.getOrgDefaults();
            }
            
            // Build the file path
            Id uid = UserInfo.getUserId();
            List<String> userFields = new List<String>{
                'Id',
                'FederationIdentifier'
            };
            String queryString = CS_UtilSObject.buildQuery(Schema.SObjectType.User, userFields);
            queryString += 'WHERE Id = :uid';
            User u = Database.query(queryString);
            //User u = [SELECT Id, FederationIdentifier FROM User WHERE Id = :uid];
            if (u != null) {
                caseDoc.FilePath__c = fileUploadSettings.get('NetworkFolderRootPath__c') + '\\' + u.FederationIdentifier + '\\' + uploadFileName;
            } else {
                ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'User not found');
                ApexPages.addMessage(errMsg);
            }
            
            try {
                CaseDocumentTrigger_Handler.runAfterInsert = false;
                CaseDocumentTrigger_Handler.runAfterUpdate = false;
                
                insert caseDoc;
                caseDocId = caseDoc.Id;
                System.debug('* ** *** insert ' + caseDocId);
                
                
                newPage = New PageReference('/apex/CaseDocumentFileUpload2?id=' + caseDoc.id);
                newPage.setRedirect(true);
            } catch (Exception e) {
                //ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.FATAL, e.getMessage());
                //ApexPages.addMessage(errMsg);
                System.debug('Error ::: ' + e);
            }
        } else {
            ApexPages.Message errMsg = new ApexPages.Message(ApexPages.Severity.ERROR, 'Please upload a document');
            ApexPages.addMessage(errMsg);
        }

        return caseDocId;
    }
    
    
    public PageReference showCheckOpen(){
        showFileOpenPopUp = true;
        jsonString = JSON.serialize(caseDoc);
        fileUpload = new Document();
        caseDoc = new CaseDocument__c();
        return null;
    }
    
    @RemoteAction
    global static String executeRequest(String caseDocId) {
            System.debug('* ** *** executeRequest');
            System.debug('* ** *** caseDocId ' + caseDocId);
            List<CaseDocument__c> caseDocList = [SELECT Id, IntegrationState__c, FilePath__c  FROM CaseDocument__c WHERE Id = :caseDocId LIMIT 1];
            if(caseDocList.isEmpty()){
                return 'UPLOAD FAILURE: An unexpected error has occured. Please try to upload document again. If you continue to experience difficulties, please contact your system administrator.';
            }
            
            CaseDocumentTrigger_Handler.runAfterInsert = false;
            CaseDocumentTrigger_Handler.runAfterUpdate = false;
            CaseDocumentTrigger_Handler.runBeforeUpdate = false;
                
            CaseDocument__c  caseDoc = caseDocList.get(0);
            if(injectStates.contains(caseDoc.IntegrationState__c)){
                if(!Test.isRunningTest()) CaseDocumentTrigger_Handler.executeRequests(new Set<String>{caseDoc.id},injectHeader,true); 
            }else{
                if(!Test.isRunningTest()) CaseDocumentTrigger_Handler.executeRequests(new Set<String>{caseDoc.id},injectTempHeader,true); 
            }
            
            PageReference newPage;
            caseDoc = [SELECT Id, CaseId__c, DMSInject_Code__c, DMSInject_Status__c FROM CaseDocument__c WHERE Id = :caseDocId];
            
            if(caseDoc.DMSInject_Status__c  == 'SUCCESS'){
                boolean isSuccess  = true;
                
                return 'Document Upload SUCCESSFUL!';
            }else{
                delete caseDoc;
                if(caseDoc.DMSInject_Code__c == '01'){
                    return 'DOCUMENT NOT FOUND: Please ensure that the document that you are trying to upload is located in the proper location and try again.';
                }else{
                    return 'UPLOAD FAILURE: An unexpected error has occured. Please try to upload document again. If you continue to experience difficulties, please contact your system administrator.';
                }
                
               
            }
            return 'UPLOAD FAILURE: An unexpected error has occured. Please try to upload document again. If you continue to experience difficulties, please contact your system administrator.';
            //return  New PageReference('/apex/CaseDocumentFileUpload2?id=' + caseDoc.id);

    }
   
   public PageReference reupload(){
        PageReference  newPage  =  New PageReference('/apex/CaseDocumentFileUpload?id=' + caseId);
        newPage.setRedirect(true);
        return newPage;  
    }
    
    public PageReference loadCaseDoc(){
        PageReference  newPage  = New PageReference('/' + caseDocId);
        
        newPage.setRedirect(true);
        return newPage;  
    }
    
    public PageReference showFileOpenPopUpPanel(){
        showFileOpenPopUp=True;
        return null;
    }

    public PageReference hideFileOpenPopUpPanel(){
        showFileOpenPopUp = False;
        return null;
    }   
}

Pls let me know any one have idea, how to fix View State error when upload large files for CaseDocumnet Object
Thanks
VRK

  • November 22, 2020
  • Like
  • 0
Hi pls l can et me know if anyone have idea on below points:

1. What is the difference between Salesforce IQ Inbox & salesforce Inbox?
ii. is it Licensed or Free ?

I need basic understandings, Pls don't share google stuff ....

Thannks
VRK
  • October 19, 2020
  • Like
  • 0
Hi 
let me know any Idea on below oncs:

1. Can we customize Standard Page Layouts without Using VF ?

Brief details :
I have Contact Object  and fiels like  firstName, lastName, phone,mobile,  Address1, Address2 ,Address 3.....
By using standard Page layout i created diffent sections like

Personal Information ( Section)
    firstName, lastName, phone
Contact details ( Section)
    Phone, landphone, mobile
Address ( Section)
    Address1, Address2 ,Address 3
    
Now the requirment is , My Business dont want Address as Section ...Instead of section , he wants to some thing different  Box Type or anyOther

I know ,By using Sections only we can divide Under Page Layouts.....
Do you have any idea, Without Using VF , can we go for Customize page layouts ?
************************************
2. Date format (EST) format issue When export data into CSV / Excel file?

Before export data , I updated Time Zone in below areas:
  1. Data loader 
  ii.User Time zone
  iii. System Time zone
 
 In Dataloader, When i query , Date format looks Correct
  2020-09-21 19:41:52
 But, when i export into CSV / Excel, the date format display as Below :
 2020-09-21T19:41:52.000Z

I tried, multiple ways , but its not working.
Any Idea on this?
  • October 08, 2020
  • Like
  • 0
Hi 
------------
Issue : Insufficinet access rights on cross-reference ID

Scenario : 
created process builder based on the Asset Object by follow critiria:

AND( AND( NOT ( ISPICKVAL([Asset].ADV_Classification__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Code__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Product__c,"") ), 
NOT ( ISPICKVAL([Asset].Executive_Summary__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Class__c,"") ) ,
ISPICKVAL( [Asset].Status, "onboarding") , 
OR( ISPICKVAL(PRIORVALUE([Asset].ADV_Classification__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Code__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Product__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Executive_Summary__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Class__c) , "") ) ) )

Immediate actions:
Create a Record
RecordType : Task
Assigned To ID  : Assign Task Queue
Related to ID   : {Asset.Id}

This issue is getting for only few profiles, But admin profiles not getting 

I verified, profile have proper access for Task , Asset and required fields

And this is happening after Winter 21 Refresh .................

Do you have any ideas ?

Thanks
VRK
-----------------------
  • October 01, 2020
  • Like
  • 0
Hi guys,
I created Task Queue in Sandbox :
Queue Name  : testTask _Queue
Queue Email  : << valid busines user mail ID>>
Support Obj   :  Task
Queue members : << Valid business User mail ID>>
Send Email to Members  : checkbox is True.

After that i created one New Task and assign to this ' testTask _Queue'.
But, Queue member not received Task notifications.

I verified Email logs, mail Event status display As  Delivered.
----------
Date Time Internal Message ID Mail Event Recipient Sender Remote Host Bytes Transferred Salesforce.com User Message ID Header Retry Count Seconds In Queue Delivery Stage
########E1/AF-03942-3900B5F5  D abc@xxx.com noreply@chatter.salesforce.com206.210.19.232144050051I000002S5af<fUUah000000000000000000000000000000000000000000000QGH95F006hk6OrLuT9OPwGCztMvZCQ@sfdc.net>01.179895 

ii. setup -> Deliveribility --> All emails 
iii. Activity Settings ---> Already enable 'Enable User Control over Task Assignment Notifications'.

But , User informing  he didn't received any Task Notifications.

Pls let me know , can i miss anything or is there anything need to configure.
can you pls check and let me know your inputs on this

Thanks
VRK
  • September 13, 2020
  • Like
  • 0
Hi 
can anyone have  Winter 21 Release Features PPT, If yes can you pls share
Thanks
VRK
  • August 27, 2020
  • Like
  • 0
Hi Team
My scenario :
For Test purpose , we configured Lightning Sync in Sandbox for User ( tesUser)  . its working fine .
Now , we configured in Prod for the same user 'testUser'.
its also working fine.
Now the problem is , User can able to both Sandbox & Production calender events his Outlook

So, we removed user from Sandbox, Now in sandbox, stopped getting new calender Syns.
But the problem, Old calender syns are still displaying even if we remove 'testUser ' in lighting sync configuration related to Sandbox

can you pls let me know , how can we remove old user's calender Syncs related to Sandbox ?

Thanks
VRK
 
  • August 26, 2020
  • Like
  • 0
Hi Below code working for Before Insert But not for Before Update
anyone pls check whats the issue:

 try{
       Set<Id> Ids = new Set<Id>(); 
       Map<Id, Task> oldMapTask = (Map<Id, Task>)oldsoMap;
       Map<Id, Event> oldMapEvent = (Map<Id, Event>)oldsoMap;
        
        for(sobject sObj: newsoList){
               if(((Id)sObj.get('WhoId')).getSObjectType().getDescribe().getName() == 'Contact'){
                 if(activityType == 'Task'){
                    Task objTask = (Task)sObj;
                    if(oldsoMap == null){
                        objTask.Contact_Team_TPD__c = objTask.whoid;
                    }
                    else if(oldsoMap != null && objTask.whoid != oldMapTask.get(objTask.id).whoid){
                        objTask.Id = sObj.id;
                        objTask.Contact_Team_TPD__c = objTask.whoid;
                    }
                }
                 else if(activityType == 'Event'){
                     Event objEvent = (Event)sObj;
                     if(oldsoMap == null){
                        objEvent.Contact_Team_TPD__c = objEvent.whoid;
                    }
                    else if(oldsoMap != null && objEvent.whoid != oldMapTask.get(objEvent.id).whoid){
                        objEvent.Id = sObj.id;
                        objEvent.Contact_Team_TPD__c = objEvent.whoid;
                    }
                         
                    }                   
                }
                
            }

Thanks
VRK
  • August 25, 2020
  • Like
  • 0
Hi 
Scenario : when i create new Task / Event , then phone number field value populate from related to Contact Object Phone field.
For example :
I have Contact ' Test Contact ' and phone number is '99999999'.
When i create any Task /  Event, then Test Contact phone number is display as '99999999'.

Thanks
VRK
  • August 23, 2020
  • Like
  • 0

Hi I have few questions on Einstein activity capture , pls let me know if anyone have idea / Suggest for better solutions :

My requirement :
------------------------------

Calender Sync Salesforce ( bi-direction)
        &&
Task Sync ( bi-direction)

my analysis :
-------------
Lightning Sync :
---- After Dec 2020 , its depreciated and Salesforce suggested go for 'Einstein Actvity Capture'
My questions are ??
i. Is Einstein supports both Calender Sync & Tasks Sync
Note : I am sure, its support for Calender Sync But not sure for Tasks Sync

2. 
License = Sales Cloud Einstein --> Permission Set = Sales Cloud Einstein  
License = Inbox --> Permission Set = Inbox with Einstein Activity Capture
License = Sales Cloud --> Permission Set = Standard Einstein Activity Capture
Any one idea, which License supports for my requirement ? and is this License free or Cost ?

3. Do you have any other Suggestions for Tasks Sync ?
Pls treat this is little bit urget...
Thanks
VRK

  • August 04, 2020
  • Like
  • 0
Hi 
As per requrirement,  
Sync calender & Tasks with Salesforce 

i verify in google but not find not related
can you pls suggest if any one have /  free app exchane plugIns

Thanks
VRK
  • July 23, 2020
  • Like
  • 0
Hi 
Application_ c employerApplication = [ select id,Party__c,Plan_Type__c,State__c from Application__c ];


 public static EmpInfoWrapper caseInfoWrapperRecord(Application__c employerApplication,Id partyId){
        InfoWrapper wrapper = new InfoWrapper();
        wrapper.partyId = employerApplication.Party__c;
        wrapper.productType = ' Life';             
        if(employerApplication.Plan_Type__c == 'SI'){
            wrapper.product = ' Issue1';
        }else if (employerApplication.Plan_Type__c == 'GI'){
            wrapper.product = ' Issue2';
        }
        wrapper.stateId = employerApplication.State__c;
        return wrapper;
    }
    
    public class InfoWrapper{
        public String partyId{get;set;}  
        public String productType{get;set;} 
        public String product{get;set;}  
        public String stateId{get;set;}   
    } 
  • July 18, 2020
  • Like
  • 0
Hi 
i am having 2 issus, can u pls help on this :
1. How can i place below data Into Map :
(
        caseInfoWrapper:
        [carrierId=, 
        partyId=a1K2F000000lWJrUAM, 
        product=SI, 
        productType=Whole Life, 
        stateId=AK]
        )

2. When calling Wrapper class from one class to another class getting below error :
Illegal assignment from List<NewCtr.caseInfoWrapper> to List<String>

global class NewCtr {
public static List<caseInfoWrapper> caseInfoWrapperRecords(List<ATD_Application__c> applicationList,Id partyId){
      List<caseInfoWrapper> lsCaseWrappers = new List<caseInfoWrapper>();
        for(ATD_Application__c caseInfo : applicationList){
            caseInfoWrapper wrapper = new caseInfoWrapper();
            wrapper.partyId = caseInfo.Party__c;
            wrapper.productType = 'Whole Life';
            lsCaseWrappers.add(wrapper);
            system.debug('lsCaseWrappers***'+lsCaseWrappers);
        }
        return lsCaseWrappers;
    }
    
    }
    
global with sharing class NewHandler {

    list<caseInfoWrapper> wrapperRecords = NewCtr.caseInfoWrapperRecords(applicationList,partyId);
}
  • July 10, 2020
  • Like
  • 0
Hi folks,
How to send email alert / notificaiton from Case object to '''SLA Custom object ---> Peer reviwer ''' through APex class.
Can you some one pls provide code for this requirement 
Thanks
Sekhar
 
  • November 07, 2019
  • Like
  • 1
scenario :   Case is created in Salesforce,  Immediatly this case details be moved to third patry systems ( .net system, java sysstem,.......)
how can i do this ?
example : 
case # 12345 created in salesforce, immediatly case reflected in third party systems like java ,.net or some other systems.
Due to project cost, not going for opiton use third party integration tools like Dell boomi......or any other tools.

please provide any ideas on this requirement 
Thanks 
  • May 18, 2018
  • Like
  • 1
Hi Team,
I got one question from the interviewer that:
I have two users I want to show A user half of the fields of XYZ object and B wants to show remaining fields in the aura component, how we can achieve this.
 
Hi ..
HI i am created one formula field which fetch value of StageName( picklist ) value.
if picklist value select As 01 - Funded, the formula field updated As 01.
if picklist value select As 02 - Approved, the formula field updated As 02.
Below coding is working fine, But i need write Dynmic instead of pass static Values.
We have 100 picklist values, So is there any way to write logic as dynamic ..

IF(ISPICKVAL( StageName , "01 - Funded"), "01",
IF(ISPICKVAL( StageName , "02 - Approved"), "02",
IF(ISPICKVAL( StageName , "03 - Underwriting - In Process"), "03",
IF(ISPICKVAL( StageName , "04 - Term Sheet Issued/Pre-Underwriting"), "04", ""))))

Thanks
VRK
  • March 25, 2021
  • Like
  • 0
Hi folks,
Below logic for 
When Deal Team records created, then same records created into Opp Team member records .
But , i required Logic AS :
If already records available in Opp Team Member , Then we can skip and create only new records
can any one helpme how to write logic for this :

global class BatchClass implements Database.Batchable<sobject>{
    
   Set<Id> dealIds = new Set<Id>();
   String sQuery;
   map<id, opportunity> mapOppIdRec = new map<id, opportunity>();
    // Start Method
    global Database.Querylocator start (Database.BatchableContext BC) {
        String sQuery;
       List<Deal_Team__c> listDealIds = [SELECT Name, Description, Deal__c FROM Deal_Team__c WHERE createdDate = yesterday];
       if (listDealIds.size()>0){
            sQuery='SELECT Name, Description, Deal__c FROM Deal_Team__c'; 
        }else {
            sQuery='SELECT Name, Description, Deal__c FROM Deal_Team__c where id=null';
        }
        return Database.getQueryLocator(sQuery);
    }
    
    // Execute method
    global void execute (Database.BatchableContext bc , List<Deal_Team__c> records){
        if (records.size()>0){
            List<OpportunityTeamMember> listToBeInserted = new List<OpportunityTeamMember>();           
            for (Deal_Team__c dealTeams : records){ 
            OpportunityTeamMember newOtm = new OpportunityTeamMember();
            newOtm.OpportunityId = dealTeams.Deal__c;
            //newOtm.CreatedBy = 'OpportunityTeamMember is created by' +userInfo.getUserId();
            listToBeInserted.add(newOtm);
            }         
            upsert listToBeInserted;     
        }
    }
 
    // Finish Method
    global void finish(Database.BatchableContext BC) {}
}
  • February 01, 2021
  • Like
  • 0
Hi pls l can et me know if anyone have idea on below points:

1. What is the difference between Salesforce IQ Inbox & salesforce Inbox?
ii. is it Licensed or Free ?

I need basic understandings, Pls don't share google stuff ....

Thannks
VRK
  • October 19, 2020
  • Like
  • 0
Hi 
------------
Issue : Insufficinet access rights on cross-reference ID

Scenario : 
created process builder based on the Asset Object by follow critiria:

AND( AND( NOT ( ISPICKVAL([Asset].ADV_Classification__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Code__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Product__c,"") ), 
NOT ( ISPICKVAL([Asset].Executive_Summary__c,"") ), 
NOT ( ISPICKVAL([Asset].Accounting_Class__c,"") ) ,
ISPICKVAL( [Asset].Status, "onboarding") , 
OR( ISPICKVAL(PRIORVALUE([Asset].ADV_Classification__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Code__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Product__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Executive_Summary__c) , ""), 
ISPICKVAL(PRIORVALUE([Asset].Accounting_Class__c) , "") ) ) )

Immediate actions:
Create a Record
RecordType : Task
Assigned To ID  : Assign Task Queue
Related to ID   : {Asset.Id}

This issue is getting for only few profiles, But admin profiles not getting 

I verified, profile have proper access for Task , Asset and required fields

And this is happening after Winter 21 Refresh .................

Do you have any ideas ?

Thanks
VRK
-----------------------
  • October 01, 2020
  • Like
  • 0
Hi Team
My scenario :
For Test purpose , we configured Lightning Sync in Sandbox for User ( tesUser)  . its working fine .
Now , we configured in Prod for the same user 'testUser'.
its also working fine.
Now the problem is , User can able to both Sandbox & Production calender events his Outlook

So, we removed user from Sandbox, Now in sandbox, stopped getting new calender Syns.
But the problem, Old calender syns are still displaying even if we remove 'testUser ' in lighting sync configuration related to Sandbox

can you pls let me know , how can we remove old user's calender Syncs related to Sandbox ?

Thanks
VRK
 
  • August 26, 2020
  • Like
  • 0
Hi 
Scenario : when i create new Task / Event , then phone number field value populate from related to Contact Object Phone field.
For example :
I have Contact ' Test Contact ' and phone number is '99999999'.
When i create any Task /  Event, then Test Contact phone number is display as '99999999'.

Thanks
VRK
  • August 23, 2020
  • Like
  • 0

Hi I have few questions on Einstein activity capture , pls let me know if anyone have idea / Suggest for better solutions :

My requirement :
------------------------------

Calender Sync Salesforce ( bi-direction)
        &&
Task Sync ( bi-direction)

my analysis :
-------------
Lightning Sync :
---- After Dec 2020 , its depreciated and Salesforce suggested go for 'Einstein Actvity Capture'
My questions are ??
i. Is Einstein supports both Calender Sync & Tasks Sync
Note : I am sure, its support for Calender Sync But not sure for Tasks Sync

2. 
License = Sales Cloud Einstein --> Permission Set = Sales Cloud Einstein  
License = Inbox --> Permission Set = Inbox with Einstein Activity Capture
License = Sales Cloud --> Permission Set = Standard Einstein Activity Capture
Any one idea, which License supports for my requirement ? and is this License free or Cost ?

3. Do you have any other Suggestions for Tasks Sync ?
Pls treat this is little bit urget...
Thanks
VRK

  • August 04, 2020
  • Like
  • 0
Hi all,
pls find my requirment below :

Required to  create http get from complex json  &   cast http response with apex.class of the json
if anyone have scenarios / code pls share

Thanks
VRK
 
  • July 09, 2020
  • Like
  • 0

Hi
How to Fetch only '"Contract Release' in below JSON Data :::

data->
        [{"Date_Reviewed":"1989-05-06","Date_Sent":"1989-05-05","editable":true,"Form":"Contract Revision 1","Id":"a0S3F000001bXAIUA2"},
        {"Date_Reviewed":"2019-02-01","Date_Sent":"2019-02-01","editable":true,"Form":"Contract Revision 2","Id":"a0S3F000001bXAJUA2"},
        {"Date_Reviewed":"2020-12-27","editable":true,"Form":"Contract Revision 3","Id":"a0S3F000001bXAKUA2"},
        {"Date_Reviewed":"2020-01-03","Date_Sent":"2020-01-03","editable":true,"Form":"Contract Release","Id":"a0S3F000001bXALUA2"},
        {"Date_Reviewed":"2020-12-29","editable":true,"Form":"Contract Revision 4","Id":"a0S3F000001bXAMUA2"},
        {"Date_Reviewed":"2020-12-30","editable":true,"Form":"Contract Revision 5","Id":"a0S3F000001bXANUA2"},
]        

My code :
saveDataTable :function(component, event) {
var data = component.get("v.data"); 
 var editedRecords1 =  component.find("riderStatusDataTable").get("v.draftValues");
for (var x in data)
            {
              var d = data[x];
 if(d.Form == "Contract Release" ){
  TemporaryArray1.Date_Sent__c = editedRecords1[0].Date_Sent;
           TemporaryArray1.Date_Reviewed__c = editedRecords1[0].Date_Reviewed;
break;
}
But , this is not Restrict for Contract Release ........its applied for all the Forms . I need this is for only 'Contract Release'...
can anyone help me...
Thanks
VRK
  • June 26, 2020
  • Like
  • 0