+ Start a Discussion



I am following the book "Developement with the Force.com platform" by JasonOuelette.

When creating the Custom Objects, I did not check the box to be visible in a tab, and so I could not add this object to the Custom App I was creating. Now I have a created fields and relationships in the custom object. How do I add this Object to the Custom App?




Best Answer chosen by Admin (Salesforce Developers) 

It looks you havent create custom Tabs while defining custom objects first you need to create custom Tab for new objects Creating Tab Setup -->App Set up---> Create---> Tabs Click on new Tab [drop down shows all untabed objects ] select your object, set Tab style , click Next select profiles Save Adding To App Setup -->App Set up---> Create---> Apps Click on edit, edit available tab section Save Done Thanks, Bala

rima khanrima khan 
I registered with trailhead.
I’m an SDR looking to expand my Salesforce skill set. Let’s pretend I have none. Particularly looking for the basics around reporting, and any other trails that may be beneficial to spend some time with.
My goal is to have a competent understanding of SF to build my sales as I enter a closing role and the relevant tools in SF that will help me gain an advantage.
Thanks in advance!
Best Answer chosen by rima khan
manasa udupimanasa udupi
Hi Rima,

Below are few trailhead links, hope it helps:)

Getting error while completing a trialhead challenge 
Error -> Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contact_must_be_in_Account_ZIP_Code: [] 

Please help 
Best Answer chosen by UserSFDX
SubratSubrat (Salesforce Developers) 
Hello ,
Please note that Questions about how to pass Trailhead challenges are not on topic, because these challenges are intended to be independent demonstrations of your abilities.

