• seahorcesolns
  • NEWBIE
  • 60 Points
  • Member since 2011
  • Principal
  • Seahorce Solutions


  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 38
    Replies
I have a class that will look at a global Account and get all of the child Account records. When it's the ultimate parent, this code is working because it only takes one query to get the Account IDs based on their GlobalUltimateDUNSNumber__c being the same as the ultimate parent's DUNSNumber__c. However, if I just want the child Accounts in the middle of the hierarchy to be related to their parent, I'm running into governor limits when the hierarchy is large. 

Is there a better way to move the Select statement out of the For Loop to iterate through the child Accounts?
 
public class OV_BAUtility {
    public static List<String> accountList{get;set;}
    public static Set<String> hAccountList = new Set<String>();
    public static Map<id,Account> accMap{get;set;}
    
    public static String getAcctIds(String id){
        String acctId ='';  
        Cache.SessionPartition sessionPartition = Cache.Session.getPartition('ovs5');
        Account acc = [SELECT id,GlobalUltimateDUNSNumber__c,DUNSNumber__c from Account where id=:id ];
        if(acc.GlobalUltimateDUNSNumber__c == acc.DUNSNumber__c){
           if (sessionPartition.get('acctid'+id)!=null && sessionPartition.get('acctid'+id)!='' && sessionPartition.get('acctid'+id)!='null') {
                acctId = (String)sessionPartition.get('acctid'+id);
           }else{
               List<Account> accLIst =  [SELECT id from Account where GlobalUltimateDUNSNumber__c=:acc.DUNSNumber__c ];
               for(Account account : accLIst){
                    hAccountList.add(account.id);
               }
               acctId =quoteId(new List<String>(hAccountList));
               sessionPartition.put('acctid'+id, acctId);
           }
           system.debug('ULTIMATE ACCOUNT----->'+acctId);
        }else{             
            if (sessionPartition.get('acctid'+id)!=null && sessionPartition.get('acctid'+id)!='' && sessionPartition.get('acctid'+id)!='null') {
                acctId = (String)sessionPartition.get('acctid'+id);
            }else{
                getHierarchyAcctIds(id);
                acctId =quoteId(new List<String>(hAccountList));
                sessionPartition.put('acctid'+id, acctId);
           }
        }
        return acctId;        
    }    
    private static String quoteId(List<String> ids){
        String idStr = '' ;
        for(String str : ids)
            idStr += '\'' + str + '\',';
        idStr = idStr.lastIndexOf(',') > 0 ? '(' + idStr.substring(0,idStr.lastIndexOf(',')) + ')' : idStr ;
        return idStr;
    }
    public static void getHierarchyAcctIds(String Id){       
        hAccountList.add(Id);
        for(Account acc : [SELECT id from Account where ParentId=:Id]){           
            hAccountList.add(acc.id); 
            getHierarchyAcctIds( acc.id);
        }
     }
}

 
From what I've read, it seems possible to use a Lightning component in Heroku.  Has anyone here done this yet, and if so, could you please explain how?
I turned off a few workflows and triggers in production last night, and then turned them back on.  I'm not sure if it is related, but now I'm getting a ton of emails saying "Delivery delayed:You have a new lead!" that are meant for Salesforce users.  Any idea what may have caused this and how I can stop it?
Whenever I try to upload files to a Chatter post in my org, it seems to take forever and sometimes I have to kill the process.  Then I'll check back on the record from other tab, and it looks like it's uploaded even though the tab I'm uploading it in is still spinning.  Anyone else having this problem?

I have a client that is looking to track their network usage by storing mac addresses in Salesforce associated with Contacts.  So whenever that Contact logs into the network (wireless typically), have the router ping Salesforce to see who they are and then track their network usage.  One option is to use something like pfSense that can do some authentication and tracking through their Captive Portal.

 

Has anyone done something like this before, and if so, would you be willing to share details?

 

Thanks!

I have a dashboard in a sandbox with a date filter on it for THIS QUARTER, LAST QUARTER, THIS MONTH, LAST MONTH.  My dashboard uses two different custom objects for the 5 components it contains.  When the dashboard is filtered on THIS MONTH, it works fine for all the components except one.  When I change the filter to THIS QUARTER, the components change their appearance to reflect different data, but the refresh icon keeps spinning and never completes.

 

I found a SF knowledgebase article that said if I don't have access to all the fields on those objects, this could cause a refresh to not finish.  I have an System Admin profile and have access to all the fields on these objects, so that's not the reason.  It also seems that I didn't have this problem before the sandbox was upgraded to Summer '13.  

 

Anyone have any ideas what might be the problem?

