+ Start a Discussion
NamanBNamanB 
Add Your Branding to Embedded Chat" Trailhead Challenge
I am trying to complete the challenge above posted here https://trailhead.salesforce.com/content/learn/modules/web-chat/web_chat_branding but have not been successful in loading the Chat Box when I open the VF page named "Web Chat" as stated in this challenge. Can someone please suggest why the chat pop up is not working? See the screenshot below. I have made sure that the agent is Active.


User-added image
 
Best Answer chosen by NamanB
ANUTEJANUTEJ (Salesforce Developers) 
Hi,

For all the Certification and Trailhead Guidance please report it here,

https://trailhead.salesforce.com/en/help?support=home

https://trailhead.salesforce.com/help

So that our trailhead support engineers will look into it and get back to you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Regards,
Salesforce Support.
Michael MMichael M 
Anyone know what the issue is? 

My VF page is displaying fine for me (admin), but other users are seeing this on the page display:


Object type not accessible. Please check permissions and make sure the object is not in development mode: No such column 'Referral_Name__c' on entity 'Eligibility__c'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.. Original queryString was: 'SELECT Created_Date_formula__c, (SELECT Address_Number_and_Street__c, Anniversary_Date__c, City__c, Client_ID__c, County_formula__c, CS_Code10__c, CS_Code11__c, CS_Code12__c, CS_Code13__c, CS_Code14__c, CS_Code15__c, CS_Code16__c, CS_Code17__c, CS_Code18__c, CS_Code19__c, CS_Code1__c, CS_Code20__c, CS_Code2__c, CS_Code3__c, CS_Code4__c, CS_Code5__c, CS_Code6__c, CS_Code7__c, CS_Code8__c, CS_Code9__c, CS_Description10__c, CS_Description11__c, CS_Description12__c, CS_Description13__c, CS_Description14__c, CS_Description15__c, CS_Description16__c, CS_Description17__c, CS_Description18__c, CS_Description19__c, CS_Description1__c, CS_Description20__c, CS_Description2__c, CS_Description3__c, CS_Description4__c, CS_Description5__c, CS_Description6__c, CS_Description7__c, CS_Description8__c, CS_Description9__c, Date_of_Birth__c, Date_of_Service__c, eMeds_error_message__c, Exception_Code1__c, Exception_Code2__c, Exception_Code3__c, Exception_Code4__c, Exception_Code5__c, Gender_Formula__c, Id, Medicare_Identifier__c, Name_formula__c, NAMI_Amount__c, NAMI_Effective_Date__c, Office__c, Other_Payer1_Name__c, Other_Payer2_Name__c, Other_Payer3_Name__c, Other_Payer_Name__c, Plan__c, Plan_Address_2__c, Plan_Address_City__c, Plan_Address_Number_and_Street__c, Plan_Address_State__c, Plan_Address_Zip_Code__c, Plan_Code__c, Plan_Date__c, Plan_Name__c, Plan_Phone_Number__c, Provider1__c, Provider2__c, Provider3__c, Provider4__c, Provider5__c, Recertification_Month__c, State__c, Third_Party1_Address_2__c, Third_Party1_Address_Number_and_Street__c, Third_Party1_benefit_id__c, Third_Party1_City__c, Third_Party1_Group_Number__c, Third_Party1_Phone__c, Third_Party1_Policy_Number__c, Third_Party1_State__c, Third_Party1_Zip_Code__c, Third_Party2_Address_2__c, Third_Party2_Address_Number_and_Street__c, Third_Party2_benefit_id__c, Third_Party2_City__c, Third_Party2_Group_Number__c, Third_Party2_Phone__c, Third_Party2_Policy_Number__c, Third_Party2_State__c, Third_Party2_Zip_Code__c, Third_Party3_Address_2__c, Third_Party3_Address_Number_and_Street__c, Third_Party3_benefit_id__c, Third_Party3_City__c, Third_Party3_Group_Number__c, Third_Party3_Phone__c, Third_Party3_Policy_Number__c, Third_Party3_State__c, Third_Party3_Zip_Code__c, Zip_Code__c FROM Eligibilities__r), Id, Patient_SSN__c FROM Lead WHERE id = '00Q63000007eJqq''


Here is the VF page:
<apex:page standardController="Lead"  lightningStylesheets="true">

    
    <apex:stylesheet value="{!$Resource.emedCss}"/>  
  
    
