• PRO
  • 2863 Points
  • Member since 

  • Chatter
    Feed
  • 92
    Best Answers
  • 0
    Likes Received
  • 4
    Likes Given
  • 0
    Questions
  • 1386
    Replies
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:
Contacts:
        1. xxxxxxxxxxx
        2.xxxxxxxxxxxx
Opportunities:
        1.xxxxxxxxxxxx
        2.xxxxxxxxxxxx

Account name2:
Contacts:
        1. xxxxxxxxxxx
        2.xxxxxxxxxxxx
        3.xxxxxxxxxxxx
Opportunities:
        1.xxxxxxxxxxxx
​        2.xxxxxxxxxxxx
.
.
.
..
adn so on......
How to achive this........
please some one help me..
Thanks in Advance...........
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">
    
    blueText{color:blue;}
    
    </style>
    
    
<apex:form >
    <apex:pageBlock>
<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} "/>
      
      
    </apex:detail> 
        </apex:pageBlocksection>
   </apex:pageBlock>
    </apex:form>    
    
</apex:page>
  • 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.. 
Hello,

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 !
Q object's Child Object is QLI, related by Master-Detail relationship. OLI has child object OPLI, related by Master-Detail.
I am adding Products against one OLI and it is creating multiple records into OPLI.

Now I want to create PDF of a Q object's record with its related QLI and each QLI Object's OPLI records.

Can anyone help me with Apex Code Please.
Can we migrate meta-deta and also transactional data between two orgs which are on different editions? Mainly between Enterprise edition org and unlimited edition org.

How to achieve this and what could be the limitations?

We are trying to cut down our client's expenses and want our developers to work on Enterprise edition while real user will work on unlimited edition.

Is there any other alternative to cut down expenses for the project where developers are engaged?
 
Hello,

I created a custom object . currency is a default standard object with default currenc as USD.
I use this object in various objects, products, pricebook, etc. is there any impact ?

thanks for replying
  1. Create a custom field on Case object - Order__c (Lookup to Order)
  2.  Implement an Inbound email handler to parse the Subject and Body of an incoming email and search for the order number. In order to match a specific format, regex must be used.
  3.  If order number was found, search the Order record based on the number (using dynamic SOQL) and associate it with the case (populate Order__c with the Salesforce ID of the Order).
  4.  When the order number is found, add it to debug log using System.debug(…). Also use Limit class in order to monitor the number of queries and DMLs in a transaction (https://developer.salesforce.com/page/Best_Practice:_Use_of_the_Limits_Apex_Methods_to_avoid_Hitting_Governor_Limits).
Hi, 

I cannot find the button for switching to lightning version. Could anyone help? Thanks. 

Best regards, 
Carrie
1.  Create a batch class that summarizes all Opportunity Amounts for each Account;
2.  An email should be sent to the primary contact of all Accounts, containing a table with the Closed Won/Open/Closed Lost summarized Opportunity Amounts;
3.  Schedulable class that calls the batch class should be created;
4.  The class should be scheduled from the Developer console. Please provide script to schedule the job daily at 10:00 AM, once a week (Friday at 1:00 PM), once a month(Last Friday of the Month at 6:00 PM).

Hello guys, I'm trying to add the feed that we have in SF to the homepage of my community.
User-added image
I did my research and find that I would need a visualforce page.
I've try:

1.<chatter:feed entityId="{!$User.Id}"/>
2.<chatter:newsfeed/>

But all that I get was that
User-added image

An empty box.

How can I solve this?

 

Hi !
I am using the Einstein Vision API for text classification, everything works like a charm, except when I try to get the information about the model.
Basically all the routes seem to work except this one : 'https://api.einstein.ai/v2/language/models/model_id' which returns an invalid access token error for no reason (since everything else is working with the exact same token).
Is there any kind of privilege level or am I missing something ?
Thanks for the help :)
 
Unable to complete the challenge as getting error "Challenge Not yet complete... here's what's wrong: 
Could not find the 'Salesforce1 for Android' Connected App with the specified settings"
May be challenge not updated. I am only getting 'salesforce for Android' not 'Salesforce1 for android'.not getting Salesforce 1 for android in connected app.
How would I create Auto Number field with Formula that counts all opportunities with the source field as recurring? (Starting over for each account)

IF an account contains an opportunity with the source field value of “Recurring”, apply generate auto number

