• OneNewbie
  • NEWBIE
  • 5 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 18
    Replies
Hopefully I can get some help here. I created this trigger to update the account name under contact. This code runs ok when I do single record insert and update. It also works ok when I do batch inserts. However, it will not do updates when I run batch updates. Am I missing something? Why would it run ok under batch insert but not batch update? Thanks for your help.

trigger updateContact on Contact (before insert, before update) {
    Set<String> acclist = new Set<String>();
    Map<String, Account> accountlist = new Map<String, Account>();

    for (Contact c : Trigger.new)
    {
        if (c.lookupAccountName__c != null)
            acclist.add(c.lookupAccountName__c);
    }   

    if (acclist.size() > 0)
    {               
        for (Account a2 : [Select Id, Name from Account where Name in :acclist]){
            if (a2 !=null)
                accountlist.put(a2.Name, a2);
            else
                accountlist.put(a2.Name, null);
        }
    }   

    for (Contact c : Trigger.new)
    {
        if (c.lookupAccountName__c != null) {
            if (accountlist.get(c.lookupAccountName__c) != null)
                c.AccountId = accountlist.get(c.lookupAccountName__c).Id;
        }
    }   
}
I have a few flex controls embedded in Salesforce (Accounts and contacts). They used to work fine until recently. Now anytime a user goes to where the flex control is, they see a black box. If you hover the mouse over the control it shows "Click to activate and use this control." If I click on it then the flex control shows up and displays the data. This does not seem to be an issue with Firefox but only with IE6. Anyone else has experienced this? Any pointers on how to fix it?

Thanks
I created my first trigger and test class in my developer's account. I got the coverage and no issues when testing. I decided to deploy the trigger to our sandbox so some of our users can test it out before we push it out to production. When I do the 'deploy to server' from my developer account, everything goes fine. Trigger and test class is pushed into sandbox. However, if I run the test in Sandbox with the test class I pushed from my developer account I get an assert which I didn't get on my developer account. Any ideas why it would work on my Developer account but not in Sanbox?

Thanks
Not sure if this is possible but if it is please let me know.
 
I created a few custom objects with page layouts. I will like to instead of using a custom tab per custom object page layout (due to the 25 custom tab limitation), to write an scontrol to call each page layout depending on what the user needs. User will see a selection (page 1, page 2, page 3...) and then select. I can do this with scontrols by calling another scontrol from an scontrol. But how can I call a custom object page from a scontrol that is not attached to a custom tab?
 
Thanks in advance.
 
This may have an easy answer but unfortunately I haven't been able to figure it out.
 
Is there a way to prepopulate an scontrol? I have an scontrol with a bunch of fields. The scontrol is hosted on a custom tab.
 
Any ideas?
 
How do i populate for instance field1 using the URL?
 
 
Thanks.
I have developed a custom search scontrol that is embedded on a custom tab. When the user enters the search criteria and runs the query the result is a report that has the filters allocated according to what the user enters. This works great. The problem I am encoutering is when the user clicks on the BACK button in IE they are expecting to go back the custom tab. However, this does not happen right now. I have tried attaching the following to the URL when the query is submitted "&retURL=/servlet/servlet.Integration?lid=01r4000002300zc8". This does not seem to work. I have tried a few things but it is not quite working.
 
Any ideas appreciated.
 
Thanks
 
PS. Dreamforce was awesome!!! Can't wait for Winter '07 release.
I am using an s-control to create an advanced customizable search function. To display the results I call a predefined report. I use it as /02030304020?pv0=SOMESTRING where I have one filter set to a string. This seem to work ok.
 
Now if I have a boolean filter such as /02030304020?pv0=SOMESTRING&pv1=True, then this brings the report "Select Criteria" page where the entry on the boolean filter says 'Error: Use "False" or "True" '. In the actual field you can see "True" as it is expected. If I don't do anything and simply click the Run Report the report runs ok.
 
I don't want the user to have to click Run Report but I just want the report to run. Like I said, if there are no booleans it seems to run without the need to click on Run Report but if there is a boolean then it won't let me go directyly to the report due to the error.
 
