• 3690 Points
  • Member since 

  • Chatter
  • 115
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 0
  • 1610
I want to integrate payment button integration in my E-commerce community cloud public site, please suggest me the best way.

 I've been trying to install the dreamhouse app into my dev org. But after I install it, it doesn't appear in my app manager. I've also tried creating my own app under the name Dreamhouse, but it doesn't complete the challenge at all!

Has anyone encountered similar issues before?
So I've completed this challenge several times now via the mobile app but for some reason the system isn't seeing the Chatter posts. 

I have:
  • Ensured I'm logged into my TP org on my Android app
  • Logged out of any other orgs
  • Followed spelling conventions precisely 
You can see here I've posted it several times correctly... 

Chatter posts
Any help much appreciated as it's all that stands between me and my first completed Trail! 
Hi All,

I am new to batch class. Just wondering why we are using global access modifier instead of public. By referring to many developer forums, global is used to access the batch class outside the application whereas public used inside the application.. I see many blogs are giving example with global class eventhough Salesforce blogs too. 

Below code I used to coding practice for batch class:
public class AccoutBatchProcess implements Database.Batchable<Sobject>{
    public database.QueryLocator start(Database.BatchableContext ctx){
        return database.getQueryLocator('SELECT ID FROM Account');
    public void execute(Database.BatchableContext ctx, List<Sobject> sList){
    public void finish(Database.BatchableContext ctx){
Is that mandatory that need to be replace global with public? Is that best practice to define the batch class as global?
Does anybody know that how can I put other standard components into the component panel? Currently, there is only 'Create Case Form'  available for using in my community builder.(I'm now using 'Partner Central' template). 

my community builder
Hands on Challenge - getting error:
Challenge Not yet complete... here's what's wrong:
Couldn’t find picklist formula with the correct information. Please double check the instructions
And when I view my View Setup Audit Trail I have the entry:
1/16/2018 7:32:45 PM VETmark.munneke@cunning-moose-426038.com Changed default value for Macaron Flavor custom field from null to CASE(MONTH(TODAY()),1, "Gingerbread",2, "Strawberry",4, "Chocolate",7, "Raspberry",11, "Pumpkin",12, "Mint", "Vailla")
And this is the directions from Trailhead Challenge:
Use the formula editor to set the Default Value for the Macaron Flavor picklist as follows: CASE(MONTH(TODAY()),1, "Gingerbread",2, "Strawberry",4, "Chocolate",7, "Raspberry",11, "Pumpkin",12, "Mint", "Vanilla")

Hi All,
I want multi select record selection for lookup results and whatever I selected records I want to save it in related list.

How can I do this. If any one is having code rference for this please share.
Thanks in Advance

Hi Team,

I am literally want to know, what is Milestone in salesforce?

And i cant find any Milestone option in my Qick find box. From which release it ia available in salesforce?

Balaji A

Newbie here trying to turn on Live Agent chat on my trailhead playground. Following https://trailhead.salesforce.com/projects/build_branded_chat/steps/build_branded_chat_enable

But when I search for live agent chat in quick find box I can't find it. What am I missing?
  • December 22, 2017
  • Like
  • 0

We we have a customized 'Account search' on home page left nav side bar in the classic view. while moving to lightning experience we did not see this side bar item/component in lightning experience home page side bar or  anyother place..please help
Hi All,

I have the follwing code makes a long blank page on IE11 and it works fien on other browsers, including Firebox nad chrome. Could you please advise on how to fix & which tag makes the the problem on IE

 <h4 class="row heading"><u>2. Course Detail </u></h4>
                        <div class="article">
                        <p>Please select one of the below courses that your school is contracted to deliever</p>
                         <div class="article" >
                        <!-- <apex:inputhidden value="{!objEnrolmentForm.aipt_Course_Start_Date__c}"  id="Start_Date"   />-->
                         <apex:inputText value="{!strSelectedcourse}" id="ID_course" onblur="checkFieldValidation(this.id);"  style="display:none;"  rendered="{!if(objEnrolmentForm.aipt_Product__c!=null,false,true)}"  styleClass="isrequired " />
                          <span class="errorMsg">{!$Label.AIPT_isCourseSelected}</span>
                         <apex:actionregion >
                  <apex:actionFunction name="abc" action="{!checkSelectedValue}" status="idstatus" reRender="InPannel">
                    <apex:param name="abc" value="" assignTo="{!IdSelectvalue}"/>
                   <apex:actionFunction name="getYear" action="{!calculateEnddate}" status="idstatus1" reRender="endDateId">
                    <apex:param name="getYear" value="" assignTo="{!SelectedyearfromPage}"/>
                  <apex:actionFunction name="getDate" action="{!calculateEnddate}" status="idstatus2" reRender="endDateId">
                    <apex:param name="getDate" value="" assignTo="{!strSelectedStartDate}"/>
                   <apex:actionFunction name="getIntakeName" action="{!displayStartDate}" status="idstatus3" reRender="Start_Date">
                    <apex:param name="getIntakeName" value="" assignTo="{!intakeName}"/>
                        <div id="no-more-tables">
                        <table class="col-md-12 table-bordered table-condensed2 cf">
                        <thead class="cf">
                        <th class="numeric">Course Code</th>
                        <th class="numeric">Course Name</th>
                        <th class="numeric">Delivery Method</th>
                        <th class="numeric">Course Cost</th>
                        <th class="numeric">&nbsp;</th>

Hello All, 

I have a question. I am attempting to do the Build an Instant Notification App project.
I've done all steps provided from the Trailhead but when I try to test,
I'm getting the following error at the Homepage of the Trailhead Playground:

User-added image

Possible to let me know how to fix this error ?
Appreciate your great help and thanks in advance.
Hi !
I need to merge multiple PDF files.
Is there any way to do that within Salesforce ?  I found some post on that but they are pretty old : 2011, 2009...

Thank you for your help !
Hi All, How can I deploy one community page to production.

I create a new page in community I just need to deploy this page alone


I want to diaplay my vf page like
​Account name1 and its child contacts and opportunities,
Account name2 and its child contacts and opportunitis....
like below.....

Account name1:
        1. xxxxxxxxxxx

Account name2:
        1. xxxxxxxxxxx
​        2.xxxxxxxxxxxx
adn so on......
How to achive this........
please some one help me..
Thanks in Advance...........
Hi All,

I have multipicklist field which is rendered based on other field. Now i want to display another picklist Address Same as Permanent(values YES, NO) based on value in multipicklist field.  If No Selected again render few adress fields City, State, Zip code. If value changed from NO to YES then these fields should hide. Can anyone help me with this requirement pls?

  • December 07, 2017
  • Like
  • 0
Hello, I'm attempting to override the field color  label for certain fields on the standard contracts object. Can I can do this by inputting code within the <apex:detail attribute or should I not use the <apex:detail attribute and manually type out each field I want to include? The code I have below is what I've tried so far. Thank you for your help. 

<apex:page standardController="Contract">
    <style type="text/css">
<apex:form >
<apex:pageBlocksection title="Contract Details Test" columns="2">   
  <apex:detail subject="{!contract.Id}" >
      <apex:outputLabel >LA</apex:outputLabel>
      <apex:outputField label="Status" value="{!contract.Status}" />
      <apex:inputField value="{!contract.Status}" label="{contract.Status} "/>
  • November 30, 2017
  • Like
  • 0
I'm trying to create my trailhead playground and it keeps timing out and saying try again. I'm in the module "Install Apps and Packages in your Trailhead Playground". Each time I try again it increments the number in the name, i.e. Trailhead Playground 4 and it shows the name in the dropdown grayed out with the spinning dots.. 

I want to construct a JSON file in Apex, is there any code to parse the for loop and construct a JSON file.

Thank you for suggestion !
I just enabled Lightning for three users in my org, including myself as Administrator. 

When I switch to the Lightning Experience, I get sent to Setup Home. I can't load the main navigation/toolbar. How do I exit setup and start using Lightning?

I need to read the email template content alone into the VF page, is that possible?
I am working on Visualforce pages where I have a scenario in which we have a Opportunity lookup as a input field. Now I have to display the selected opportunity's related opportunity products as a lookup so that we can select one of the product and show its relative details.
Can anyone please guide.

I am facing trouble to install my app exchange package on my sandbox account since my  sandbox credential works only on my custom url "https://xx--xx.lightning.force.com". Please assist me
Please advise me which one solution is better for communicating across components. Because for me they are similar to each other.
Trailhead Check Challenge Button is not responding back with results.
  • January 31, 2018
  • Like
  • 15
It appears that 'most' of the options available for customizing page layout, only affects the 'edit' page layout and not the 'new' record page layout.
I am looking at customizing page layout while creating 'new' record.

I want to have some field as 'read only' and some fields not visible in new record page layout (just like formula field)
a. Do I have to go with creating new VF page?
b. Is there any other way in Salesforce?

Need Help

I am trting to use the tooling api, I want to check the result if I call the method from Anonymous window of developer console, I am not getting the response.

Please check the below code.
public class APIHandler{

    public void executeREST(){
        system.debug('In executeREST');
        HttpRequest req = new HttpRequest();
        req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());
        req.setHeader('Content-Type', 'application/json');
        Http h = new Http();
        HttpResponse res = h.send(req);
and the code for testing is as below:
APIHandler obj = new APIHandler();
but I am not getting the response, please guide me.

Thanks in advance!


On one object, I have an image field i.e. a URL, that render in another field which shows that picture. I am creating a VF email template and want to have that picture show in the email as well.

Can anyone please help me with the necessary code in order to show that picture in the template.

i'm getting error as follows :Looks like something went wrong, please try again later. on (Automate the creation of fulfillments) Step 4

Automate the creation of fulfillments
Following the requirements described above, create the Fulfillment Creation process flow. Please ensure that your process works as expected without errors before submitting this challenge.
Hello, By last month I have completed 34 Badges and 9150 points in the Trailhead. Do anyone know about the distribution of prizes as was mentioned. I have to receive the Fit digital watch and a voucher. Do, anyone know how Salesforce team will contact me?
I'm working on I'm working on the Admin Beginner/Salesforce Mobile App Customization/Customize Compact Layouts and I am looking at a compact layout named "Showing Mobile Layout" on the Event Object but I'm getting "Challenge Not yet complete... here's what's wrong: 
Could not find a compact layout for the Event object with the label 'Showing Mobile Layout'."   
I am using the Lodash and Moment javascript libraries, imported as static resources, in several lighting components. Most of the time they work great, but every so often I get an error like this in the UI: 

Action failed: ltng:require$controller$init [ltng:require encountered an existing <script> element for /resource/SDS_LODASH_JS that was not created by an ltng:require instance. Unable to determine when the script would complete loading!]

I'm currently loading these libraries with the following tag: 
<ltng:require scripts="{!join(',',

Has anyone else had this problem and figured out how to resolve it?
  I have a requirement where I need a lightning Modal/Pop up box to load a URL upon click of a button. Can someone please help me with the sample code?  There are plenty of examples on how to open a modal box , but none indicates if we can load a URL in it or not.
I am working on User-added image. I've completed the assignment according to the directions and the answer from https://www.youtube.com/watch?v=VJpnylkVTGY.  It still gives me an error saying, "Challenge Not yet complete... here's what's wrong: 
The assignment rule 'Assign Booyah' was not found for cases or it is not active".  I have an assignment rule, and it is active. So I can't get the 500 ​ points. I've even created a case with the criteria, and it worked.  I don't understand why I can't get past the error.
Hi, I am getting stuck of the trailhead - develop a customer satisfaction survey - it says error ID IGMKGHWP - I have now tried twice and the same message appears to try with a new DE and post to this forum if it doesnt work. Can someone help?
I have to upload a image file to the custom object using lighting component, while i am  creating a record. NOT after creaitng a record How this can be done using lighting components ? 
hope i can get help from someone  for this, thanks in Advance 
Hi All ,
    I need to open a pop-up window from a record detail page . I got my hands on the following snippet of code that works just fine.

<aura:component implements="force:lightningQuickAction" >
    <ui:button label="Open in New window" press="{!c.openActionWindow}"/>


    openActionWindow : function(component, event, helper) {

Now in this code when you click on a button (on record detail page)a pop up comes in front and asks you to click a button (Label-Open in new window). I want to disable this behavior, I want that when I click the button on record detail page, a pop up should have the url (w3 schools) loaded into it.And I also want to pass a record parameter in the URL , say Opportunity.Id.
Best Practice : When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.

User-added image

      That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it. 

Thanks #Copy_Steve Molis

 i am getting an Error "Too many SOQL queries: 101".
public class WarengruppenZuordnung {
    /********************* Properties used by getRootNodeOfUserTree function - starts **********************/
    // map to hold roles with Id as the key
    private static Map <Id, Warengruppen_Struktur__c> warengruppeMap;
    // map to hold child roles with parentRoleId as the key
    private static Map <Id, List<Warengruppen_Struktur__c>> parentWarengruppeMap;
    // List holds all subordinates
    private static List<Warengruppen_Struktur__c> allProducts {get; set;}
    // Global JSON generator
    private static JSONGenerator gen {get; set;}
    public static String folderId{get;set;}
    public static String folderName{get;set;}
    public static String endpointId{get;set;}
    /********************* Properties used by getRootNodeOfUserTree function - ends **********************/
    /********************* Properties used by getSObjectTypeById function - starts ********************* */
    // map to hold global describe data
    private static Map<String,Schema.SObjectType> gd;
    // map to store objects and their prefixes
    private static Map<String, String> keyPrefixMap;
    // to hold set of all sObject prefixes
    private static Set<String> keyPrefixSet;
    /********************* Properties used by getSObjectTypeById function - ends **********************/
    public static String redirUrl{get;set;}
    public String contactId {get;set;}
    /* // initialize helper data */ 
    static {
        // initialize helper data for getSObjectTypeById function
        Map<String, String> UrlParameterMap = ApexPages.currentPage().getParameters();
        //redirUrl = getRedirUrl();
        gen = JSON.createGenerator(true);
        gen = JSON.createGenerator(true);
        // initialize helper data for getRootNodeOfUserTree function
    /* // init1 starts <to initialise helper data> */
    private static void init1() {
        // get all objects from the org
        gd = Schema.getGlobalDescribe();
        // to store objects and their prefixes
        keyPrefixMap = new Map<String, String>{};
            //get the object prefix in IDs
            keyPrefixSet = gd.keySet();
        // fill up the prefixes map
        for(String sObj : keyPrefixSet) {
            Schema.DescribeSObjectResult r =  gd.get(sObj).getDescribe();
            String tempName = r.getName();
            String tempPrefix = r.getKeyPrefix();
            keyPrefixMap.put(tempPrefix, tempName);
    /* // init1 ends */
    /* // init2 starts <to initialise helper data> */
    private static void init2() {
        // Create a blank list
        allProducts = new List<Warengruppen_Struktur__c>();

        for(AggregateResult wsc : [SELECT Name, RecordTypeId, RecordType.DeveloperName FROM Warengruppen_Struktur__c GROUP BY RecordTypeId, RecordType.DeveloperName, Name ORDER BY Name]) {
                folderId = String.valueOf(wsc.get('RecordTypeId'));
                folderName = String.valueOf(wsc.get('Name'));
                endpointId = String.valueOf(wsc.get('RecordTypeId'));
        warengruppeMap = new Map<Id, Warengruppen_Struktur__c>([select Id, Name, Parent_Warengruppe__c, RecordTypeId from Warengruppen_Struktur__c order by Name]);
        // populate parent role - child roles map
        parentWarengruppeMap = new Map <Id, List<Warengruppen_Struktur__c>>();        
        for (Warengruppen_Struktur__c r : warengruppeMap.values()) {
            List<Warengruppen_Struktur__c> tempList;
            if (!parentWarengruppeMap.containsKey(r.Parent_Warengruppe__c)){
                tempList = new List<Warengruppen_Struktur__c>();
                parentWarengruppeMap.put(r.Parent_Warengruppe__c, tempList);
            else {
                tempList = (List<Warengruppen_Struktur__c>)parentWarengruppeMap.get(r.Parent_Warengruppe__c);
                parentWarengruppeMap.put(r.Parent_Warengruppe__c, tempList);
    /* // init2 ends */
    /* // public method to get the starting node of the RoleTree along with user list */
    public static RoleNodeWrapper getRootNodeOfUserTree (Id userOrRoleId) {
        return createNode(userOrRoleId);
    /* // createNode starts */
    private static RoleNodeWrapper createNode(Id objId) {
        RoleNodeWrapper n = new RoleNodeWrapper();
        Id roleId;
        if (isRole(objId)) {
            roleId = objId;
            if (!(warengruppeMap.get(objId).Parent_Warengruppe__c == null)) {
                List<Warengruppen_Struktur__c> tempFolderList = new List<Warengruppen_Struktur__c>();
                Warengruppen_Struktur__c tempFolder = [Select Id, Name, Parent_Warengruppe__c, RecordTypeId, RecordType.DeveloperName from Warengruppen_Struktur__c where Id =: objId ORDER BY Name];
                if(tempFolderList.size()== 1){
                        n.hasFolders = false;
                        n.myFolders = tempFolderList;
                        n.isLeafNode = false;
                        n.hasFolders = false;
                        n.myFolders = tempFolderList;
                        n.isLeafNode = true;
        else {
            List<Warengruppen_Struktur__c> tempFolderList = new List<Warengruppen_Struktur__c>();
            Warengruppen_Struktur__c tempFolder = [Select Id, Name, Parent_Warengruppe__c, RecordTypeId from Warengruppen_Struktur__c where Id =: objId ORDER BY Name];
            n.myFolders = tempFolderList;
            roleId = tempFolder.Parent_Warengruppe__c;
        n.myRoleId = roleId;
        n.myRoleName = warengruppeMap.get(roleId).Name;
        n.myParentRoleId = warengruppeMap.get(roleId).Parent_Warengruppe__c;
        n.RecordTypeId = warengruppeMap.get(roleId).RecordTypeId;
        if (parentWarengruppeMap.containsKey(roleId)){
            n.hasChildren = true;
            n.isLeafNode = false;
            List<RoleNodeWrapper> lst = new List<RoleNodeWrapper>();
            for (Warengruppen_Struktur__c r : parentWarengruppeMap.get(roleId)) {
            n.myChildNodes = lst;
        else {
            n.isLeafNode = true;
            n.hasChildren = false;
        return n;
    public static List<Warengruppen_Struktur__c> getAllProducts(Id warengruppeId){
        return allProducts;
    public static String getTreeJSON(Id userOrRoleId) {
        gen = JSON.createGenerator(true);
        RoleNodeWrapper node = createNode(userOrRoleId);
        return gen.getAsString();
    public static String getTreeJSON() {
        gen = JSON.createGenerator(true);
        List<Warengruppen_Struktur__c> wRoots = [Select Id, Name, RecordTypeId From Warengruppen_Struktur__c Where Parent_Warengruppe__c = '' ORDER BY Name];
        for(Warengruppen_Struktur__c ws : wRoots){
            RoleNodeWrapper node = createNode(ws.Id);
        return gen.getAsString();
    private static void convertNodeToJSON(RoleNodeWrapper objRNW){
        gen.writeStringField('title', objRNW.myRoleName);
        gen.writeStringField('key', objRNW.myRoleId);
        gen.writeStringField('RecordTypeID', String.valueOf(objRNW.RecordTypeId));
        gen.writeBooleanField('unselectable', false);
        gen.writeBooleanField('expand', true);
        gen.writeBooleanField('isFolder', true);
        if (objRNW.hasFolders || objRNW.hasChildren)
            if (objRNW.hasFolders)
                for (Warengruppen_Struktur__c u : objRNW.myFolders)
                    gen.writeStringField('title', u.Name);
                    gen.writeStringField('key', u.Id);
                    gen.writeStringField('RecordTypeID', String.valueOf(objRNW.RecordTypeId));
                    gen.writeBooleanField('isFolder', false);
            if (objRNW.hasChildren)
                for (RoleNodeWrapper r : objRNW.myChildNodes)
    /* // general utility function to get the SObjectType of the Id passed as the argument, to be used in conjunction with */ 
    public static String getSObjectTypeById(Id objectId) {
        String tPrefix = objectId;
        tPrefix = tPrefix.subString(0,3);
        String objectType = keyPrefixMap.get(tPrefix);
        return objectType;
    /* // utility function getSObjectTypeById ends */
    /* // check the object type of objId using the utility function getSObjectTypeById and return 'true' if it's of Role type */
    public static Boolean isRole (Id objId) {
        if (getSObjectTypeById(objId) == String.valueOf(Warengruppen_Struktur__c.sObjectType)) {
            return true;
        else if (getSObjectTypeById(objId) != String.valueOf(Warengruppen_Struktur__c.sObjectType)) {
            return false;
        return false;
    /* // isRole ends */
    public class RoleNodeWrapper {
        // Role info properties - begin
        public String myRoleName {get; set;}
        public Id myRoleId {get; set;}
        public Id RecordTypeId {get; set;}
        public String myParentRoleId {get; set;}
        // Role info properties - end
        // Node children identifier properties - begin
        public Boolean hasChildren {get; set;}
        public Boolean isLeafNode {get; set;}
        public Boolean hasFolders {get; set;}
        // Node children identifier properties - end
        // Node children properties - begin
        public List<Warengruppen_Struktur__c> myFolders {get; set;}
        public List<RoleNodeWrapper> myChildNodes {get; set;}
        // Node children properties - end   
        public RoleNodeWrapper(){
            hasFolders = false;
            hasChildren = false;
    public static String getRedirUrl(){
        Map<String, String> UrlParameterMap = ApexPages.currentPage().getParameters();
        redirUrl = UrlParameterMap.values()[1];
        return redirUrl;        
    public String getContactId()
        return Apexpages.currentPage().getParameters().get('id');


This Error occur in this line
Warengruppen_Struktur__c tempFolder = [Select Id, Name, Parent_Warengruppe__c, RecordTypeId, RecordType.DeveloperName from Warengruppen_Struktur__c where Id =: objId ORDER BY Name];
How to change this to get it working?

Any Ideas :(?

I have a Lightning Community that I would like to prevent the user from closing the window without first confirming they will lose any unsaved data.