IF example account is Costco
Opportunity 1 – Source: One-Time N/A
Opportunity 2 – Source: Recurring (Auto Number: 1)
Opportunity 3 – Source: Recurring (Auto Number: 2)
Opportunity 4 – Source: One-Time N/A

IF the next example account is Walmart
Opportunity 1 – Source: One-Time N/A
Opportunity 1 – Source: One-Time N/A
Opportunity 2 – Source: Recurring (Auto Number: 1) *Notice there are 2 accounts with the number one
Opportunity 4 – Source: One-Time N/A

Thank you for your help! I sincerely appreciate it.
We have created an user with no password expire for CLI Data Loader . Recently the server changed where the data loader was installed. 
CLI dataload has stop working and is throwing an error ''Failed: API security token required". What is the reason for this error . All the post so far I have read is asking to reset the Security token but for this user the password was not changed ever . Is it possible that the security token changed even without changing password?  
Using Global picklist, to create a custom field on Account and Contact object. So whenever i save a picklist value in Account object, it should show similar value in Contact object. Any suggestions on how do i accomplish this? 

Global Picklist = Subjects Test

Picklist Values = English, French, Japanese
Hi ,

1--How to create a session and cookie in salesforce ?
I want to integrate Salesforce with some website from which I want to get some data. According to that website API, we have to create Sessions and then other working. I have searched for sessions in salesforce but have not found any related information that makes me clear about it. So please give me some right direction to get my answer.

Thanks
I am not able to see the "Service Setup" in my Developer Org. 
How to get user's login/logout time, visited url, action in the page, and so on?

Hello, I'm new manager of salesforce site and looking for  management methods of user behavior. I'm now using salesforce developper edition, but I hope to use enterprise edition some time soon. 
Because to manage user, I must know when user logged in/logged out, what pages were visited by the user, what buttons/actions were selected by the user.

1) What report can I use to get above items?
2) Can I use the report by developper edition?

Best regards,
a2z 
  • December 12, 2017
  • Like
  • 0
Hi All,
Is it possible to call the List custom settings in formula field? How to call the list custom settings in apex triggers?

thanks,
Mk
I am in integration of quickbook with salesforce. I found that client is using desktop version of quickbook. Can anyone tell me how to integrate salesforce with desktop application.
When I log in to : Trailhead.salesforce.com . I have been using the option : ':Log in with Facebook'. And I have a connected org with a username different than my facebook username. I have over 37000 points in Trailhead and around 28 badges. I do not want to change anything. I just want to log in to trailhead in my same account with everything same but without using the 'Log In With Facebook' option. I want to use the : "Log in with Salesforce"

Is there any solution?
Hi All
How can i customize a custom Theme layout for community portal uisng lightning component
Hi All 
I have a requirement for creating multiple child object whne parent is created .I have 4 object(object1,object2,object3,object4).
object1 and object2 with lookup relationship(object1 has mora than object2 record)
Object3 and object4 with lookup relationship.
Object1 and object3 also has relationship.
Requirement is when i am going to create object3 record with lookup field value(object1).its multiple child record  will populate in object4 .

How can i achive this uisng triiger ....
how can I open my Trailhead playground?
how to get object manager tap?
Just installed Eclipse and Force.com IDE, but not able to create a new Force.com project because I cannot login.
I followed instructions here https://developer.salesforce.com/page/Force.com_IDE but it does not mention custom domains, so I chose "Other" for environment then entered my login url, but that did not work.

User-added image
Does anyone know how to replicate a dependent picklist in a flow?
I've read instances where people suggest it has to be done over two screens. I've added the controlling field to the first screen, and the dependent to the second, but the dependent piclist is not respecting the dependencies set at the object level.
Both picklists on the flows are using the PIcklist Choice option and I've selected the corresponding picklist from the object.

​Many thanks
Having the same issue as Chris but my custom settings is with the correct email address and location profile = system admin. The einstein vision  package was successfully installed and I also validated the previous challenge about setting up the einstein account so really not sure what s missing here. Any idea ?
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:
Contacts:
        1. xxxxxxxxxxx
        2.xxxxxxxxxxxx
Opportunities:
        1.xxxxxxxxxxxx
        2.xxxxxxxxxxxx

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

Q). What are the issues or errors we are facing at the time of writing  visualforce pages and apex classes?
Kindly reply to this post .......