Anybody has a solution for this problem? Thanks.

Is it possible to create a link (where we could put an explanation of all the fields on the form) on the “New Case page layout” or “New Account page layout”? For the most part users will be trained but we would also want to give anyone the ability to click on a link or button that will bring up an HTML file of the explanation of the fields in case they forget the purpose of the field. I know we can add a custom link on EDIT mode but we need to add a link when they are creating the case or account.

 

Thanks..     

I am trying to figure it out if it is possible to add the "i" icons ("mouseover" pop up)  taht show up when adding fields to our custom applications. This would be the "context sensitive help" in the forms.
 
Any ideas? Is it possible?
 
Thanks
Hi,
I am very new to this salesforce thing and appexchange ( 3 day on the job). I've been reading a lot of the documentation but I can not figure it out how to automatically schedule (daily or weekly) reports in salesforce. My boss wants a way to be able to automatically run reports without human intervention. Can anyone tell me if this is possible and guide me in the right direction?
 
Thanks

I have been trying to get outlook to sync with my salesforce account, and it has been very frustrating.  Despite repeated attempts I get the error "Failed to log into Salesforce.com"

 

I have check my username and password probably 50x now to make sure I am not crazy.  Could it be in issue with a firewall or exchange?  How can I fix this?

  • April 21, 2010
  • Like
  • 0

I have been told that 1 million is the optimal limit for records in an object but not what exactly this means and I cannot find this very important topic discussed in any of the documents.  

 

My questions are: 

1) How bad is this performance hit as you pass one million? 

2) Is the performance hit exponential?  (ex: after 1 million you see a 1% slow down but after 2 million you see a 10% slow down)

3) Is there a hard limit?

 

I cannot find this information anywhere and it is very important as my client will be going over a million records within 20 days and does not have a purge plan in place.

 

 

Message Edited by Redfin on 07-31-2009 10:09 AM

I am using <apex:inputField> tag in a Visualforce page to render a User lookup field on a custom object. However, unlike the standard Edit screen the VF page doesn't render the picklist that's in front of the lookup fild which promts for type of user (User or Partner User). Basically, no partner users can be selected from the VF page.

 

Is this a known limitation of inputField component? Or am I missing a setting of some sort?

 

Thanks in advance.

 

 

I have a trigger set up on an object to trigger after an update.  If I do the update manually it works just fine.  However, if I do a mass update using the Data Loader the trigger doesn't get invoked.
 
Is there a way to force the trigger while using the Apex Data Loader?
  • November 18, 2008
  • Like
  • 0
Hopefully I can get some help here. I created this trigger to update the account name under contact. This code runs ok when I do single record insert and update. It also works ok when I do batch inserts. However, it will not do updates when I run batch updates. Am I missing something? Why would it run ok under batch insert but not batch update? Thanks for your help.

trigger updateContact on Contact (before insert, before update) {
    Set<String> acclist = new Set<String>();
    Map<String, Account> accountlist = new Map<String, Account>();

    for (Contact c : Trigger.new)
    {
        if (c.lookupAccountName__c != null)
            acclist.add(c.lookupAccountName__c);
    }   

    if (acclist.size() > 0)
    {               
        for (Account a2 : [Select Id, Name from Account where Name in :acclist]){
            if (a2 !=null)
                accountlist.put(a2.Name, a2);
            else
                accountlist.put(a2.Name, null);
        }
    }   

    for (Contact c : Trigger.new)
    {
        if (c.lookupAccountName__c != null) {
            if (accountlist.get(c.lookupAccountName__c) != null)
                c.AccountId = accountlist.get(c.lookupAccountName__c).Id;
        }
    }   
}
Hi All,

I want to replicate the Clone button as much as possible but with a few changes and I'm not sure how salesforce have done it.

When you click clone now you are taken to a copy of the object in edit mode. Has the copy actually been created at that point and we are just editing or are we just in a 'new' object window?

Also some of the Opportunity custom fields I have made read-only for certain users but I've noticed that clicking clone will still populate those fields in the new object. When I tried to replicate that behaviour I am told that I don't have permission to edit those fields. How does the default Clone button get around that issue?

