• Darrell Gallegos
  • NEWBIE
  • 130 Points
  • Member since 2015


  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 12
    Questions
  • 36
    Replies
Hello Guys, 
I am currently preparing for Salesforce Admin Beginer and Advanced certification, thorugh the modules availble on Salesforce Trailead.
Can anybody please provide me assistance /Guidences for preparing for the certification.You help will be really appreciated.
Thanks In Advance.You can email me bhirakchaekta@gmail.com
Ekta Jain 
 
I am attempting to complete the Service Cloud Superbadge and got the following error at last challenge.

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: PQRLEDMCScreenShotThis is a brand new TH Org created for this superbadge.
Greetings all.

I have created a custom Lightning component to use as a footer in Community. The component is available for use in Community Builder and can be added to pages (in this case the Login page). It appears in Preview. I publish this to the community but the component does not appear in the live community.

I am using the following in my component.
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global"> 
Greetings all!

I am experimenting with iFrame and I like the functionality it gives reps while "staying" in Salesforce. I successfully added a very simple VisualForce page that renders the link called in my code. However, the webpage is cut-off and provides a scroll bar to view the entire page. I have the pixels maxed out in the layout option at 600. I have tried to use <div style> to increase the size but there seems to be a limitiation of 600. Is there a way to display the entire page?

It displays the same in either Classic or LEX.
 
<apex:page standardController="Account">
  <div style="overflow:hidden;">
    <apex:iframe src="https://meridian.sovrn.com" scrolling="true" id="theIframe" />
  </div>
</apex:page>

User-added image
Hello all.

I am running into the following error: System.LimitException: Apex CPU time limit exceeded.

The error file available in dataloader.io states the following: ERROR: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3014A000000Xp6z. Flow error messages: This interview has been terminated as another interview in the same bulk execution request failed with the following error: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. 

The email from Salesforce subject: Error Occurred During Flow "Company_Owner_Sync": The flow tried to update these records:... After all the records update failures the message continues This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: UKCheck: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.---The flow tried to update these records: null.

The Process Builder referrenced "Company Owner Sync" attempts to update the owner of related children custom objects (Domain__c, Meridian_Username__c) and Standard Contacts if the Company(Account) owner is changed. 

The UKCheck trigger I have created uses a custom setting to evaluate the Country picklist and stamp a UK Team checkbox if the picklist contains one of the countries specified in the Custom setting. I have included the trigger below. 

Now the trigger works on single UI insert and updates. The Trigger has worked on bulk upload; however, 40 records attempted to be updated are causing the error described above. I have looked in the debub log but it is rather daunting as I am not completely sure what to look for. Hopefully someone can provide assistance based on this description and trigger. Thank you.
trigger UKCheck on Domain__c (before insert, before update) {
    
    Map<String,Country_Codes__c> getCodes = Country_Codes__c.getAll();
        
    for (Domain__c dom : Trigger.new) {
        	
        if(!String.isBlank(dom.Country__c)) {
           for(String s : getCodes.keySet()) {
               if(s.containsIgnoreCase(dom.Country__c)) {
                        
                  dom.UK_Team__c = TRUE;
                        
               }
           } 
        }
    }
}

 
I am having a problem completing the Test Class for the following Trigger. My current class has 90% code coverage however, the bold text below is the line I cannot gain coverage for. Can anybody lead me in the right direction?

Thank you for any clues.
 
trigger UKCheck on Domain__c (before insert, before update) {
    
    Map<String,Country_Codes__c> getCodes = Country_Codes__c.getAll();
        
    for (Domain__c dom : Trigger.new) {
        	
        if(dom.Country__c != NULL) {
            	for(String s : getCodes.keySet()) {
                	if(s.containsIgnoreCase(dom.Country__c)) {
                    
                    	dom.UK_Team_Checkbox__c = TRUE;
                    
                	}
           		} 
        	}
        
        if(Trigger.isUpdate) {
            if (Trigger.oldMap.get(dom.Id).Company__c != Trigger.newMap.get(dom.Id).Company__c) {
                if(dom.Company__c != NULL) {
                    if(dom.Company__r.OwnerId != NULL) {
                        
                        dom.OwnerId = dom.Company__r.OwnerId;
                        System.debug(dom.Owner);
                        System.debug(dom.Company__r.Owner.Id);
                        System.debug(dom.Company__c);
                	}
                }
            }
	    }
    }
}