When I try to migrate a joined report from my sandbox to production, I get the following error "Error parsing file: The prefix "xsi" for attribute "xsi:nil" associated with an element type "blockId" is not bound."

 

Anyone know what this error is caused by?

Is anyone using the Bing map within Salesforce?  If so, where did you get the images to use as the pinpoints for locations?

I created a customer portal that allows for self-registration.  The New User Registration email should come from a business owner, not me.  I have changed the portal owner and the author of the "Customer Portal New User Login Information" email template to that user, but the email is still coming from me.  Any ideas where I change this?

I' trying to encode a free text field for special characters to include in an XML feed.  What's the best function to do that, 

EncodingUtil.urlEncode(field_value, 'UTF-8')?

Recently changed an email from HTML to Visualforce, but need to track open rates for that email. I know HTMl emails come with tracking code embedded.

 

Is there a way to track open rates for Visualforce email templates within Salesforce?

I am trying to execute DML to insert a task and update a record in a class called by a Visualforce email template/Component, so I added AllowDML="true" to the Component. However, when my VF email is sent, I'm getting the "This Message has no Content" when I include the DML code.

 

Right now, I have the DML commented out in the class and the email comes out fine, with all of the data I need.  Any suggestions on how to execute DML properly when called by a Component so my email is ok and records are updated properly?

I created a button on the Task object that will create a VF page rendered as a PDF to print out the task details.  The Comments field comes out smooshed together in plain text instead of the format shown on the task detail page.  Is there any way to keep the formatting in the VF page?

Hi,

 

I have a VF page that I'm using as a component on my dashboard.  The data often exceeds to the pixel height that I set in the dashboard component options, but I don't want to increase the height of the component window.  Instead, I want to all the VF page to scroll within the dashboard.  Any ideas on how to do that?

 

Thanks for your help!

I have a Site that displays my products through VF pages.  How can I go directly to a certain product page from another web page that is not part of my Site?  The URL is masked, so I'm not sure what the call should be.

 

Thanks!

I'm using a Site as a custom login page for my customer portal.  I'm able to login and redirect the user to the /home/home.jsp page to get to the customer portal home page, but I'm getting the error message page instead of my custom home page (VF page).  It says "https://mycompany.secure.force.com/portal/ is under construction".  When I login via the portal URL, I don't get this error page.  I checked all of the class and VF page permissions for the portal profile.

 

Any ideas what could be wrong?

I have a VF page that I am using custom settings to return the field names of sobjects.  Now I want to use those field names as input fields on the page to allow users to enter values in them so that I can filter my data by those values.  Is this possible?

 

Right now I'm just getting the names, but can't figure out what method to use to get a field as an input.

 

Any ideas would be appreciated.

I turned off a few workflows and triggers in production last night, and then turned them back on.  I'm not sure if it is related, but now I'm getting a ton of emails saying "Delivery delayed:You have a new lead!" that are meant for Salesforce users.  Any idea what may have caused this and how I can stop it?
I have created the code via the Chat Button design, but am unable to add it to the current Communities page. Community Builder does not allow anything be added in, and Site.com does not allow the template to be edited (as it mentions the page is a Lightning template.) Lightning Components can be built, but do not allow for this sort of scripting. How does something scripted get added via Community Builder or Site.com Studio?
I'm running into a lot of issues uploading changesets to my other sandboxes or production
I get an error similar to this

The following outbound change set upload failed due to a system error:

Change set: 2014-04-15 (04tS00000001Nls)
Organization: staging (Developer Pro Sandbox) (xxxxxxxxxxxxxxxxxxxxxxxxxxxx)
User: xxxxxx xxxxxxx (xxxxxxxxxxxxxxxxxxxxxxxxxx)
Error Number: 1876945623-22397 (152101301)

I realize that some sandboxes and production instances are on Spring 14 and some are still on Winter 14.
I have checked the areas that I'm trying to deploy to, they are both on Winter 14 and my production instance is still on Winter 14.

The items I am deploying consist of:

Custom fields
Page Layouts
One workflow rule
One field update

I have attempted to upload the change set without the workflow rule and field update, and it still fails.

Does anyone have any insight into this? Do you need more information about my changeset?
  • April 16, 2014
  • Like
  • 0
I turned off a few workflows and triggers in production last night, and then turned them back on.  I'm not sure if it is related, but now I'm getting a ton of emails saying "Delivery delayed:You have a new lead!" that are meant for Salesforce users.  Any idea what may have caused this and how I can stop it?
Whenever I try to upload files to a Chatter post in my org, it seems to take forever and sometimes I have to kill the process.  Then I'll check back on the record from other tab, and it looks like it's uploaded even though the tab I'm uploading it in is still spinning.  Anyone else having this problem?