TIA

Ben
I have a few flex controls embedded in Salesforce (Accounts and contacts). They used to work fine until recently. Now anytime a user goes to where the flex control is, they see a black box. If you hover the mouse over the control it shows "Click to activate and use this control." If I click on it then the flex control shows up and displays the data. This does not seem to be an issue with Firefox but only with IE6. Anyone else has experienced this? Any pointers on how to fix it?

Thanks
I'm building a flex based Scontrol and I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.utils::URLUtil$/getProtocol()
    at com.salesforce::Connection/::_invoke()
    at com.salesforce::Connection/::invoke()
    at com.salesforce::Connection/query()

Any ideas?

Any ideas on a better way to debug that will give more specific error messages?

GlennW
Hi
 
My company has requirements for few positions on SFDC Administrators - with S-control Knowledge(Full Time). Positions are at RTP-NC and San Jose-CA.
 
The person should have at least 2 years of experience in SFDC.
 
Please reply.
 
Thanks
Jay 123

Hi

I don't know what is the problem in the following query. I am getting "Expected identifier" error...

Can anyone help me find this?

Thanks

Muthu.

<html>
<head>
<script type="text/javascript" src="/soap/ajax/8.0/connection.js"></script>
<script type="text/javascript">

function init()
{
 deleteRecords();
}
function deleteRecords(fkId)
{       
    var sql = "Select Id FROM myEntity Where fkId__c = '" + fkId + "'";
   
    var qr1 = getRecords(sql); //getRecords returns queryResult...and I am getting records

    if (qr1.length > 0)
    {
 var p_ids = new Array(qr1.length);
    
 for (var i = 0; i < qr1.length; i++)
 {
  var record1 = qr1[i];
         p_ids[i] = record1.Id;        
 }    

        var p_csr = sforce.delete([p_ids]);
    }         
}

</script>
</head>
<body onload="init()">
<p>&nbsp;</p>
</body>
</html>

I am new to Salesforce and just finished customizing the first phase of our org.  I have some issues I am trying to circumvent relating to printable views of SF records.  I would ideally like to be able to create some way of printing records without using SF reports.  I do not like the format of these reports and have other reasons for wanting to print records.  I am not using this as a Sales application, but rather have customized it for a clinical research oriented company.
 
Someone I had talked to had mentioned using mail merge to provide another view of the records, or using S-controls to create the view I am looking for.  I have limited knowledge of Java, but have a roomate who is willing to help who is a Java Software Developer. 
 
I am trying to find some basic information on how to write S-Controls using Java but cannot seem to find any.  Does anyone have any links or information that can help me?  or have any other ideas about how I can print records without having to use a printable view?  I could probably export to excel but would need to be able to specify which cells the particular records are going to go to, and also need to format the sheet to my specifications.  Any help that anyone can offer me would be greatly appreciated. 
 
Thanks,
 
Joe
Can I send an email through Scontrol? On running SControl I want to send email notification to specific users....
Can it be done usinf SControl?
If Yes then how?
 
Waiting for reply.
 
Ragards
Vaishali.
 
 
Hello,
 
i am looking for an s-control that i found out about at dreamforce, that updates records in sf.com using excel, can anyone point me to it.
 
thanks,
 
sal troiano
(609) 520-7189
I am using an s-control to create an advanced customizable search function. To display the results I call a predefined report. I use it as /02030304020?pv0=SOMESTRING where I have one filter set to a string. This seem to work ok.
 
Now if I have a boolean filter such as /02030304020?pv0=SOMESTRING&pv1=True, then this brings the report "Select Criteria" page where the entry on the boolean filter says 'Error: Use "False" or "True" '. In the actual field you can see "True" as it is expected. If I don't do anything and simply click the Run Report the report runs ok.
 
I don't want the user to have to click Run Report but I just want the report to run. Like I said, if there are no booleans it seems to run without the need to click on Run Report but if there is a boolean then it won't let me go directyly to the report due to the error.
 
Anybody has a solution for this problem? Thanks.