User-added image
Struggling with Line 22.
Greetings. I was hoping to gain some assistance with my Trigger. In the current stated the Trigger works; however, I want to account for the various formats of a website, i.e. www. or http:// or https://.  

Right now I am able to strip off the www. but I cannot figure out how to incorporate code to handle the other options. Can anybody provide assistance?
trigger FindDomain on Lead (before insert, before update) {

    // Populate list with of substring of company removing http(s):// or www.
    List<String> leadStr = new List<String>();
    
    for (Lead newLead : Trigger.new) {
        if(newLead.Website != NULL) {
            String s = newLead.Website.removeStartIgnoreCase('www.');
            leadStr.add(s);
            System.debug(leadStr);
        }
  	}
    
    List<Domain__c> domains = [SELECT Id,Name FROM Domain__c WHERE Name IN :leadStr];
    System.debug(domains);
	
    Map<String, Id> domainToLead = new Map<String, Id>();
    
    for (Domain__c dom : domains) {
		domainToLead.put(dom.Name, dom.Id);
        System.debug(domainToLead);
    }
    
    for (Lead l : Trigger.new) {
        
        if (l.Website != NULL) {
            
            l.Domain__c = domainToLead.get(l.Website.removeStartIgnoreCase('www.'));
            
        } else {
            
            l.Domain__c = NULL;
        }     
    }
}





 
I have taken a new role and attempting to clean up the existing org. I have made progress deleting unecessary apps. However, I monster app Learn Trac and View Trac are giving me problems the vendor cannot overcome. 

There is a component c:SearchCustom that I cannot remove because it is reference in 2 of the created communities. I found the component on the community page and removed it and published the change. Both communities are inactive however I keep geeting the same error message below. I know you cannot not delete communities but I have deactivate them. 

Does anybody have any ideas? - Thanks!

Cannot complete this operation. The object you're trying to delete is in use on site Creators1, which is under development. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is under development. : Site The object you're trying to delete is in use on site Creators1, which is under development. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is under development. : Site Referenced by a component instance inside the Lightning Page Search : Lightning Page The object you're trying to delete is in use on site Creators1, which is published. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is published. : Site
Set Up a Weather Company Data Service on IBM Bluemix.

There is no create in IBM Bluemix setup of the Weather Company Data. There is an upgrade wihich requires payment. 

Anybody else experiencing this?

User-added image
Greetings all. I am new to the Developer world and working through the material and practicing. Taking place in the solution of requirements at Staples, I have come across a confusing topic. At least for me it is.

There is a lot of intergration between our Salesforce instance and various applications. The topic of creating a pleasant user experiene and efficient interaction between a home grown application and our Salesforce instance. The proposed option is to integrate this interface through an iFrame soultion. 

My questions is what is the difference/benefits between using an iFrame or incorporating this home grown app into Salesforce via Force.com Canvas?

I would really appreciate if somebody could explain this in plain english. I keep reading the material but it is a little out of my knowledge level and I would truly like to understand it.

Thanks!
I am looking for a method to clean up Email Alerts 1001 (I queried workflow alerts using the Tooling API) .

So far I have the following thoughts regarding this clean up. I can query email templates and filter on Times Used = 0. This should produce the results of templates that have not been sent by user. To my understanding, system generated emails using templates will not increment the counter of Times Used. My rationale is that if I can find Email Templates with Times Used  = 0, I can then manually attempt to find the assoicated Email Alert which calls the related Email Template. From Email Template I cannot navigate to the assoicated Email Alert; however, Email Alert does have a link to the associated Email Template. 

Is there an easier method to determine which Email Templates are associated with specific Email Alerts?

 

Greetings All. First I am new to APEX but trying to grasp the funcitonality and coding language as best I can. I have included the lastest Trigger I have created. It successfully retrieves multiselect picklist values and creates new tasks related to the values that were selected and populates the activities related list on the Account detail page.
 
What I am trying to figure out, is how to populate the Related Contact name in the newly created task. I believe WhoId will work but not sure how to include this is the code to look across the Account record and retrieve the Related Contact. I hope I explained this well.
 
Any suggestions? I believe a SOQL statement would work but I am thinking the WHoId should as well.

Tasks Creation from Multi-Select Picklist Values

Account Activities Created from Picklist
Hello All. 