Regards
Lakshmi
We have a managed package that comes with custom activity fields, we would like to know what our  options are to remove custom activity fields and possibly have those fields entered into a custom table. what are our options?
Hi,

I'm an engineer in the Heroku org, and we'd lilke to get some info on how to create Trailhead modules. Where would we find some sort of overview or HowTo Guide for creating Trailhead content/modules?

Chris
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?

Thanks.
  • December 07, 2017
  • Like
  • 0
I have two record types for Event and I need to disable Recurring Events for one of the record types. Can we do it without writing a code?
i have created 2 account tabs. one is custom & another one is standard. in custom tab, list view is restricted. in standard tab all the list views are available. standard tab is hidden for the profile & custom tab is visible to profile. in this scenario, global search is not working. 
Hi,

I've created a flow (custom clone button) in which whenever the end user clicks on a closed won opportunity a new opportunity is created with stage prospecting. For testing reasons i created a formula which names the opportunity "renewal testing". How can i use a formula which will take the year of the closed date and put it in the opportunity name? (in other words rename the opportunity "Renewal 2017" .

User-added image
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
Hello,

 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);
        init1();
        gen = JSON.createGenerator(true);
        // initialize helper data for getRootNodeOfUserTree function
        init2();
    }
    
    /* // 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]) {
            if(String.valueOf(wsc.get('DeveloperName')).contains('Ordner')){
                folderId = String.valueOf(wsc.get('RecordTypeId'));
                folderName = String.valueOf(wsc.get('Name'));
            }
            if(String.valueOf(wsc.get('DeveloperName')).contains('Endpunkt')){
                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>();
                tempList.Add(r);
                parentWarengruppeMap.put(r.Parent_Warengruppe__c, tempList);
            }
            else {
                tempList = (List<Warengruppen_Struktur__c>)parentWarengruppeMap.get(r.Parent_Warengruppe__c);
                tempList.add(r);
                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];
                tempFolderList.add(tempFolder);
                if(tempFolderList.size()== 1){
                    if(tempFolderList[0].RecordType.DeveloperName.contains('Ordner')){
                        n.hasFolders = false;
                        n.myFolders = tempFolderList;
                        n.isLeafNode = false;
                        allProducts.addAll(n.myFolders);
                    }
                    else{
                        n.hasFolders = false;
                        n.myFolders = tempFolderList;
                        n.isLeafNode = true;
                        allProducts.addAll(n.myFolders);
                    }
                }
            }
        }
        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];
            tempFolderList.add(tempFolder);
            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)) {
                lst.add(createNode(r.Id));
            }           
            n.myChildNodes = lst;
        }
        else {
            n.isLeafNode = true;
            n.hasChildren = false;
            
        }
        return n;
    }
    
    public static List<Warengruppen_Struktur__c> getAllProducts(Id warengruppeId){
        createNode(warengruppeId);
        return allProducts;
    }
    
    public static String getTreeJSON(Id userOrRoleId) {
        gen = JSON.createGenerator(true);
        RoleNodeWrapper node = createNode(userOrRoleId);
        gen.writeStartArray();
        convertNodeToJSON(node);
        gen.writeEndArray();
        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];
        gen.writeStartArray();
        for(Warengruppen_Struktur__c ws : wRoots){
            RoleNodeWrapper node = createNode(ws.Id);
            convertNodeToJSON(node);
        }
        gen.writeEndArray();
        return gen.getAsString();
    }
    
    private static void convertNodeToJSON(RoleNodeWrapper objRNW){
        gen.writeStartObject();
        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)
        {
            gen.writeFieldName('children');
            gen.writeStartArray();
            if (objRNW.hasFolders)
            {
                for (Warengruppen_Struktur__c u : objRNW.myFolders)
                {
                    gen.writeStartObject();
                    gen.writeStringField('title', u.Name);
                    gen.writeStringField('key', u.Id);
                    gen.writeStringField('RecordTypeID', String.valueOf(objRNW.RecordTypeId));
                    gen.writeBooleanField('isFolder', false);
                    gen.WriteEndObject();
                }
            }
            if (objRNW.hasChildren)
            {
                
                for (RoleNodeWrapper r : objRNW.myChildNodes)
                    
                {
                    convertNodeToJSON(r);
                    
                }
            }
            gen.writeEndArray();
        }
        gen.writeEndObject();
    }
    
    /* // 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 :(?

Thanks
Peter
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.