I want to create a custom application that has an i-frame inside of the Salesforce contact tab. Basically whenever a CRM user accesses one of their contacts, they will see all of the usual fields from the Contacts tab plus my i-frame.

 

I tried editing the Contacts tab but was not able to figure out where to click to change the VisualForce.

 

Does Salesforce not allow me to edit their contacts tab? Do I need to create a custom tab inorder to add in the i-frame?

 

thanks in advance,

Nick

We are looking for a programmer who can help us come up with a custom solution to automatic invoicing and payment tracking. This project will take some creativity. If all goes well, we will continue to use your services to improve and make changes to other aspects of our CRM.

 

Email Steven Caiazza at scaiazza@andersonadvisors.com with your fee and contact info if you are interested.

I created a customer portal that allows for self-registration.  The New User Registration email should come from a business owner, not me.  I have changed the portal owner and the author of the "Customer Portal New User Login Information" email template to that user, but the email is still coming from me.  Any ideas where I change this?

Hello,

 

Our company is in need of a Salesforce Consultant. We have a small group of Salesforce users. And needing some assistance in Salesforce.

 

  • Help Create New Workflow Rules. (Must have experience).  
  • Help on an existing Application. (Developing experience).
  • Evaluate and set up best practice.
  • Help automate web leads. (We have a system set up we are looking to automate).
  • Management to be able to track sales team.

Please respond if you are a Salesforce Consultant and can start immediately. 

 

Thank you,

SC

 

 

  • November 16, 2012
  • Like
  • 2

Approval assignments currently go:

 

·         Step: PSE Resource Request Approval Project Profitability (>15%) GOOD

 

·         Step: PSE Resource Request Approval Contract Compliance GOOD

 

·         Step: PSE Resource Request Assignment Creation (WHY???).

 

I'm copied on these now and I'm getting bombarded on this last step.  Once approved the first two times, can we not have it automatically approve the assignment creation?  What is the purpose of the need for approval on this step?  Seems we can obtain contract compliance approval and automatically approve assignment creation?

I've tried everything to get the Force.com IDE to install on my Win 7 x64 machine, but keep getting an error half way through the installation of the Force.com IDE, this is the error I am getting:

 

An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Problems downloading artifact: osgi.bundle,com.salesforce.ide.api,25.0.0.201206181021.
MD5 hash is not as expected. Expected: cfe2af79a543696580b0dc8120ae63ea and found 8ebd7445cd1799e92b9b0b1a2af575d6.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.core,25.0.0.201206181021.
MD5 hash is not as expected. Expected: 2850ffbb014faaf022bbb32f146ee699 and found 9a0338aad0f011df27ce92f25b63d49d.
Problems downloading artifact: osgi.bundle,com.salesforce.ide.documentation,25.0.0.201206181021.
MD5 hash is not as expected. Expected: 314d2f02d4c7e63caaff7feff76dcd87 and found aa82ca586f82d4b5986b53a802a999e0.

 

Can anyone help?

I am developing a report which need to have two custom fields on x-axis , as i am new to salesforce- not able to crack the solution...whether is it possible or not??????

 

Please I need urgent help..

 

Regards,

Rookie.

I'm currently trying to research if there is a way to update my organization's Lead assignment rules so that incoming Leads only get assigned to users who are logged in.

So far, I've had no luck though. Has anyone had a similar problem or knows how to resolve this?

I am getting this error in a Apex/Visualforce page/controller.

 

Unable to retrieve object

 

I am trying to use Page.PageName.getContent() in my controller. This code works well and fails randomly for this error, with same inputs and same state.

 

Please suggest a fix, tried searching on discussion boards, its mentioned that this error only comes in Apex test cases. But for me its coming in normal visualforce page controllers, and the pain is its coming randomly.

 

Please help !

Hi,

 

The company I work for wants to create an online shopping tool/order form and the suggestion is currently to use the Salesforce Customer Portal or perhaps the Sites section.

 

Ideally, the order itself would go into Salesforce as a Opportunity or Quote and the products as line items to one of those objects. However, we are 99% certain that its not possible for a portal/authenticated site user to access these objects (even via an Apex script) since portal/site profiles do not provide access to these objects. Our current thought of a workaround is to simply duplicate the objects so we have our own custom versions of them. Even though this would work, it seems a bit odd that we are creating custom objects for something that Salesforce provides for you as standard. 

 

If anyone has any suggestions or tips on how to go around this, we would love to hear them.

 

Thanks

Warren