I am currently working throught the Implementing Global Actions with Visualforce Pages module within the developer Trailhead, but have a question. I was able to create the Visualforce page. I successfully enable the Visualforce page for Salesforce mobile apps and Lightning pages. Created a Global Action using Custom Visualforce with the Visualforce page created above. I navigated to the Publisher Layout  and edited the Global Layout to accomodate the new Action. The Quick Action appears under the Feed App but no where else. From what I read, it should also be present in the People App on Salesforce1. What am I missing?

THank you,

Darrell Gallegos
Greetings. I was hoping to gain some assistance with my Trigger. In the current stated the Trigger works; however, I want to account for the various formats of a website, i.e. www. or http:// or https://.  

Right now I am able to strip off the www. but I cannot figure out how to incorporate code to handle the other options. Can anybody provide assistance?
trigger FindDomain on Lead (before insert, before update) {

    // Populate list with of substring of company removing http(s):// or www.
    List<String> leadStr = new List<String>();
    
    for (Lead newLead : Trigger.new) {
        if(newLead.Website != NULL) {
            String s = newLead.Website.removeStartIgnoreCase('www.');
            leadStr.add(s);
            System.debug(leadStr);
        }
  	}
    
    List<Domain__c> domains = [SELECT Id,Name FROM Domain__c WHERE Name IN :leadStr];
    System.debug(domains);
	
    Map<String, Id> domainToLead = new Map<String, Id>();
    
    for (Domain__c dom : domains) {
		domainToLead.put(dom.Name, dom.Id);
        System.debug(domainToLead);
    }
    
    for (Lead l : Trigger.new) {
        
        if (l.Website != NULL) {
            
            l.Domain__c = domainToLead.get(l.Website.removeStartIgnoreCase('www.'));
            
        } else {
            
            l.Domain__c = NULL;
        }     
    }
}





 
I am attempting to complete the Service Cloud Superbadge and got the following error at last challenge.

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: PQRLEDMCScreenShotThis is a brand new TH Org created for this superbadge.
Greetings all.

I have created a custom Lightning component to use as a footer in Community. The component is available for use in Community Builder and can be added to pages (in this case the Login page). It appears in Preview. I publish this to the community but the component does not appear in the live community.

I am using the following in my component.
<aura:component implements="forceCommunity:availableForAllPageTypes" access="global"> 
Hi,
I am facing issue with challenge 6 it gives error as in below screenshot

User-added image
 

I don't understand I have created the onBoatSelected controller function to run when BoatSelected application event is fired...but still I am getting this error. I have checked console log and I am getting all the boat details in my BoatDetails component. Below is my code -

BoatTile.cmp

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes" access="global">
    <aura:attribute name="boat" type="Boat__C"/>
    <aura:attribute name="selected" type="Boolean"/>
    <aura:registerEvent name="BoatSelect" type="c:BoatSelect"/>
    <aura:registerEvent name="BoatSelected" type="c:BoatSelected"/>
    <!--<lightning:button class="tile{! v.selected ? 'selected' : 'tile' }" onclick="{!c.onBoatClick}">
        <div style="{!'background-image:URL(\'+v.boat.Picture__c+'\')'}" class="innertile">
              <div class="lower-third">
                   <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>
              </div>
        </div>
    </lightning:button> -->
    

    <lightning:button class="{!v.selected ? 'tile selected' : 'tile'}" onclick="{!c.onBoatClick}">

        <div style="{!'background-image: url(\'' + v.boat.Picture__c + '\')'}" class="innertile">

            <div class="lower-third">

                <h1 class="slds-truncate">{!v.boat.Contact__r.Name}</h1>

            </div>

        </div>

    </lightning:button>
    
</aura:component>



BoatTileController.js

onBoatClick : function(component, event, helper) {
        var eve = component.getEvent("BoatSelect");
        console.log('component.get("v.boat.Id")>>>'+component.get("v.boat.Id"));
        eve.setParams({"boatId" : component.get("v.boat.Id")});
        eve.fire();
        var appeve = $A.get("e.c:BoatSelected");
        console.log('component.get("v.boat") Application eve fire'+component.get("v.boat"));
        appeve.setParams({"boat" : component.get("v.boat")});
        appeve.fire();
    }

BoatDetails.cmp