<!-- Header section --> 
    <div>
        <div style = "float: left"> {!lead.Created_Date_formula__c} </div>
        <div style = "float: right; font-size: 14px; position: relative; padding-right:30%;"> eMeds Eligibility Response Details - Salesforce </div>
    </div>
    <br/>
    <apex:image id="theImage" value="{!$Resource.eMedSymbol}" width="500" height="45"/>
 <h2>
     Eligibility Response Details 
    </h2> 
<apex:pageBlock mode="maindetail">
  <apex:repeat value="{!Lead.Eligibilities__r}" var="ci">  
      <!-- Error Message -->
    <apex:outputPanel rendered="{!IF(ci.eMeds_error_message__c ='' || ci.eMeds_error_message__c = null,false,true)}">
        <h2 style = "background-color: #faed27 ;">
          {!ci.emeds_error_message__c}
        </h2>
      </apex:outputPanel>     
  <!-- Missing Fields Information  
    <apex:outputPanel rendered="{!IF(  lead.medicaid_id__c = null && lead.patient_ssn__c = null,false,true)}">
        <h2 style = "background-color: #faed27 ;">
          Medicaid ID and SSN fields are both empty. Please fill in one of them to make the callout. 
        </h2>
      </apex:outputPanel>   -->        

<!-- Client Information -->
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Client_ID__c ='' ||  ci.Client_ID__c = null ,false,true)}">           
<div class= "containerOfContainer">
    <div class="container">
 <h3>
     Client Information:
 </h3>
<div class="floatLeft">
    
<table>
  <tr>
    <th>Client ID:</th>
    <td>{!ci.Client_ID__c}</td>
  </tr>
  <tr>
    <th>Gender:</th>
    <td>{!ci.Gender_Formula__c}</td>
  </tr>
  <tr>
    <th>Date of Birth:</th>
    <td>{!ci.Date_of_Birth__c}</td>
  </tr>
  <tr>
    <th>Anniversary Date:</th>
    <td>{!ci.Anniversary_Date__c}</td>
  </tr>
  <tr>
    <th>Recertification:</th>
    <td>{!ci.Recertification_Month__c}</td>
  </tr>
  <tr>
    <th>County:</th>
    <td>{!ci.County_formula__c}</td>
  </tr>
  <tr>
    <th>Date of Service:</th>
    <td>{!ci.Date_of_Service__c}</td>
  </tr>    
   <tr>
    <th></th>
    <td></td>
  </tr>  
</table>
    <br/>
</div>

<div class="floatRight">
<table>
  <tr>
    <th>Client Name:</th>
    <td>{!ci.Name_formula__c}</td>
  </tr>
  <tr>
    <th>SSN:</th>
    <td>{!lead.patient_ssn__c}</td>
  </tr>
  <tr>
    <th>Address:</th>
    <td>{!ci.Address_Number_and_Street__c}</td>
  </tr>
  <tr>
  <!--  <th>Address 2:</th>
    <td></td>
  </tr>
  <tr> --> 
    <th>City, State Zip:</th>
    <td>{!ci.City__c}, {!ci.State__c}  {!ci.Zip_Code__c}</td>
  </tr>
  <tr>
    <th>Office:</th>
    <td>{!ci.Office__c}</td>
  </tr>
  <tr>
    <th>Plan Date:</th>
    <td>{!ci.Plan_Date__c}</td>
  </tr>        
</table>
    <br/>
</div>
</div>
</div>
</apex:outputPanel>
    <br/>