Trailhead Help (https://trailhead.salesforce.com/en/help?support=home)can provide assistance for situations where Trailhead does not appear to be functioning correctly. You can reach out to them if this is the case.

Please close the thread by selecting as best answer so that we can keep our community clean.

Thank you
Eddie Grissett 11Eddie Grissett 11 
Is there a way to set up discussion forums on our salesforce community?
We would like our customers to be able to have discussions based on our own products?
Best Answer chosen by Eddie Grissett 11
SwethaSwetha (Salesforce Developers) 
HI Eddie,
You can enable "Allow discussion threads" as mentioned in  

Also see https://salesforce.stackexchange.com/questions/375093/adding-a-forum-to-an-existing-experience-cloud-site


If this information helps, please mark the answer as best. Thank you
kavya mareedukavya mareedu 
Ans:  Text, Text Area, Text Area Long, Rich Text Area, URL. Is this is the right answer or is there something else????

13. Can we change the data type from Text to Auto Number for the Name when we already have?

Ans: I feel the answer is yes. If yes, please do let me know the explanation . If no, let me know the reason as well. Thanks guys. 

Best Answer chosen by kavya mareedu
sairam akella 11sairam akella 11
Yes.. We change the Data field type from name to autonumber . But the changes only apply to the new record not for the existing record.

As name is one of the default field that is created while creating object and also internally it is used for indexing Salesforce has given this permissiong to edit the data type of this field.
I've successfully plotted the accounts on Google Map with Lightning Component and it works in Sandbox...but don't know how to write a test code for the ApexClass.

I describe the codes below and hope anyone can help with the test code part. Thank you!

Component (MapNearbyAccount.cmp)
<aura:component controller="MapNearbyAccountController" implements="flexipage:availableForAllPageTypes,force:hasRecordId">
    <aura:attribute name="mapMarkers" type="Object"/>
    <aura:attribute name="selectedMarkerValue" type="String" />
    <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    <div class="slds-box slds-theme--default">
                       mapMarkers="{! v.mapMarkers }"
                       markersTitle="accounts nearby"
                       onmarkerselect="{!c.handlerMarkerSelect}" />
Controller (MapNearbyAccount.js)
    init: function (cmp, event, helper) {
        var recordId = cmp.get("v.recordId");     
        var action = cmp.get("c.getAccounts");
        action.setParams({recordId :recordId});
        cmp.set('v.mapMarkers', [{location: {}}]);

        action.setCallback(this, function(response){
            var accounts = response.getReturnValue();
            var markers = [];
            for(var i = 0; i < accounts.length; i++){
                var acc = accounts[i];
                    location: {
                        Country : acc.BillingCountry,
                        State : acc.BillingState,
                        City: acc.BillingCity,
                        Street: acc.BillingStreet
                    icon : "standard:account",
                    value: acc.Id,
                    title: acc.Name,
            if(markers.length != 0){
                cmp.set('v.mapMarkers', markers);


    handlerMarkerSelect: function (cmp, event, helper) {
ApexClass (MapNearbyAccountController)
public class MapNearbyAccountController {
    public static List<Account> getAccounts(String BillingCity, String BillingState, String recordId){
        Account acct = [SELECT Id, Name, BillingCountry, BillingState, BillingCity, BillingStreet, Industry FROM Account WHERE Id =:recordId];
        return [SELECT Id, Name, BillingCountry, BillingState, BillingCity, BillingStreet,Description
                FROM Account 
                WHERE BillingState = :acct.BillingState AND BillingCity LIKE :('%' + acct.BillingCity + '%') AND Industry = :acct.Industry LIMIT 10];
public class MapNearbyAccountControllerTest {
    static void testMapNearbyAccountController() {
        Account acc1 = new Account();
        insert acc1;
        MapNearbyAccountController ctrl = new MapNearbyAccountController();
            List<Account> getAccounts = ctrl.getAccounts();
Best Answer chosen by MasahiroY
Maharajan CMaharajan C
Hi  Masahiro,

Please use the below test class:
public class MapNearbyAccountControllerTest {
    static void testMapNearbyAccountController() {
        Account acc1 = new Account();
        insert acc1;
        List<Account> getAccounts = MapNearbyAccountController.getAccounts('Shibuya','Tokyo',acc1.Id);

Diana ManDiana Man 

Hi all,
I have an issue when I come to open my developer console. It opens and start to load but it quickly minimizes, showing a "loading..." text.
After that, the developer console's window freezes completely, allowing me only to close it. Same happens to the window I used to open the developer console. 
I find a solution here http://salesforce.stackexchange.com/questions/80453/developer-console-is-not-loading but I don't have enough time to switch my workspace.
I tried cleaning the browser data but nothing changed. I can also use the developer console of other salesforce accounts, so it seems it only happens with my account.

And I have another issue, I don't know if it's related or not, I'm posting it here just in case it is and it helps to see the problem.
As I couln't continue using the default developer console, I downloaded Welkin Suite, but when I build the solution, I keep getting an error that says "file has pending server changes. Please pull first", which it doesn't fix after a pull. When I'm not getting that error I get strage errors like "The attribute “(...)” was not found on the COMPONENT markup://(...): Origin"

Thanks in advance to anyone who can help me solving this!

Best Answer chosen by Diana Man
Diana ManDiana Man

I just fixed my developer console. Indeed I had to switch workspace to make it work, but I couln't even open the developer console.
For some reason, if I enter manually the url for my instance if the developer console, the developer console open successfully, after that all I had to do it switching workspace.

If anyone wants to open a ticket about this (I don't know how to submit one), this could possibly happened because:
-I had a custom workspace
-I had a custom domain
-I was using lightning components

Hope this helps anyone else who's having this issue.

Viswa PrasadViswa Prasad 
I have a requirement i need to add couple of columns in Recently viewed cases list view.i'm unable to edit

Please help me 
Best Answer chosen by Viswa Prasad
VinayVinay (Salesforce Developers) 
Hi Viswa,

Try below steps.
  • From Setup, at the top of the page, select Object Manager.
  • Click the label name of the object for the Recently Viewed list you want to modify.
  • From the menu of links at the top of the page, click Search Layouts.
  • In the far right of the Search Results row, click  and select Edit.
  • Recently viewed lists use the Search Results search layout in Lightning. In Classic, recently viewed lists use the Tab search layout.
  • To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove.
  • Order columns by selecting one or more fields from Selected Fields and clicking Up or Down.
  • Click Save.

Please mark as Best Answer if above information was helpful.

Best Answer chosen by Sonali Rawat 6
Arun Kumar 1141Arun Kumar 1141

Hi Sonali,

To display an image in an Aura component using a static resource, you can follow these steps:

1. Upload the image to a Static Resource:
  • Go to Setup in your Salesforce org.
  • In the Quick Find box, search for "Static Resources".
  • Click on "Static Resources" under the "Develop" section.
  • Click on the "New Static Resource" button.
  • Enter a name for the static resource (e.g., "MyImage").
  • Choose the image file from your local system by clicking on "Choose File" or dragging and dropping the file.
  • Click "Save" to upload the image as a static resource.
2. Create an Aura component:
  • Create or open the Aura component file (e.g., MyComponent.cmp).
  • Inside the component markup, add an `<img>` tag to display the image.
  • Set the `src` attribute of the `<img>` tag to the URL of the static resource.
Here's an example of how the Aura component markup would look like:
    <img src="{!$Resource.MyImage}" alt="My Image" />

3. Save and deploy the Aura component:
Hope this will be Helpful.
Sharad Chandra Maheshwari 1Sharad Chandra Maheshwari 1 
All examples that I have seen so far show how to add a custom button/action on Leads List View. I am looking for a way to launch a flow from a custom buttom/action from Account List View.

The Flow is to create account and related contact records and it needs to happen only through a flow, as the customer wants point and click customization.

User-added image

So far, I have only been able to launch the flow from within a record- by adding the action on the account page layout. However, my requirement is to launch the flow from the Account List View itself and not requiring the user to first have to select any other record. I have also tried creating a VF page to launch the flow from.

The issue that I am running into is

1- I do NOT see 'List View' as an option when I navigate to 'Search Layouts' on the Account Object and the 'Default Layout' does not have the custom button that I created

User-added image

Default Layout- supports only buttons that create or update a record

User-added image

2- I do see 'List View' listed when I navigate TO 'Search Layouts for Salesforce Classic' on the Account Object, however, the button to launch flow still does not show up under custom buttons and the only buttons that show up are related to either creating/updating a record. Also, I am sure if seeing the button to launch a flow under Search Layouts for Salesforce Classic would do me any good as I am working in Lightning
User-added image
User-added image

Direction on how to proceed ahead is greatly appreciated. Thank you in advance!
Best Answer chosen by Sharad Chandra Maheshwari 1
Sharad Chandra Maheshwari 1Sharad Chandra Maheshwari 1

My colleague @Maruthy Jakkam helped me solve this as follows-

There are 2 ways to go about it-
1- Using 'List Button' with content source as URL from 'Buttons, Links, and Actions' on Account object and add it to the custom button section for 'List View' layout under the 'Search Layouts for Salesforce Classic' as follows-

Fetch Flow URL:
User-added image

Create Custom List Button:
User-added image

User-added image

Add it to List View layout:
User-added image

User-added image

2- Second approach is to call embed the flow in a visualforce page and call it using a List Button as follows:

<apex:page standardController="Account" recordSetVar="sobjects">
<flow:interview name="Account_and_Contact_Creation_77946">

Note: it is imperative to set the standardController and recordSetVar, otherwise, the vf page would not show up for list buttons.

@Shirisha- I had already exhausted all the resouces before posting it to the community and that video was one of those. It unfortunately does not solve the problem, but thank you for your help!