• Jessica Clark 12
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 14
    Replies
Hi everyone,

As I'm sure you have all experienced before, I somehow am not getting the 75% code coverage necessary for deployment. I want to first point out that this controller is already deployed with adequate coverage but for some reason when I wanted to make one small edit in our test environment, it came back with a 6X% code coverage. So I could not deploy it. I have gotten it up to 72% upon deployment, but I have covered all the code (well, 95% of it) in the developer console seemlessly. Someone please give me direction. I have spent way too much time on this.

95% code coverage in dev console:
code coverage in dev console 95%

Errors in first function
errors

Errors in second function
errors

Controller (omitted functions that do not have errors):
public class bAgentListController{ 
  ...
  @AuraEnabled
    //UPDATE OPPORTUNITY
    public static string updateOpportunity(string oppId, string refSource, string agentSource, string refContact, string bCHLBool, string priceRange, string areaInterest, string agentNotes, string description, string mortNotes, string propAddr, string mortStatus, string mortType, string preQualBool, string preQual, string sendCU, string reasonNoCU, string buyOrSell, string updateBoth, string otherOppId, string agentId ){
        try{
            Id RTID_Referred = RecordTypeManager.RecordTypeFor('Opportunity', 'Referred');
            
            boolean sendCuBool = false;
            if (sendCU == 'true'){
                sendCuBool = true;
            }
            
            boolean updateBothBool = false;
            if (updateBoth == 'true'){
                updateBothBool = true;
            }
            
            boolean bCHLPass = false;
            if (bCHLBool == 'true'){
                bCHLPass = true;
            }
            
            double preQualAmount = 0;
            if (preQual != ''){
                preQualAmount = double.valueOf(preQual);
            }
            
            //UPDATE OPPORTUNITY
            Opportunity newOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:oppId LIMIT 1];
                        
            newOpp.Referral_Source__c = refSource;
            newOpp.Agent_Source__c = agentSource;
            newOpp.Referring_Contact__c = refContact;
            newOpp.BryteCoreHotLead__c = bCHLPass;
            newOpp.RecordTypeId = RTID_Referred;
            newOpp.Phase__c = 'Scrubbed';
            
            //AVOID EMPTY PICKLISTS/STRINGS 
            if(priceRange != ''){newOpp.Price_Range__c = priceRange;}
            if(areaInterest != ''){newOpp.Areas_of_Interest_city_state__c = areaInterest;}
            if(agentNotes != ''){newOpp.Notes_for_Agent__c = agentNotes;}
            if(description != ''){newOpp.Description = description;}
            if(mortNotes != ''){newOpp.Mortgage_Notes__c = mortNotes;}
            if(propAddr != ''){newOpp.Closing_Address__c = propAddr;}
            if(mortStatus != ''){newOpp.Mortgage_Status__c = mortStatus;}
            if(mortType != ''){newOpp.Type_of_Mortgage__c = mortType;}
            if(preQual != ''){newOpp.Pre_Qualified_Amount__c = preQualAmount;}
            newOpp.Send_To_CU__c = sendCuBool;
            if(reasonNoCU != ''){newOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
            
            if(buyOrSell == 'Buy'){newOpp.Pre_Qualified__c = preQualBool;}
            else{newOpp.Pre_Qualified__c = 'No';}
            
            update newOpp;
            
            if (updateBothBool){
                Opportunity otherOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:otherOppId LIMIT 1];
            	otherOpp.Referral_Source__c = refSource;
                otherOpp.Agent_Source__c = agentSource;
                otherOpp.Referring_Contact__c = refContact;
                otherOpp.BryteCoreHotLead__c = bCHLPass;
                otherOpp.RecordTypeId = RTID_Referred;
                otherOpp.Phase__c = 'Scrubbed';
                
                //AVOID EMPTY PICKLISTS/STRINGS  
                if(priceRange != ''){otherOpp.Price_Range__c = priceRange;}
                if(areaInterest != ''){otherOpp.Areas_of_Interest_city_state__c = areaInterest;}
                if(agentNotes != ''){otherOpp.Notes_for_Agent__c = agentNotes;}
                if(description != ''){otherOpp.Description = description;}
                if(mortNotes != ''){otherOpp.Mortgage_Notes__c = mortNotes;}
                if(propAddr != ''){otherOpp.Closing_Address__c = propAddr;}
                if(mortStatus != ''){otherOpp.Mortgage_Status__c = mortStatus;}
                if(mortType != ''){otherOpp.Type_of_Mortgage__c = mortType;}
                if(preQual != ''){otherOpp.Pre_Qualified_Amount__c = preQualAmount;}
                if(reasonNoCU != ''){otherOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
                //else{newOpp.Reason_not_sent_to_CU__c = 'CU Realty was unable to connect with member';}
                
                if(buyOrSell == 'Sell'){otherOpp.Pre_Qualified__c = preQualBool;}
                else{otherOpp.Pre_Qualified__c = 'No';}
                otherOpp.Send_To_CU__c = sendCuBool;
                
                update otherOpp;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }
        
    }
    
  @AuraEnabled
    //INSERT RELATED CONTACT
    public static string insertRelatedContact(string oppId, string agentId, string updateBoth, string otherOppId ){
        try{
            //INSERT RELATED CONTACT
            Related_Contact__c rc = new Related_Contact__c();
            rc.OpportunityId__c = oppId;
            rc.ContactId__c = agentId;
            rc.Role__c = 'Assigned Agent';
            
            insert rc;
            
            if (updateBoth == 'true'){
                //INSERT RELATED CONTACT
                Related_Contact__c rcOther = new Related_Contact__c();
                rcOther.OpportunityId__c = otherOppId;
                rcOther.ContactId__c = agentId;
                rcOther.Role__c = 'Assigned Agent';
                
                insert rcOther;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }

    }
  
}

Test controller:
@isTest(seeAlldata = true)
public class bAgentListControllerTest {
    static testMethod void agentTest1(){

        ... (omitting set up)

        string refSource = 'Member Services';
        string agentSource = 'Member Referral';
        string refContact = '0038000002IcVYpAAN';//jessica clark
        string bCHLBool = 'true';
        string priceRange = 'Test';
        string areaInterest = 'Test';
        string agentNotes = 'Test';
        string description = 'Test';
        string mortNotes = 'Need new Home';
        string propAddr = 'Test123 City, ST 00000';
        string mortStatus = 'In Process';
        string mortType = 'Conventional';
        string preQualBool = 'Yes';
        string preQual = '100000';
        string sendCU ='true';
        string reasonNoCU = ''; 
        string buyOrSell= 'Sell';     
        string buyOrSell2= 'Buy'; 
        string updateBoth = 'true';
        string updateBoth2 = 'false';

        ... (omitting function calls without error)

        bAgentListController.updateOpportunity(o.Id, refSource, agentSource, refContact, bCHLBool, priceRange, areaInterest, agentNotes, description, mortNotes, propAddr, mortStatus, mortType, preQualBool, preQual, sendCU, reasonNoCU, buyOrSell, 'true', o3.Id, c2.Id);

    	bAgentListController.insertRelatedContact(o.Id, c2.Id, updateBoth, o3.Id);

Maybe this isn't enough information. If not, let me know and I will provide. Thanks!

Jessica
Hi there!

Many times throughout the day, salesforce (lightning) wants to open something in a new tab, when in fact it should just reveal the information within the tab that's already open. For example...

1. I am in fields and relationship for our contact object.
Image of contact table
2. I want to click on "accountname" field to view details.
User-added image
3. It asks me to open it in a new tab
Asks to open in new tab
4. Content in my new tab is information that should be in the same tab as the Contact table
contact in new tab

How do I / Can I stop it from doing this? By the end of the day I have too many tabs open just to complete a simple task. This happens all over salesforce and is poor interface. Hopefully it is avoidable...?

Thanks in advance,
Jessica
Take a look...
User-added image
I just deployed bAgentSelection today, but it is unavailable via every outlet I try. It says it is not installed although it is deployed. What do I need to do to get it "installed"
I am creating a test class, and everything is running cleanly except one if statement. Although I am passing the correct string as an argument for the method, it is not recognizing it in the comparison statement. Below image is the code coverage, skipping if updateBoth == 'true'.Code Coverage skipping if statement

Test call: (note: I define o3, o, and c2 elsewhere; those are not an issue)
string refSource = 'Member Services';
        string agentSource = 'Member Referral';
            string refContact = '0030R00000SCIl3QAH';//jessica testclark
            string bCHLBool = 'true';
            string priceRange = 'Test';
            string areaInterest = 'Test';
            string agentNotes = 'Test';
            string description = 'Test';
            string mortNotes = 'Need new Home';
            string propAddr = 'Test123 City, ST 00000';
            string mortStatus = 'In Process';
            string mortType = 'Conventional';
            string preQualBool = 'Yes';
            string preQual = '100000';
            string sendCU ='true';
            string reasonNoCU = ''; 
            string buyOrSell= 'Buy';     
        	string buyOrSell2= 'Sell'; 
            string updateBoth = 'true';
        	string updateBoth2 = 'false';
 
bAgentListController.updateOpportunity(o3.Id, refSource, agentSource, refContact, bCHLBool, priceRange, areaInterest, agentNotes, description, mortNotes, propAddr, mortStatus, mortType, preQualBool, preQual, sendCU, reasonNoCU, buyOrSell, 'true', o.Id, c2.Id);



Controller method:
@AuraEnabled
    //UPDATE OPPORTUNITY
    public static string updateOpportunity(string oppId, string refSource, string agentSource, string refContact, string bCHLBool, string priceRange, string areaInterest, string agentNotes, string description, string mortNotes, string propAddr, string mortStatus, string mortType, string preQualBool, string preQual, string sendCU, string reasonNoCU, string buyOrSell, string updateBoth, string otherOppId, string agentId ){
        try{
            Id RTID_Referred = RecordTypeManager.RecordTypeFor('Opportunity', 'Referred');
            
            boolean sendCuBool = false;
            if (sendCU == 'true'){
                sendCuBool = true;
            }
            
            boolean bCHLPass = false;
            if (bCHLBool == 'true'){
                bCHLPass = true;
            }
            
            double preQualAmount = 0;
            if (preQual != ''){
                preQualAmount = double.valueOf(preQual);
            }
            
            //UPDATE OPPORTUNITY
            Opportunity newOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:oppId LIMIT 1];
                        
            newOpp.Referral_Source__c = refSource;
            newOpp.Agent_Source__c = agentSource;
            newOpp.Referring_Contact__c = refContact;
            newOpp.BryteCoreHotLead__c = bCHLPass;
            newOpp.RecordTypeId = RTID_Referred;
            newOpp.Phase__c = 'Scrubbed';
            
            //AVOID EMPTY PICKLISTS/STRINGS 
            if(priceRange != ''){newOpp.Price_Range__c = priceRange;}
            if(areaInterest != ''){newOpp.Areas_of_Interest_city_state__c = areaInterest;}
            if(agentNotes != ''){newOpp.Notes_for_Agent__c = agentNotes;}
            if(description != ''){newOpp.Description = description;}
            if(mortNotes != ''){newOpp.Mortgage_Notes__c = mortNotes;}
            if(propAddr != ''){newOpp.Closing_Address__c = propAddr;}
            if(mortStatus != ''){newOpp.Mortgage_Status__c = mortStatus;}
            if(mortType != ''){newOpp.Type_of_Mortgage__c = mortType;}
            if(preQual != ''){newOpp.Pre_Qualified_Amount__c = preQualAmount;}
            newOpp.Send_To_CU__c = sendCuBool;
            if(reasonNoCU != ''){newOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
            
            if(buyOrSell == 'Buy'){newOpp.Pre_Qualified__c = preQualBool;}
            else{newOpp.Pre_Qualified__c = 'No';}
            
            update newOpp;
            
            if (updateBoth == 'true'){
                Opportunity otherOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:otherOppId LIMIT 1];
            	otherOpp.Referral_Source__c = refSource;
                otherOpp.Agent_Source__c = agentSource;
                otherOpp.Referring_Contact__c = refContact;
                otherOpp.BryteCoreHotLead__c = bCHLPass;
                otherOpp.RecordTypeId = RTID_Referred;
                otherOpp.Phase__c = 'Scrubbed';
                
                //AVOID EMPTY PICKLISTS/STRINGS 
                if(priceRange != ''){otherOpp.Price_Range__c = priceRange;}
                if(areaInterest != ''){otherOpp.Areas_of_Interest_city_state__c = areaInterest;}
                if(agentNotes != ''){otherOpp.Notes_for_Agent__c = agentNotes;}
                if(description != ''){otherOpp.Description = description;}
                if(mortNotes != ''){otherOpp.Mortgage_Notes__c = mortNotes;}
                if(propAddr != ''){otherOpp.Closing_Address__c = propAddr;}
                if(mortStatus != ''){otherOpp.Mortgage_Status__c = mortStatus;}
                if(mortType != ''){otherOpp.Type_of_Mortgage__c = mortType;}
                if(preQual != ''){otherOpp.Pre_Qualified_Amount__c = preQualAmount;}
                if(reasonNoCU != ''){otherOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
                //else{newOpp.Reason_not_sent_to_CU__c = 'CU Realty was unable to connect with member';}
                
                if(buyOrSell == 'Sell'){newOpp.Pre_Qualified__c = preQualBool;}
                else{newOpp.Pre_Qualified__c = 'No';}
                otherOpp.Send_To_CU__c = sendCuBool;
                
                update otherOpp;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }
    }

 
Having one heck of a time trying to figure out why this isn't working. The array I have returns null, which I find really strange. Additionally, the related contact is not being created, but everywhere I look for information shows this as the correct way to insert a record. Am I missing something? Thanks in advance!
@AuraEnabled
    public static string[] insertRelatedContact(string oppId, string agentId ){
        string[] infoArray = new string[] {oppId,agentId};
            
        //INSERT RELATED CONTACT
        Related_Contact__c rc = new Related_Contact__c();
        rc.OpportunityId__c = oppId;
        rc.ContactId__c = agentId;
        rc.Role__c = 'Assigned Agent';
        
        insert rc;
        
        return infoArray;
    }

 
Hi everyone,

As I'm sure you have all experienced before, I somehow am not getting the 75% code coverage necessary for deployment. I want to first point out that this controller is already deployed with adequate coverage but for some reason when I wanted to make one small edit in our test environment, it came back with a 6X% code coverage. So I could not deploy it. I have gotten it up to 72% upon deployment, but I have covered all the code (well, 95% of it) in the developer console seemlessly. Someone please give me direction. I have spent way too much time on this.

95% code coverage in dev console:
code coverage in dev console 95%

Errors in first function
errors

Errors in second function
errors

Controller (omitted functions that do not have errors):
public class bAgentListController{ 
  ...
  @AuraEnabled
    //UPDATE OPPORTUNITY
    public static string updateOpportunity(string oppId, string refSource, string agentSource, string refContact, string bCHLBool, string priceRange, string areaInterest, string agentNotes, string description, string mortNotes, string propAddr, string mortStatus, string mortType, string preQualBool, string preQual, string sendCU, string reasonNoCU, string buyOrSell, string updateBoth, string otherOppId, string agentId ){
        try{
            Id RTID_Referred = RecordTypeManager.RecordTypeFor('Opportunity', 'Referred');
            
            boolean sendCuBool = false;
            if (sendCU == 'true'){
                sendCuBool = true;
            }
            
            boolean updateBothBool = false;
            if (updateBoth == 'true'){
                updateBothBool = true;
            }
            
            boolean bCHLPass = false;
            if (bCHLBool == 'true'){
                bCHLPass = true;
            }
            
            double preQualAmount = 0;
            if (preQual != ''){
                preQualAmount = double.valueOf(preQual);
            }
            
            //UPDATE OPPORTUNITY
            Opportunity newOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:oppId LIMIT 1];
                        
            newOpp.Referral_Source__c = refSource;
            newOpp.Agent_Source__c = agentSource;
            newOpp.Referring_Contact__c = refContact;
            newOpp.BryteCoreHotLead__c = bCHLPass;
            newOpp.RecordTypeId = RTID_Referred;
            newOpp.Phase__c = 'Scrubbed';
            
            //AVOID EMPTY PICKLISTS/STRINGS 
            if(priceRange != ''){newOpp.Price_Range__c = priceRange;}
            if(areaInterest != ''){newOpp.Areas_of_Interest_city_state__c = areaInterest;}
            if(agentNotes != ''){newOpp.Notes_for_Agent__c = agentNotes;}
            if(description != ''){newOpp.Description = description;}
            if(mortNotes != ''){newOpp.Mortgage_Notes__c = mortNotes;}
            if(propAddr != ''){newOpp.Closing_Address__c = propAddr;}
            if(mortStatus != ''){newOpp.Mortgage_Status__c = mortStatus;}
            if(mortType != ''){newOpp.Type_of_Mortgage__c = mortType;}
            if(preQual != ''){newOpp.Pre_Qualified_Amount__c = preQualAmount;}
            newOpp.Send_To_CU__c = sendCuBool;
            if(reasonNoCU != ''){newOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
            
            if(buyOrSell == 'Buy'){newOpp.Pre_Qualified__c = preQualBool;}
            else{newOpp.Pre_Qualified__c = 'No';}
            
            update newOpp;
            
            if (updateBothBool){
                Opportunity otherOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:otherOppId LIMIT 1];
            	otherOpp.Referral_Source__c = refSource;
                otherOpp.Agent_Source__c = agentSource;
                otherOpp.Referring_Contact__c = refContact;
                otherOpp.BryteCoreHotLead__c = bCHLPass;
                otherOpp.RecordTypeId = RTID_Referred;
                otherOpp.Phase__c = 'Scrubbed';
                
                //AVOID EMPTY PICKLISTS/STRINGS  
                if(priceRange != ''){otherOpp.Price_Range__c = priceRange;}
                if(areaInterest != ''){otherOpp.Areas_of_Interest_city_state__c = areaInterest;}
                if(agentNotes != ''){otherOpp.Notes_for_Agent__c = agentNotes;}
                if(description != ''){otherOpp.Description = description;}
                if(mortNotes != ''){otherOpp.Mortgage_Notes__c = mortNotes;}
                if(propAddr != ''){otherOpp.Closing_Address__c = propAddr;}
                if(mortStatus != ''){otherOpp.Mortgage_Status__c = mortStatus;}
                if(mortType != ''){otherOpp.Type_of_Mortgage__c = mortType;}
                if(preQual != ''){otherOpp.Pre_Qualified_Amount__c = preQualAmount;}
                if(reasonNoCU != ''){otherOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
                //else{newOpp.Reason_not_sent_to_CU__c = 'CU Realty was unable to connect with member';}
                
                if(buyOrSell == 'Sell'){otherOpp.Pre_Qualified__c = preQualBool;}
                else{otherOpp.Pre_Qualified__c = 'No';}
                otherOpp.Send_To_CU__c = sendCuBool;
                
                update otherOpp;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }
        
    }
    
  @AuraEnabled
    //INSERT RELATED CONTACT
    public static string insertRelatedContact(string oppId, string agentId, string updateBoth, string otherOppId ){
        try{
            //INSERT RELATED CONTACT
            Related_Contact__c rc = new Related_Contact__c();
            rc.OpportunityId__c = oppId;
            rc.ContactId__c = agentId;
            rc.Role__c = 'Assigned Agent';
            
            insert rc;
            
            if (updateBoth == 'true'){
                //INSERT RELATED CONTACT
                Related_Contact__c rcOther = new Related_Contact__c();
                rcOther.OpportunityId__c = otherOppId;
                rcOther.ContactId__c = agentId;
                rcOther.Role__c = 'Assigned Agent';
                
                insert rcOther;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }

    }
  
}

Test controller:
@isTest(seeAlldata = true)
public class bAgentListControllerTest {
    static testMethod void agentTest1(){

        ... (omitting set up)

        string refSource = 'Member Services';
        string agentSource = 'Member Referral';
        string refContact = '0038000002IcVYpAAN';//jessica clark
        string bCHLBool = 'true';
        string priceRange = 'Test';
        string areaInterest = 'Test';
        string agentNotes = 'Test';
        string description = 'Test';
        string mortNotes = 'Need new Home';
        string propAddr = 'Test123 City, ST 00000';
        string mortStatus = 'In Process';
        string mortType = 'Conventional';
        string preQualBool = 'Yes';
        string preQual = '100000';
        string sendCU ='true';
        string reasonNoCU = ''; 
        string buyOrSell= 'Sell';     
        string buyOrSell2= 'Buy'; 
        string updateBoth = 'true';
        string updateBoth2 = 'false';

        ... (omitting function calls without error)

        bAgentListController.updateOpportunity(o.Id, refSource, agentSource, refContact, bCHLBool, priceRange, areaInterest, agentNotes, description, mortNotes, propAddr, mortStatus, mortType, preQualBool, preQual, sendCU, reasonNoCU, buyOrSell, 'true', o3.Id, c2.Id);

    	bAgentListController.insertRelatedContact(o.Id, c2.Id, updateBoth, o3.Id);

Maybe this isn't enough information. If not, let me know and I will provide. Thanks!

Jessica
Hi there!

Many times throughout the day, salesforce (lightning) wants to open something in a new tab, when in fact it should just reveal the information within the tab that's already open. For example...

1. I am in fields and relationship for our contact object.
Image of contact table
2. I want to click on "accountname" field to view details.
User-added image
3. It asks me to open it in a new tab
Asks to open in new tab
4. Content in my new tab is information that should be in the same tab as the Contact table
contact in new tab

How do I / Can I stop it from doing this? By the end of the day I have too many tabs open just to complete a simple task. This happens all over salesforce and is poor interface. Hopefully it is avoidable...?

Thanks in advance,
Jessica
Take a look...
User-added image
I just deployed bAgentSelection today, but it is unavailable via every outlet I try. It says it is not installed although it is deployed. What do I need to do to get it "installed"
I am creating a test class, and everything is running cleanly except one if statement. Although I am passing the correct string as an argument for the method, it is not recognizing it in the comparison statement. Below image is the code coverage, skipping if updateBoth == 'true'.Code Coverage skipping if statement

Test call: (note: I define o3, o, and c2 elsewhere; those are not an issue)
string refSource = 'Member Services';
        string agentSource = 'Member Referral';
            string refContact = '0030R00000SCIl3QAH';//jessica testclark
            string bCHLBool = 'true';
            string priceRange = 'Test';
            string areaInterest = 'Test';
            string agentNotes = 'Test';
            string description = 'Test';
            string mortNotes = 'Need new Home';
            string propAddr = 'Test123 City, ST 00000';
            string mortStatus = 'In Process';
            string mortType = 'Conventional';
            string preQualBool = 'Yes';
            string preQual = '100000';
            string sendCU ='true';
            string reasonNoCU = ''; 
            string buyOrSell= 'Buy';     
        	string buyOrSell2= 'Sell'; 
            string updateBoth = 'true';
        	string updateBoth2 = 'false';
 
bAgentListController.updateOpportunity(o3.Id, refSource, agentSource, refContact, bCHLBool, priceRange, areaInterest, agentNotes, description, mortNotes, propAddr, mortStatus, mortType, preQualBool, preQual, sendCU, reasonNoCU, buyOrSell, 'true', o.Id, c2.Id);



Controller method:
@AuraEnabled
    //UPDATE OPPORTUNITY
    public static string updateOpportunity(string oppId, string refSource, string agentSource, string refContact, string bCHLBool, string priceRange, string areaInterest, string agentNotes, string description, string mortNotes, string propAddr, string mortStatus, string mortType, string preQualBool, string preQual, string sendCU, string reasonNoCU, string buyOrSell, string updateBoth, string otherOppId, string agentId ){
        try{
            Id RTID_Referred = RecordTypeManager.RecordTypeFor('Opportunity', 'Referred');
            
            boolean sendCuBool = false;
            if (sendCU == 'true'){
                sendCuBool = true;
            }
            
            boolean bCHLPass = false;
            if (bCHLBool == 'true'){
                bCHLPass = true;
            }
            
            double preQualAmount = 0;
            if (preQual != ''){
                preQualAmount = double.valueOf(preQual);
            }
            
            //UPDATE OPPORTUNITY
            Opportunity newOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:oppId LIMIT 1];
                        
            newOpp.Referral_Source__c = refSource;
            newOpp.Agent_Source__c = agentSource;
            newOpp.Referring_Contact__c = refContact;
            newOpp.BryteCoreHotLead__c = bCHLPass;
            newOpp.RecordTypeId = RTID_Referred;
            newOpp.Phase__c = 'Scrubbed';
            
            //AVOID EMPTY PICKLISTS/STRINGS 
            if(priceRange != ''){newOpp.Price_Range__c = priceRange;}
            if(areaInterest != ''){newOpp.Areas_of_Interest_city_state__c = areaInterest;}
            if(agentNotes != ''){newOpp.Notes_for_Agent__c = agentNotes;}
            if(description != ''){newOpp.Description = description;}
            if(mortNotes != ''){newOpp.Mortgage_Notes__c = mortNotes;}
            if(propAddr != ''){newOpp.Closing_Address__c = propAddr;}
            if(mortStatus != ''){newOpp.Mortgage_Status__c = mortStatus;}
            if(mortType != ''){newOpp.Type_of_Mortgage__c = mortType;}
            if(preQual != ''){newOpp.Pre_Qualified_Amount__c = preQualAmount;}
            newOpp.Send_To_CU__c = sendCuBool;
            if(reasonNoCU != ''){newOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
            
            if(buyOrSell == 'Buy'){newOpp.Pre_Qualified__c = preQualBool;}
            else{newOpp.Pre_Qualified__c = 'No';}
            
            update newOpp;
            
            if (updateBoth == 'true'){
                Opportunity otherOpp = [SELECT Id,Referral_Source__c, Agent_Source__c,Referring_Contact__c,Price_Range__c,Areas_of_Interest_city_state__c,Notes_for_Agent__c,Description,Mortgage_Notes__c,Closing_Address__c,Property_Street__c,Property_City__c,Mortgage_Status__c,Type_of_Mortgage__c,Pre_Qualified__c,Pre_Qualified_Amount__c,Send_To_CU__c,Reason_not_sent_to_CU__c FROM opportunity WHERE Id =:otherOppId LIMIT 1];
            	otherOpp.Referral_Source__c = refSource;
                otherOpp.Agent_Source__c = agentSource;
                otherOpp.Referring_Contact__c = refContact;
                otherOpp.BryteCoreHotLead__c = bCHLPass;
                otherOpp.RecordTypeId = RTID_Referred;
                otherOpp.Phase__c = 'Scrubbed';
                
                //AVOID EMPTY PICKLISTS/STRINGS 
                if(priceRange != ''){otherOpp.Price_Range__c = priceRange;}
                if(areaInterest != ''){otherOpp.Areas_of_Interest_city_state__c = areaInterest;}
                if(agentNotes != ''){otherOpp.Notes_for_Agent__c = agentNotes;}
                if(description != ''){otherOpp.Description = description;}
                if(mortNotes != ''){otherOpp.Mortgage_Notes__c = mortNotes;}
                if(propAddr != ''){otherOpp.Closing_Address__c = propAddr;}
                if(mortStatus != ''){otherOpp.Mortgage_Status__c = mortStatus;}
                if(mortType != ''){otherOpp.Type_of_Mortgage__c = mortType;}
                if(preQual != ''){otherOpp.Pre_Qualified_Amount__c = preQualAmount;}
                if(reasonNoCU != ''){otherOpp.Reason_not_sent_to_CU__c = reasonNoCU;}
                //else{newOpp.Reason_not_sent_to_CU__c = 'CU Realty was unable to connect with member';}
                
                if(buyOrSell == 'Sell'){newOpp.Pre_Qualified__c = preQualBool;}
                else{newOpp.Pre_Qualified__c = 'No';}
                otherOpp.Send_To_CU__c = sendCuBool;
                
                update otherOpp;
            }
            
            return 'Success';
        }
        catch(Exception e){
            return e.getMessage();
        }
    }

 
Having one heck of a time trying to figure out why this isn't working. The array I have returns null, which I find really strange. Additionally, the related contact is not being created, but everywhere I look for information shows this as the correct way to insert a record. Am I missing something? Thanks in advance!
@AuraEnabled
    public static string[] insertRelatedContact(string oppId, string agentId ){
        string[] infoArray = new string[] {oppId,agentId};
            
        //INSERT RELATED CONTACT
        Related_Contact__c rc = new Related_Contact__c();
        rc.OpportunityId__c = oppId;
        rc.ContactId__c = agentId;
        rc.Role__c = 'Assigned Agent';
        
        insert rc;
        
        return infoArray;
    }

 
Hi All.
 I have a workflow which updates Field A to True and I have process Builder to execute when FieldA is true on Same Object .
 I have checked re-evaluate workflow checkbox but still process builder is not executig please let me know if i am doing anything wrong ?

Regards,
Rajesh