<!-- Medicaid Eligibility Information-->   
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.CS_Code1__c ='' ||  ci.CS_Code1__c = null ,false,true)}">       
<div class= "containerOfContainer">
<div class="container">
   <h3>
     Medicaid Eligibility Information:
   </h3>            
   <h3 class="planName"> 
      {!ci.Plan__c}  
    </h3>
  <!-- NAMI -->
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.NAMI_Amount__c ='' ||  ci.NAMI_Amount__c = null ,false,true)}">        
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; {!ci.NAMI_Amount__c}
    <br/>
 &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {!ci.NAMI_Effective_Date__c}
    </apex:outputPanel>    
    <h4>
      Covered Services  
    </h4>
 <table  class="boxedInTable">
    <col style="width:15%"/>
    <col style="width:40%"/>  
     <tr>
     <th>Code</th>
     <th> Description</th>
     </tr>       
     <tr>
     <td>{!ci.CS_Code1__c}</td>
     <td>{!ci.CS_Description1__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code2__c}</td>
     <td>{!ci.CS_Description2__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code3__c}</td>
     <td>{!ci.CS_Description3__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code4__c}</td>
     <td>{!ci.CS_Description4__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code5__c}</td>
     <td>{!ci.CS_Description5__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code6__c}</td>
     <td>{!ci.CS_Description6__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code7__c}</td>
     <td>{!ci.CS_Description7__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code8__c}</td>
     <td>{!ci.CS_Description8__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code9__c}</td>
     <td>{!ci.CS_Description9__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code10__c}</td>
     <td>{!ci.CS_Description10__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code11__c}</td>
     <td>{!ci.CS_Description11__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code12__c}</td>
     <td>{!ci.CS_Description12__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code13__c}</td>
     <td>{!ci.CS_Description13__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code14__c}</td>
     <td>{!ci.CS_Description14__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code15__c}</td>
     <td>{!ci.CS_Description15__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code16__c}</td>
     <td>{!ci.CS_Description16__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code17__c}</td>
     <td>{!ci.CS_Description17__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code18__c}</td>
     <td>{!ci.CS_Description18__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code19__c}</td>
     <td>{!ci.CS_Description19__c}</td>
     </tr>
      <tr>
     <td>{!ci.CS_Code20__c}</td>
     <td>{!ci.CS_Description20__c}</td>
     </tr>     
 </table>
    <br/>
</div>
</div>   
    </apex:outputPanel>    
    <br/>
<!-- Medicaid Managed Care -->
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Plan_Name__c ='' ||  ci.Plan_Name__c = null ,false,true)}">           
<div class= "containerOfContainer">
<div class="container">
   <h3>
     Medicaid Managed Care:
   </h3> 
<table class="boxedInTable">
  <tr>
    <th>Plan name:</th>
    <td>{!ci.Plan_Name__c}</td>
  </tr>
  <tr>
    <th>Address:</th>
      <td>{!ci.Plan_Address_Number_and_Street__c} {!ci.Plan_Address_2__c}, {!ci.Plan_Address_City__c} {!ci.Plan_Address_State__c} {!ci.Plan_Address_Zip_Code__c}</td>
  </tr>
  <tr>
    <th>Phone:</th>
    <td>{!ci.Plan_Phone_Number__c}</td>
  </tr>
  <tr>
    <th>Plan Code:</th>
    <td>{!ci.Plan_Code__c}</td>
  </tr>
</table>  
    <br/>
</div>
</div> 
    </apex:outputPanel>
    <br/>
    
<!-- Medicaid Exceptions -->
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Exception_Code1__c ='' ||  ci.Exception_Code1__c = null ,false,true)}">               
<div class= "containerOfContainer">
<div class="container">
   <h3>
       Medicaid Exceptions:
   </h3> 
 <table  class="boxedInTable">
    <col style="width:30%"/>
    <col style="width:40%"/> 
     <tr>
     <th colspan="2">Exception Code</th>
     <th style="padding-right:10px;" colspan="3">Provider</th>
     </tr>       
     <tr>
     <td>{!ci.Exception_Code1__c}</td>
     <td>{!ci.Provider1__c}</td>
     </tr>
     <tr>
     <td>{!ci.Exception_Code2__c}</td>
     <td>{!ci.Provider2__c}</td>
     </tr>
     <tr>
     <td>{!ci.Exception_Code3__c}</td>
     <td>{!ci.Provider3__c}</td>
     </tr>
     <tr>
     <td>{!ci.Exception_Code4__c}</td>
     <td>{!ci.Provider4__c}</td>
     </tr>
     <tr>
     <td>{!ci.Exception_Code5__c}</td>
     <td>{!ci.Provider5__c}</td>
     </tr>     
  </table>    
    <br/>
</div>
</div>
    </apex:outputPanel>    
    <br/> 
<!-- Medicare Information--> 
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Medicare_Identifier__c ='' ||  ci.Medicare_Identifier__c = null ,false,true)}">                   
<div class= "containerOfContainer">
<div class="container">
   <h3>
     Medicare Information:
   </h3> 