<aura:component access="global" implements="force:appHostable,flexipage:availableForAllPageTypes">
    
    <aura:handler event="c:BoatSelected" action="c.onBoatSelected" phase="capture"/>
    
    <aura:attribute name="boat" type="Boat__c" access="public"/>
    <aura:attribute name="id" type="Id" access="public"/>
    <aura:attribute name="boatError" type="String"/>
    
    <force:recordData aura:id="service" recordId="{!v.id}" targetFields="{!v.boat}" fields="Id,Name,Description__c,Price__c,
                    Length__c,Contact__r.Name,Contact__r.Email,Contact__r.HomePhone,BoatType__r.Name,Picture__c"
                      targetError="{!v.boatError}" recordUpdated="{!c.onRecordUpdated}"/>
    
    <lightning:tabset >
        <lightning:tab label="Details">
            <aura:if isTrue="{! !empty(v.boat)}">
            <c:BoatDetail boat="{!v.boat}"/>
            </aura:if>
        </lightning:tab>

        <lightning:tab label="Reviews">

            

        </lightning:tab>
        
        <lightning:tab label="Add Review">

            

        </lightning:tab>

    </lightning:tabset>

</aura:component>

BoatDetailsController.js

onBoatSelected : function(component, event, helper) {
        var boatvar = event.getParam("boat");
        console.log(boatvar.Id+'<<<<<<Application Eve Receiver boatVar');
        component.set("v.id",boatvar.Id);
        console.log(component.get("v.id")+'<<<<<<Application Eve Receiver boatVar');
        component.find("service").reloadRecord(true);
        for(var i=0;i<1000;i++)
            {
                
            }
        console.log(component.get("v.boat")+'<<<<<<Application Eve Receiver');
        
    },
    
    onRecordUpdated : function(component, event, helper) {
    }
Hello all.

I am running into the following error: System.LimitException: Apex CPU time limit exceeded.

The error file available in dataloader.io states the following: ERROR: The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 3014A000000Xp6z. Flow error messages: This interview has been terminated as another interview in the same bulk execution request failed with the following error: <b>An unhandled fault has occurred in this flow</b><br>An unhandled fault has occurred while processing the flow. 

The email from Salesforce subject: Error Occurred During Flow "Company_Owner_Sync": The flow tried to update these records:... After all the records update failures the message continues This error occurred: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: UKCheck: System.LimitException: Apex CPU time limit exceeded. For details, see API Exceptions.---The flow tried to update these records: null.

The Process Builder referrenced "Company Owner Sync" attempts to update the owner of related children custom objects (Domain__c, Meridian_Username__c) and Standard Contacts if the Company(Account) owner is changed. 

The UKCheck trigger I have created uses a custom setting to evaluate the Country picklist and stamp a UK Team checkbox if the picklist contains one of the countries specified in the Custom setting. I have included the trigger below. 

Now the trigger works on single UI insert and updates. The Trigger has worked on bulk upload; however, 40 records attempted to be updated are causing the error described above. I have looked in the debub log but it is rather daunting as I am not completely sure what to look for. Hopefully someone can provide assistance based on this description and trigger. Thank you.
trigger UKCheck on Domain__c (before insert, before update) {
    
    Map<String,Country_Codes__c> getCodes = Country_Codes__c.getAll();
        
    for (Domain__c dom : Trigger.new) {
        	
        if(!String.isBlank(dom.Country__c)) {
           for(String s : getCodes.keySet()) {
               if(s.containsIgnoreCase(dom.Country__c)) {
                        
                  dom.UK_Team__c = TRUE;
                        
               }
           } 
        }
    }
}

 
I am having a problem completing the Test Class for the following Trigger. My current class has 90% code coverage however, the bold text below is the line I cannot gain coverage for. Can anybody lead me in the right direction?

Thank you for any clues.
 
trigger UKCheck on Domain__c (before insert, before update) {
    
    Map<String,Country_Codes__c> getCodes = Country_Codes__c.getAll();
        
    for (Domain__c dom : Trigger.new) {
        	
        if(dom.Country__c != NULL) {
            	for(String s : getCodes.keySet()) {
                	if(s.containsIgnoreCase(dom.Country__c)) {
                    
                    	dom.UK_Team_Checkbox__c = TRUE;
                    
                	}
           		} 
        	}
        
        if(Trigger.isUpdate) {
            if (Trigger.oldMap.get(dom.Id).Company__c != Trigger.newMap.get(dom.Id).Company__c) {
                if(dom.Company__c != NULL) {
                    if(dom.Company__r.OwnerId != NULL) {
                        
                        dom.OwnerId = dom.Company__r.OwnerId;
                        System.debug(dom.Owner);
                        System.debug(dom.Company__r.Owner.Id);
                        System.debug(dom.Company__c);
                	}
                }
            }
	    }
    }
}

