Skip to main content
Group

Salesforce Developer/ Admin/ Consultant

This group is for all Salesforce Developer/ Admin / Consultant

Hi Community,

I’m facing the following error:

Insufficient access rights on cross-reference id: XXXXX000000XXDp.

Could anyone guide me on possible reasons and solutions for this issue?

Thank you in advance!  

1 answer
0/9000

Hey everyone!

 

I've been on my Trailhead journey as an aspiring Salesforce admin for the past year. I'm thrilled to share that I've successfully completed both the admin Beginner and Intermediate trails. Now, I'm eager to take on new challenges and further develop my skills.

 

Could anyone recommend any projects or websites where I can find admin projects? I'm looking to enhance my abilities, gain a broader perspective, and make valuable additions to my resume.

 

Thank you all in advance!

0/9000

I have 25 active picklist values for status picklist field but Only 6 are visible .I have four record types and verified in those but could not find .Can someone help me with this 

1 answer
  1. Eric Praud (Activ8 Solar Energies) Forum Ambassador
    Jan 12, 2024, 9:54 AM

    Hi,

     

    Which object is that for?

    If case or leads, have you looked at the support or lead processes related to the record types? That's where the status values assigned to each RT are kept

0/9000
0/9000

Invitation to Participate in Salesforce Research!

 

Hello Salesforce Developer/ Admin/ Consultant, 

 

New to this group here. I am a Salesforce employee and my team manages the Salesforce Research Program which involves conducting user research to improve Salesforce products. 

 

We are currently interested in speaking with Salesforce Developers and Admins to better understand the details of their experience with our products. We invite you to participate in a 45-minute feedback session conducted remotely over Google Meet. This is not a sales call, this is strictly for research purposes only. If you are chosen to participate in the study, you will receive a $75 e-gift card as a small token of appreciation for your very valuable feedback and time. 

 

If you're interested in participating, please fill out this survey so that we may gather a few more details and ensure you are a proper fit. If you are selected, I will reach out to you shortly for scheduling.

  

Thank you,

Catherine Fontanilla

Research Operations Program Manager

0/9000
0/9000
0/9000

Hi,

I need to find which users are assigned to a custom permission. I found the knowledge article (in the link below) that says “To determine which users have access to a specific custom permission, use Apex and do something like the following: Boolean hasCustomPermission = FeatureManagement.checkPermission('your_custom_permission_api_name');”.

 

I’m still new to developing. What are the specific steps I need to take to “use Apex” in this case?

Custom Permissions

0/9000

Good day, can someone please assist with the following: 

 

It is code to Convert leads in our Org.

This is the error I get when trying to convert the lead:

 

Error: ConvertLead failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, There was an error converting the lead. Please resolve the following error and try again: LeadTrigger: execution of AfterUpdate caused by: System.DmlException: ConvertLead failed. First exception on row 0; first error: CANNOT_UPDATE_CONVERTED_LEAD, This lead was already converted to the contact [Lead name & Last name} on 3/30/2020.: [] Class.Convertlead.afterInsertAction: line 23, column 1 Class.Convertlead.afterUpdateAction: line 83, column 1 Class.Convertlead.afterUpdate: line 70, column 1 Trigger.LeadTrigger: line 8, column 1: []

 

Here is my code:

 

public class Convertlead{

    public  static void afterInsert(List<Lead> newListOfLead){

        afterInsertAction(newListOfLead);

    }

    

    private  static void afterInsertAction(List<Lead> newOfLead){

       Set<Id> convertedsetAccountId = new set<id>();

       set<id> convertedOpportunityId = new set<id>();

       String OppName;

       String companyName;

       list<opportunity> newListofOpp = new List<Opportunity>();

        for(Lead objLead: newOfLead){

            if(objLead.Status == 'Closed - Converted'){

                    Database.LeadConvert lc = new Database.LeadConvert();

                    lc.setLeadId(objLead.id);

                

                    LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true limit 1 ];

                    lc.setConvertedStatus(convertStatus.MasterLabel);

            

                    Database.LeadConvertResult lcr = Database.convertLead(lc);

                    System.assert(lcr.isSuccess());

                    convertedsetAccountId.add(lcr.getAccountId());

                    

                    companyName = objLead.Company;

                    OppName =  objLead.City + ' '+ objLead.State;

             

             }       

        }

         List<Account> updateLstOfAccount = new List<Account>();

        if(convertedsetAccountId.size() >0 ){

          

           list<Account> listOfAcc = [select id, Name,(select id from opportunities where AccountId in :convertedsetAccountId ) from Account where id in:  convertedsetAccountId limit 50000];

            for(Account objAcc :listOfAcc){

              

              Account obj = new Account();

              obj.Name = companyName; // 'Venue Lead' ;

              obj.Id = objAcc.id;

              updateLstOfAccount.add(obj);

              for(Opportunity opp : objAcc.opportunities){

                    Opportunity objOppo = new Opportunity();

                    objOppo.Name =  OppName ;

                    objOppo.id = opp.Id;

                    objOppo.StageName = 'Interested';

                    newListofOpp.add(objOppo);

               }

    

            }

        

        }

        try{

            if(updateLstOfAccount.size() > 0){

                update updateLstOfAccount;

            }

            

            if(newListofOpp.size() > 0){

                Update newListofOpp;

            }

        }Catch(Exception ex){

        

            System.debug('Exception ex'+ex.getMessage()+' Get line Number :'+ex.getlineNumber());

        }    

        

     }  

 

     public static void afterUpdate(Map<id,Lead> newMapOfLead, Map<id, Lead> oldMapOfLead){

            afterUpdateAction(newMapOfLead, oldMapOfLead);

      }

     

      private static void afterUpdateAction(Map<id,Lead> newMapOfLead, Map<id, Lead> oldMapOfLead){

           

           List<Lead> upDateLead = new List<Lead>();

            for(Lead ObjLead : newMapOfLead.values()){

                if(ObjLead.Status != oldMapOfLead.get(ObjLead.id).Status  && objLead.Status == 'Closed - Converted'){

                    upDateLead.add(ObjLead);

                }

            

            } 

            if(upDateLead.size() > 0){

                afterInsertAction(upDateLead);

            }   

        

     }

 

}

0/9000