<table style="padding-left: 3px;" class="boxedInTable">
  <tr>
    <th>Other Payer Name:</th>
    <td>{!ci.Other_Payer_Name__c}</td>
  </tr>
  <tr>
    <th>Medicare Identifier:</th>
      <td>{!ci.Medicare_Identifier__c}</td>
  </tr>
</table>  
    <br/>
</div>
</div> 
    </apex:outputPanel>    
 <br/>    

<!-- Third Party Insurance -->   
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Other_Payer1_Name__c ='' ||  ci.Other_Payer1_Name__c = null ,false,true)}">        
<div class= "containerOfContainer">
<div class="container">
   <h3>
     Third Party Insurance:
   </h3>        
<table style="padding-left: 3px;" class="boxedInTable">
  <tr>
    <th>Other Payer Name:</th>
    <td>{!ci.Other_Payer1_Name__c}</td>
  </tr>
  <tr>
    <th>Carrier Code:</th>
      <td>{!ci.Third_Party1_benefit_id__c}</td>
  </tr>
 <tr>
    <th>Other Payer Address:</th>
    <td>{!ci.Third_Party1_Address_Number_and_Street__c} {!ci.Third_Party1_Address_2__c}, {!ci.Third_Party1_City__c} {!ci.Third_Party1_State__c} {!ci.Third_Party1_Zip_Code__c} </td>
  </tr>
  <tr>
    <th>Phone Number:</th>
      <td>{!ci.Third_Party1_Phone__c}</td>
  </tr>
 <tr>
    <th>Policy Number:</th>
    <td>{!ci.Third_Party1_Policy_Number__c}</td>
  </tr>   
 <tr>
    <th>Group Number:</th>
    <td>{!ci.Third_Party1_Group_Number__c}</td>
  </tr>     
</table>  
     
 <br/>  
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Other_Payer2_Name__c ='' ||  ci.Other_Payer2_Name__c = null ,false,true)}">    
 <table style="padding-left: 3px;" class="boxedInTable">
  <tr>
    <th>Other Payer Name:</th>
    <td>{!ci.Other_Payer2_Name__c}</td>
  </tr>
  <tr>
    <th>Carrier Code:</th>
      <td>{!ci.Third_Party2_benefit_id__c}</td>
  </tr>
 <tr>
    <th>Other Payer Address:</th>
    <td>{!ci.Third_Party2_Address_Number_and_Street__c} {!ci.Third_Party2_Address_2__c}, {!ci.Third_Party2_City__c} {!ci.Third_Party2_State__c} {!ci.Third_Party2_Zip_Code__c} </td>
  </tr>
  <tr>
    <th>Phone Number:</th>
      <td>{!ci.Third_Party2_Phone__c}</td>
  </tr>
 <tr>
    <th>Policy Number:</th>
    <td>{!ci.Third_Party2_Policy_Number__c}</td>
  </tr>   
 <tr>
    <th>Group Number:</th>
    <td>{!ci.Third_Party2_Group_Number__c}</td>
  </tr>     
</table>        
 <br/>  
 </apex:outputPanel>    
 
<apex:outputPanel styleClass="boldHeader" rendered="{!IF(ci.Other_Payer3_Name__c ='' ||  ci.Other_Payer3_Name__c = null ,false,true)}">       
 <table style="padding-left: 3px;" class="boxedInTable">
  <tr>
    <th>Other Payer Name:</th>
    <td>{!ci.Other_Payer3_Name__c}</td>
  </tr>
  <tr>
    <th>Carrier Code:</th>
      <td>{!ci.Third_Party3_benefit_id__c}</td>
  </tr>
 <tr>
    <th>Other Payer Address:</th>
    <td>{!ci.Third_Party3_Address_Number_and_Street__c} {!ci.Third_Party3_Address_2__c}, {!ci.Third_Party3_City__c} {!ci.Third_Party3_State__c} {!ci.Third_Party3_Zip_Code__c} </td>
  </tr>
  <tr>
    <th>Phone Number:</th>
      <td>{!ci.Third_Party3_Phone__c}</td>
  </tr>
 <tr>
    <th>Policy Number:</th>
    <td>{!ci.Third_Party3_Policy_Number__c}</td>
  </tr>   
 <tr>
    <th>Group Number:</th>
    <td>{!ci.Third_Party3_Group_Number__c}</td>
  </tr>     