User-added image
Struggling with Line 22.
Greetings. I was hoping to gain some assistance with my Trigger. In the current stated the Trigger works; however, I want to account for the various formats of a website, i.e. www. or http:// or https://.  

Right now I am able to strip off the www. but I cannot figure out how to incorporate code to handle the other options. Can anybody provide assistance?
trigger FindDomain on Lead (before insert, before update) {

    // Populate list with of substring of company removing http(s):// or www.
    List<String> leadStr = new List<String>();
    
    for (Lead newLead : Trigger.new) {
        if(newLead.Website != NULL) {
            String s = newLead.Website.removeStartIgnoreCase('www.');
            leadStr.add(s);
            System.debug(leadStr);
        }
  	}
    
    List<Domain__c> domains = [SELECT Id,Name FROM Domain__c WHERE Name IN :leadStr];
    System.debug(domains);
	
    Map<String, Id> domainToLead = new Map<String, Id>();
    
    for (Domain__c dom : domains) {
		domainToLead.put(dom.Name, dom.Id);
        System.debug(domainToLead);
    }
    
    for (Lead l : Trigger.new) {
        
        if (l.Website != NULL) {
            
            l.Domain__c = domainToLead.get(l.Website.removeStartIgnoreCase('www.'));
            
        } else {
            
            l.Domain__c = NULL;
        }     
    }
}





 
I have taken a new role and attempting to clean up the existing org. I have made progress deleting unecessary apps. However, I monster app Learn Trac and View Trac are giving me problems the vendor cannot overcome. 

There is a component c:SearchCustom that I cannot remove because it is reference in 2 of the created communities. I found the component on the community page and removed it and published the change. Both communities are inactive however I keep geeting the same error message below. I know you cannot not delete communities but I have deactivate them. 

Does anybody have any ideas? - Thanks!

Cannot complete this operation. The object you're trying to delete is in use on site Creators1, which is under development. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is under development. : Site The object you're trying to delete is in use on site Creators1, which is under development. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is under development. : Site Referenced by a component instance inside the Lightning Page Search : Lightning Page The object you're trying to delete is in use on site Creators1, which is published. : Site The object you're trying to delete is in use on site Sovrn_Community_C, which is published. : Site
I'm trying to create a Formula Checkbox field and would like to be false if another Field that is a Picklist has a value that has been selected.
Example:
Picklist Field is Stage
IF Stage value is Closed Won, the Checkbox Formula field is False.
IF Stage Value is Signed, the Checkbox Formula field is False.

If someone can help.  Not sure how to create a checkbox formula field.
I am get this error: "Challenge Not yet complete... here's what's wrong: 
The 'Opp Stage by Adventure' report does not appear to be configured correctly. Make sure it has the correct report type, groupings, filters and chart type".

I believe i configured the report according to the instructions but it is still showing and error. Any assistance or insight would be apreciated. 
Has anyone completed this trail? I am stomped on challenge number 3, regarding created the process for fulfillment. Any pointers or guidance would be appreciated.
 
Hi Folks,

I wanted to query metadata components( Fields, Objects, Validation Rules, Workflow Rules, Approval Process..etc) by using SOQL query in Apex. So, Could you please anyone check let me know do we have any workaround for this.

i'm just curious about whether is it possible by using Query or not.

Thanks,
Anil
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>')

I tried this code i am able to retrieve the records and clicking on each record showing  the detail page of that record.But Still Trail Head is showing error.Can someone guide me if  I am wrong


<apex:page standardController="Account" recordSetVar="accounts">
    <apex:pageBlock title="Accounts">
      <apex:repeat value="{!Accounts}" var="a">
      <li>
       <apex:outputLink value="{!URLFOR($Action.Account.view, a.id)}">{!a.Name}
       </apex:outputLink>
     </li>
   </apex:repeat>
   </apex:pageBlock> 
</apex:page>