</table> 
    </apex:outputPanel>    
 </div>
</div>    
</apex:outputPanel>     
     </apex:repeat>     
    </apex:pageBlock> 

          
</apex:page>
Best Answer chosen by Michael M
Michael MMichael M
Ah- this is fixed. The problem was the Object's status is "in development" instead of "Deployed" Thank you!
Muthouazhagi DhanapalMuthouazhagi Dhanapal 

Hi ,

I am new to Salesforce development, and I am doing my first project on integrating Salesforce and external systems. My remote system will use the REST API to create/update/delete data in Salesforce. I read the following in the Salesforce document :

"Error handling—All the remote call-in methods, standard or custom APIs, require the remote system to handle any subsequent errors, such as timeouts and the management of retries. Middleware can be used to provide the logic for error handling and recovery.

• Recovery—A custom retry mechanism needs to be created if quality-of-service requirements dictate it. In this case, it’s important to ensure idempotent design characteristics. Platform event enables subscribers to use the replay ID to fetch messages within a certain time period after those messages were published."

Can anyone please tell me what kind of errors and recovery I will have to take care of in my remote system? Any links will be very helpful for me. I am not using any middleware, in what cases should I consider using a middleware. 

Best Answer chosen by Muthouazhagi Dhanapal
Abdul KhatriAbdul Khatri
Hi Muthouazhagi,

How your remote system is planning to use the Salesroce REST APIs to perform DML operations in Salesforce?

There are couple of tools can be used which has built in mehcanism for retry in case of any failures.
  • Mulesoft
  • Boomi
  • Microsoft Azure
If you are planning to custom create build something like .Net API, Nodejs etc. then I will think you need to possibly build something to capture those failures into some Database and build some kind of reprocessing to process those fail records.

Please keep in mind in that case I believe you need to keep in mind the API Request Limit (What is the Edition of your Production Org, Professional, Enterprise, Unlimited etc)

Another suggestion is to use Pubsub mechanism (recommended) using Platform Events. In that case you need to do the following
  • Create Platform Events with possible mode like create, update, delete etc. so you know the remote system subscript for what.
  • In this scenarion the remote system will subscribe and publish the event to get the payload so you can process on that payload
  • Even the above tool mentioned may have something for the same, you can take a look.
Trevor Smith 17Trevor Smith 17 
Hello everyone,

Simply put I want to update a record without having the update trigger fire. I have a callout running in a future method that updates the record. However, as you can see this is very problematic since I want it call my callout every time a record is updated but this would cause an infinite loop. Any ideas?
Best Answer chosen by Trevor Smith 17
RituSharmaRituSharma
If future method is updating the record then trigger will definitely fire. However, you may bypass the logic by checking if code is running in future context using System.isFuture() method.
Haseeb Ahmad 9Haseeb Ahmad 9 
Hi everyone,

I am trying to add showing in this screenshot but I am getting this  Error: Compiled formula is too big to execute (6,985 characters). Maximum size is 5,000 characters.

User-added image

Both of these fields which I am trying to add are also formula fields (number). 

Account_Impact_Score__c
Risk_Impact_Score__c

Is there a way to fix this issue? Thank you for your help.
Best Answer chosen by Haseeb Ahmad 9
Haseeb Ahmad 9Haseeb Ahmad 9
I am able to resolve by reducing the 2nd formula.
 
CASE(Status__c, 'Open',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Referenceability',5,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Will Not Resolve',
CASE(Risk_Impact__c,'Churn',25,'Client Health',10,'Contractual Erosion',20,'Payment Uncertainty',10,'Go Live Delayed',10,
'Will Not Go Live Phase 1',25,'Will Not Go Live Future Phase',20,'Scope',5,'Expansion',10,'Sales/Deal Blocker',10,0),
'Resolved',
CASE(Risk_Impact__c,'Churn',15,'Client Health',5,'Contractual Erosion',10,'Payment Uncertainty',5,'Go Live Delayed',5,
'Will Not Go Live Phase 1',10,'Will Not Go Live Future Phase',15,'Expansion',5,'Sales/Deal Blocker',5,0),0)
IF(ISPICKVAL( Workaround_exists__c, 'Yes'),0,10)
+
CASE( Is_workaround_acceptable__c, 'Yes - short term',5, 'No',10,0)

 
Kevin OcieKevin Ocie 
Dates for winter 21 for both sandbox and production
Best Answer chosen by Kevin Ocie
AbhishekAbhishek (Salesforce Developers) 
For the Winter '21 Release, we will upgrade the preview instances to Winter '21 on September 11 and September 12, 2020, and non-preview instances to Winter '21 on October 16 and October 17, 2020. Between now and September 11, 2020, we'll route all sandbox requests to preview instances.

For further reference you can check this too,

https://www.salesforce.com/blog/winter-21-sandbox-preview/#:~:text=For%20the%20Winter%20'21%20Release,16%20and%20October%2017%2C%202020.&text=Between%20now%20and%20September%2011,sandbox%20requests%20to%20preview%20instances.


Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Sunny SSunny S 
Hello friends, need suggestion please.
I have inherited a trigger written by my predecessor which is throwing exception error. Can someone help in getting this sorted? What is the reason of getting this error ?

****** Code Start ******
trigger OnAccountTrigger on Account (before update, before insert) {
    // Create the map to store mappings
    //Map<String, String> objParentAccountMapping = new Map<String, String>();
    // Create set to store ids
    Set<Id> arParentAccountIds = new Set<Id>();
    // get all the Ids for the accounts that are inserted in that execution context.
    for(Account objAccount : Trigger.New) {
        // Check if we have a person
        if ((objAccount.Person_Account_Parent__c != null) && (objAccount.IsPersonAccount)) {
            // Retrieve the related contact
            // Retrieve the parent account from objAccount.Person_Account_Parent__c
            // Update the local contact from the objAccount.PersonContactId of that retrieved parent
            arParentAccountIds.add(objAccount.Person_Account_Parent__c);
        }
    }
   
    // Store the map   
    Map<Id, Account> objAccountChildContact = new Map<Id, Account>([select Id, PersonContactId from Account WHERE Id IN : arParentAccountIds]);
   
    System.debug('Map');
    System.debug(objAccountChildContact);

    // get all the Ids for the accounts that are inserted in that execution context.
    for(Account objAccount : Trigger.New) {
        // Check if we have a person
        if ((objAccount.Person_Account_Parent__c != null)) {
            // Retrieve the related contact
            // Retrieve the parent account from objAccount.Person_Account_Parent__c
            // Update the local contact from the objAccount.PersonContactId of that retrieved parent

            // Set the contact
           /*below in red is line 32*/
 objAccount.Parent__pc = objAccountChildContact.get(objAccount.Person_Account_Parent__c).PersonContactId; 
            System.debug('Updating contact parent for [' + objAccount.Id + '] to [' + objAccount.Parent__pc +']');
           
        }
    }
}


Error Message:
Apex script unhandled trigger exception by user/organization:
OnAccountTrigger: execution of BeforeUpdate

caused by: System.NullPointerException: Attempt to de-reference a null object

Trigger.OnAccountTrigger: line 32, column 1

***** Code End *****

Thanks in advance !


 
Best Answer chosen by Sunny S
Abdul KhatriAbdul Khatri
Hi Sunny

I made few changes to handle null exceptions. I hope it will help
 
trigger OnAccountTrigger on Account (before update, before insert) {
    // Create the map to store mappings
    //Map<String, String> objParentAccountMapping = new Map<String, String>();
    // Create set to store ids
    Set<Id> arParentAccountIds = new Set<Id>();
    // get all the Ids for the accounts that are inserted in that execution context.
    for(Account objAccount : Trigger.New) {
        // Check if we have a person
        if ((objAccount.Person_Account_Parent__c != null) && (objAccount.IsPersonAccount)) {
            // Retrieve the related contact
            // Retrieve the parent account from objAccount.Person_Account_Parent__c
            // Update the local contact from the objAccount.PersonContactId of that retrieved parent
            arParentAccountIds.add(objAccount.Person_Account_Parent__c);
        }
    }
    
    if(arParentAccountIds.isEmpty()) return;
   
    // Store the map   
    Map<Id, Account> objAccountChildContact = new Map<Id, Account>([select Id, PersonContactId from Account WHERE Id IN : arParentAccountIds]);
   
    if(objAccountChildContact.isEmpty()) return;
    
    System.debug('Map');
    System.debug(objAccountChildContact);

    // get all the Ids for the accounts that are inserted in that execution context.
    for(Account objAccount : Trigger.New) {
        // Check if we have a person
        if ((objAccount.Person_Account_Parent__c != null)) {
            // Retrieve the related contact
            // Retrieve the parent account from objAccount.Person_Account_Parent__c
            // Update the local contact from the objAccount.PersonContactId of that retrieved parent

            // Set the contact
           /*below in red is line 32*/
            if(objAccountChildContact.get(objAccount.Person_Account_Parent__c) != null) {
            	objAccount.Parent__pc = objAccountChildContact.get(objAccount.Person_Account_Parent__c).PersonContactId; 
            	System.debug('Updating contact parent for [' + objAccount.Id + '] to [' + objAccount.Parent__pc +']');
            }
           
        }
    }
}

 
Atheer BdaiwiAtheer Bdaiwi 
Hello,

We have a user that can't see a VF component for LinkedIn Sales Navigator (managed package).

All they see is the below:

User-added image

But, they need to have the below view:

User-added image
This is a VF component.

I have checked:

- Page Layout
- Profile
- LWC visibility 
- License (they have one)

Any ideas at all?
Best Answer chosen by Atheer Bdaiwi
Atheer BdaiwiAtheer Bdaiwi
User-added image

Answer above from LinkedIn support. 
AndrewNerneyAndrewNerney 
We have a Lightning Component that we are using in a Community. It was working fine until a couple days ago. It has stopped displaying information, and I can't figure out what change we may have made to cause this. When viewing the Community as a System Administrator, everything works as expected. When viewing the Community as one of the regular users, we get the following info in the Debug Logs. Any help here?

50.0 APEX_CODE,FINEST;APEX_PROFILING,FINEST;CALLOUT,FINEST;DB,FINEST;NBA,FINE;SYSTEM,FINE;VALIDATION,INFO;VISUALFORCE,FINER;WAVE,FINEST;WORKFLOW,FINER
16:20:00.0 (349485)|USER_INFO|[EXTERNAL]|00555000006MRYn|implementations+harsha@zpaper.com|(GMT-04:00) Eastern Daylight Time (America/New_York)|GMT-04:00
16:20:00.0 (384180)|EXECUTION_STARTED
16:20:00.0 (390248)|CODE_UNIT_STARTED|[EXTERNAL]|apex://CommunityCaseDisplayController/ACTION$getCaseComments
16:20:00.0 (3067989)|CODE_UNIT_FINISHED|apex://CommunityCaseDisplayController/ACTION$getCaseComments
16:20:00.0 (3084168)|EXECUTION_FINISHED
16:20:00.4 (4133397)|CUMULATIVE_PROFILING_BEGIN
16:20:00.4 (4133397)|CUMULATIVE_PROFILING|No profiling information for SOQL operations
16:20:00.4 (4133397)|CUMULATIVE_PROFILING|No profiling information for SOSL operations
16:20:00.4 (4133397)|CUMULATIVE_PROFILING|No profiling information for DML operations
16:20:00.4 (4133397)|CUMULATIVE_PROFILING|No profiling information for method invocations
16:20:00.4 (4133397)|CUMULATIVE_PROFILING_END
Best Answer chosen by AndrewNerney
AndrewNerneyAndrewNerney
And I found the problem. Someone had removed access to the controller CommunityCaseDisplayController from several of the user profiles.

I wonder if I can choose my own response as Best Answer? Bahahahaha.
Lena HubbardLena Hubbard 
The Winter '21 Release introduced the ability to create a Record Triggered Flow who's Trigger is "A Record is Deleted" and it should Run Flow "Before the Record is deleted".

I am trying to implement a change that fires when an Opportunity Product is deleted.  To start with, i created the flow with the delete trigger, and then all it is supposed to do is email me when the Trigger is hit.

It never fires on Opportunity Product deletions.  

I tested it on Oppoturnities, and I get emails any time an Opp is deleted.  So clearly this works on some objects, but i can not find any documentation or support on if this has restrictions regarding what it works for, or why it doesn't work on Opp Products being deleted.  

Any ideas? Thanks!
Best Answer chosen by Lena Hubbard
RituSharmaRituSharma
It seems that it does not work(may be a bug) with opportunity line item, campaign members and may be some other objects too.Open below provided UL and refer the recent 2 comments:

https://trailblazer.salesforce.com/ideaView?id=08730000000DlPBAA0

Raise this issue to SF.