• cmark
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 40
    Questions
  • 32
    Replies

Hello.  I keep getting the error above when trying to work with the Big Cloud app.  I can't figure out what i'm missing.  I have put the Id of a legit Account in the Apex class, the admin user (and owner of the aforementioned account) has an assigned Role, all of the permissions are set, etc.  One note, i had to go through the process of cloing the Profile because i couldn't edit the permissions on the existing Profile.  The setup documentation said that this should only happen if the portal wasn't enabled before the app was installed, but i've even when the portal is enabled first, i have to clone the role...

 

What else could i be missing??  

 

Oh - so my process is to go to the login page, click for new registration, enter my info - and the page just refreshes (no error message or anything).  i get an email with the info about the invalid accountId value...

 

Thanks for your time.

chris 

  • February 04, 2010
  • Like
  • 0

I have an opportunity that is owned by someone other than me.  When I hit the clone button, i see the edit screen for the new opportunity - and the owner is set as the owner of the original opp.  however when i hit save, the owner is set to me.  Is there a way to change this behavior?  I want to clone the opp and maintain the owner.  (I also think it's odd that it shows one owner on the edit screen, but a different owner when the record is saved.  am i missing something?)

thanks

chris

 

  • November 05, 2009
  • Like
  • 0

Hello.

 

I'm having an odd issue with test code for a trigger.  In short, I want to insert an Opportunity, then update that same Opportunity with one changed field.  Snippet of code is below...

 

        Account acct1 = new Account(Name = 'opptriggertestacctname');
        insert acct1;
       
        Opportunity opp1 = new Opportunity(Name = 'opptriggertest_oppname1'
                                            , AccountId = acct1.Id
                                            , StageName = 'stage1'
                                            , CloseDate = Date.today()
                                            , Type_Of_Sale__c = 'Exclusive'
                                            , Authorized_Initials__c = 'cm');
        insert opp1 ;

 

         Opportunity retOpp = [SELECT Id
             FROM Opportunity WHERE Id = :opp1.Id LIMIT 1];
         
         retOpp.StageName = 'Closed Won';
         update retOpp;        

 

 

Error: DmlException: Update failed: First exception on row 0 with id 006...; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Business ID for ... is missing or invalid.

 

Gives me a line number - it's the line where i'm attempting to do the update.

 

I don't have any validation rule that matches that message.  What is Business ID?  One additional note: if I remove the retOpp.StageName = 'Closed Won'; line - and just do the update, it doesn't fail.  (But then it doesn't provide any coverage...)

 

Any help is greatly appreciated.  I've never had this issue before...

 

Thanks

Chris

 

 

  • April 06, 2009
  • Like
  • 0

Hello.  I have some automated Data Loader processes that generate CSVs - the CSVs are then processed elsewhere.  A few fields are being removed from one of the processes.  However I'd rather not make all of the changes downstream.  So I want to continue to generate CSVs that have the same number/order of columns - but the values will be constants for the fields that are being removed from SFDC.  Is there a way to do this?  (In standard SQL, I would just create an alias field - SELECT Id, Name, "empty" as Revenue_Qualifier FROM...)

 

How can I accomplish the same thing in SOQL?  

 

Thanks

Chris

  • February 05, 2009
  • Like
  • 0
So I have an Opportunity which could potentially have over 100 line items.  I have a trigger that updates all Line Items (actually all related products - long story), when the Opportunity is updated to Closed Won.  Works perfectly up to 100 records, then fails.  So I updated the code to use the @future, only to learn that you can't pass Lists to @future methods.  So what's the solution to this?  I found several posts on these forums about this, but I haven't seen an answer to this.  Is this just an absolute limit and there's nothing I can do about it?

Thanks
Chris
  • January 16, 2009
  • Like
  • 0
Hello.  I have a few VF pages on a site and everything works smoothly for me.  Someone else is testing the pages and she consistently gets the following error when she tries to browse to the first VF page (it's a fairly simple page - it mostly just duplicates the Account Edit page):

Connection Interrupted
The connection to the server was reset while the page was loading
The network link was interrupted while negotiating a connection.  Please try again.

Has anyone seen this?  My only guess is the time it takes to load the page for her - I told her to repeat the process 10 times and let me know how long each test takes.  She said for that series of tests, it took an avg of 30 seconds before the error appears - so maybe it's just a timeout.  But why?

Any ideas?  Thanks for your time.

Chris

  • January 16, 2009
  • Like
  • 0
Hello.  I'm using the Data Loader (v14) in batch mode - extracting data from SFDC and inserting into a DB.  Works fine, but it's not generating success/error logs.  I've tried each of the following elements in my process-conf.xml file - what am I missing?  (opening and closing brackets are removed below so there's no issue with display...)

entry key="process.statusOutputDirectory" value="C:\proj\client\data\testDL"/
entry key="process.outputError" value="C:\proj\client\data\testDL\er.csv"/

Thanks for your time.
chris
  • January 04, 2009
  • Like
  • 0
Hello.  I'm using the URLFOR() function in a VF page.  The issue is that I want to grab a few values from methods in the page's controller and put them in the param list in the URLFOR.  Is that possible?  How do I do it?  I've tried a variety of approaches but I either get a syntax error or it doesn't function properly.
 
Thanks
Chris
  • December 03, 2008
  • Like
  • 0
Hello.  I want to run a query - and export the results to CSV (or Excel).  (The query is too complex to fit into a standard Report, so I can't use that functionality.)  How do I do this?

Additionally, the query will return more than 1000 records - which is the limit.  So do I have to do this in an scontrol instead?

Thanks
Chris
  • September 04, 2008
  • Like
  • 0
Hello.  I wrote a trigger which prevents Tasks and Events from being deleted by anyone other than their creator.  Code is easy enough - compare the current user with the createdbyid.  The issue is in writing the test code.  How do I create a test for the scenario where the current user and createdbyid are different?

thanks
chris
  • August 29, 2008
  • Like
  • 0
Hello.  In a Trigger, I want to take a datetime field and convert it to Eastern Daylight Time (always EDT - no matter what the time zone of the current user is).  I've tried using the format() method and passing the time zone that i want, but it always converts to GMT.  Is there a way to convert a Datetime object from one timezone to another?
Thanks
Chris
  • August 14, 2008
  • Like
  • 0
Hello.  I have a Trigger which queries the Territories associated with an Account.  To do this, I have to walk through the AccountShare and Group objects.  For each of these objects, I query an Id and put it into a Map.  How do I write test code for this?  So for example, I have the code shown below.  When I run tests, SFDC tells me that both of the lines inside the for loop should be covered.  But how?  I really don't know anything about them - I just store them and use them in the next query.

Thanks
Chris

        for (AccountShare ash : [SELECT Id, UserOrGroupId FROM AccountShare
                    WHERE (RowCause = 'Territory' OR RowCause = 'TerritoryManual')
                    AND AccountId = :acctId ])
        {
            String tmpid = ash.UserOrGroupId;
            asMap.put(tmpid , ash);

        }

  • August 14, 2008
  • Like
  • 0
Hello.  In a Trigger, I want to take a datetime field and convert it to Eastern Daylight Time (always EDT - no matter what the time zone of the current user is).  I've tried using the format() method and passing the time zone that i want, but it always converts to GMT.  Any ideas?
Thanks
Chris
  • August 06, 2008
  • Like
  • 0
How do I query the Territories that are associated with an Account?  I found another thread that mentioned the AccountShare object, but I don't see how that helps...

Thanks
Chris
  • August 05, 2008
  • Like
  • 0
Hello.  I am currently doing pdf generation using an external web service that i wrote - but i'm looking to move the functionality into sfdc using the new apex to pdf.  The pdf that i generate has multiple pages - all with a common header (with images).  I've seen from other threads that this isn't quite supported in any automated fashion (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=3205).  So I guess the alternative is to foce page breaks and re-draw the header. 

My pdf will have either one or two dynamic pages (based on the number of line items), and 4 static pages (terms of sale, etc).  So the static pages are easy, but my question is, can I conditionally draw the second dynamic page?  That is, if I have more than 6 line items, draw the second dynamic page.  Otherwise, go straight to the static pages.  Is this possible using the VF markup?  Are there any samples with forced page breaks?  I found one thread where a page break is forced, but there's no conditional logic around it (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=3880).  Do I just throw all of the necessary logic into the apex:repeat block?

Thanks
Chris
  • August 05, 2008
  • Like
  • 0
Hello.  I am writing a trigger which does the following: when Account ownership is changed, query all associated Notes, Open Activities, Contacts (and related Notes and Open Activities), and Open Opportunities (and related Notes and Open Activities) - and change the ownership of all of those records.  I'm concerned that in some rare cases I may be updating more than 100 records as a result of this.

So my question: If i divide this functionality into three triggers - one which does Account Notes and Open Activities, a second trigger which does related Contacts (with Notes and Activities), and a third which does Opportunities (with Notes and Activities) - will this help?   Or will the platform calculate the sum of the records being processed by all three triggers?

Thanks
Chris
  • July 30, 2008
  • Like
  • 0
i found an interesting piece of code recently.  through the use of a couple of HTML Snippet SControls, a custom lookup button was added beside a field on an Edit page.  what's the trick?  where do i put what so that the javascript is written into the Edit page?
thanks
chris
  • June 11, 2008
  • Like
  • 0
Hello.  I want to write a flex app to create attachment records in SFDC.  So in Flex the user will browse the local filesystem for a file - then the file will be set as the body of an attachment record and saved to SFDC.  Is this possible?  I was told that the flash player won't let this happen? 
Thanks
Chris
  • June 05, 2008
  • Like
  • 0
Hello.

I have two DataLoader processes configured - an extract and an update.  As soon as records are extracted, I want to update them.  So I have a .cmd file and I call both processes in separate lines (see below).  But it isn't quite working.  The first process runs as expected, the second does not.  Once the SFDC process is complete, the operation terminates and I'm back to a command prompt.  What am I doing wrong?

Thanks
chris

REM first call export
process ../conf exportPF
REM now call update
process ../conf updatePF
  • May 22, 2008
  • Like
  • 0
Hello.  I have configured the DataLoader to run from a command prompt a number of times - for automation purposes.  Whenever I execute it, various logging is sent to the command window - then it reaches "Setting object reference types" - and it pauses for several minutes. 

At some point it continues and all is well.  What is the cause of this delay?  How do I avoid it?

Thanks
chris
  • May 22, 2008
  • Like
  • 0

Hello.  I keep getting the error above when trying to work with the Big Cloud app.  I can't figure out what i'm missing.  I have put the Id of a legit Account in the Apex class, the admin user (and owner of the aforementioned account) has an assigned Role, all of the permissions are set, etc.  One note, i had to go through the process of cloing the Profile because i couldn't edit the permissions on the existing Profile.  The setup documentation said that this should only happen if the portal wasn't enabled before the app was installed, but i've even when the portal is enabled first, i have to clone the role...

 

What else could i be missing??  

 

Oh - so my process is to go to the login page, click for new registration, enter my info - and the page just refreshes (no error message or anything).  i get an email with the info about the invalid accountId value...

 

Thanks for your time.

chris 

  • February 04, 2010
  • Like
  • 0

Hello.

 

I'm having an odd issue with test code for a trigger.  In short, I want to insert an Opportunity, then update that same Opportunity with one changed field.  Snippet of code is below...

 

        Account acct1 = new Account(Name = 'opptriggertestacctname');
        insert acct1;
       
        Opportunity opp1 = new Opportunity(Name = 'opptriggertest_oppname1'
                                            , AccountId = acct1.Id
                                            , StageName = 'stage1'
                                            , CloseDate = Date.today()
                                            , Type_Of_Sale__c = 'Exclusive'
                                            , Authorized_Initials__c = 'cm');
        insert opp1 ;

 

         Opportunity retOpp = [SELECT Id
             FROM Opportunity WHERE Id = :opp1.Id LIMIT 1];
         
         retOpp.StageName = 'Closed Won';
         update retOpp;        

 

 

Error: DmlException: Update failed: First exception on row 0 with id 006...; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Business ID for ... is missing or invalid.

 

Gives me a line number - it's the line where i'm attempting to do the update.

 

I don't have any validation rule that matches that message.  What is Business ID?  One additional note: if I remove the retOpp.StageName = 'Closed Won'; line - and just do the update, it doesn't fail.  (But then it doesn't provide any coverage...)

 

Any help is greatly appreciated.  I've never had this issue before...

 

Thanks

Chris

 

 

  • April 06, 2009
  • Like
  • 0
So I have an Opportunity which could potentially have over 100 line items.  I have a trigger that updates all Line Items (actually all related products - long story), when the Opportunity is updated to Closed Won.  Works perfectly up to 100 records, then fails.  So I updated the code to use the @future, only to learn that you can't pass Lists to @future methods.  So what's the solution to this?  I found several posts on these forums about this, but I haven't seen an answer to this.  Is this just an absolute limit and there's nothing I can do about it?

Thanks
Chris
  • January 16, 2009
  • Like
  • 0
How do I query the Territories that are associated with an Account?  I found another thread that mentioned the AccountShare object, but I don't see how that helps...

Thanks
Chris
  • August 05, 2008
  • Like
  • 0
Hello.  I am writing a trigger which does the following: when Account ownership is changed, query all associated Notes, Open Activities, Contacts (and related Notes and Open Activities), and Open Opportunities (and related Notes and Open Activities) - and change the ownership of all of those records.  I'm concerned that in some rare cases I may be updating more than 100 records as a result of this.

So my question: If i divide this functionality into three triggers - one which does Account Notes and Open Activities, a second trigger which does related Contacts (with Notes and Activities), and a third which does Opportunities (with Notes and Activities) - will this help?   Or will the platform calculate the sum of the records being processed by all three triggers?

Thanks
Chris
  • July 30, 2008
  • Like
  • 0
Hi,
 
I have a written a scontrol which implements the send email functionality.
In that I am able to attach a document already uploaded in Salesforce. But if I need to attach a document that resides on my PC and not in Salesforce, is it possible to do that in a Scontrol?
 
Hello.

I have two DataLoader processes configured - an extract and an update.  As soon as records are extracted, I want to update them.  So I have a .cmd file and I call both processes in separate lines (see below).  But it isn't quite working.  The first process runs as expected, the second does not.  Once the SFDC process is complete, the operation terminates and I'm back to a command prompt.  What am I doing wrong?

Thanks
chris

REM first call export
process ../conf exportPF
REM now call update
process ../conf updatePF
  • May 22, 2008
  • Like
  • 0
Hello.

I have had nothing but trouble deploying/updating/activating triggers in EE (no problem in DE).  I check the forums and found many people saying the same thing.  However I assume than most people are able to deploy/run triggers in EE without a problem?  Please respond if you're able to reliably work with Apex in EE.

Thanks
Chris


  • April 15, 2008
  • Like
  • 0
Hi all
 
I'm having trouble with an Apex trigger that I've created. I used the leadDuplicatePreventer trigger in the Force.com cookbook and edited to involve checking a user alias is unique. When I edited this in my Sandbox environment it worked correctly and I had no problem. Now I'm trying to implement this into my Production environment via Eclipse and I seem to be running into trouble. 1st of all I get an error message that the test coverage is 0% (despite being working in Sandbox) and 2nd when I have tried to edit the trigger to active and I receive messages that the trigger is only saved locally, not to server. How come this happens? Why does it work on Sandbox and not on the Production environment?
 
The code ;)

trigger UserAliasDuplicatePreventer on User (before insert, before update)

{Map<String, User> userMap = new Map<String, User>();

for (User user : System.Trigger.new)

{if ((user.Alias != null) && (System.Trigger.isInsert || (user.Alias != System.Trigger.oldMap.get(User.Id).Alias)))

{if (userMap.containsKey(user.Alias))

{user.Alias.addError('Another new user has the same alias.');}

else {userMap.put(user.Alias, user);}}}

for (User user : [SELECT Alias FROM User WHERE Alias IN :userMap.KeySet()])

{User newUser = userMap.get(user.Alias);newUser.Alias.addError('A user already has this alias.');}}

 
  • April 01, 2008
  • Like
  • 0
I've started getting this error occasionally/randomly when using the flex toolkit (below).  Anybody know what might be causing it or how to fix it?  It seems somewhat arbitrary - I'll go to a screen and type a letter into the search box (async - so it sends a query) and i get the error.  Other times I go to the same screen and type the same letter and i get the results back as expected.

thanks for your time.
chris


Error: (mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na5.salesforce.com/services/Soap/u/9.0/463500D700000008CkG"
  faultString = "HTTP request error"
  message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na5.salesforce.com/services/Soap/u/9.0/463500D700000008CkG'"
  name = "Error"
  rootCause = (flash.events::IOErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2032"
    type = "ioError"

  • March 18, 2008
  • Like
  • 0
I did a trigger on enterprise version sf with eclipse. which can't edit trigger on sfdc.
I can upload this trigger from eclipse to sfdc. but I can't upload the active config. I config the trigger.xml to <active>true<active> and upload it. but it doesn't work. In server the trigger is still deactive.
How can I active the trigger?
  • March 18, 2008
  • Like
  • 0
I'm looking for advice on how to best implement the following:

A contact has a check box - a custom field. When the user checks the box, I want to run a query to see if there are 2 Contacts associated with the Account who have that box checked - if so, deny the ability to check the box & notify the user that s/he already has 2 Contacts checked.

I'm thinking a trigger, but in the ultimate implemenation, I'd like to tell the user:

Hey, here are the 2 contacts you've already got checked - demote one to promote the current one, or bail out.

So, this would seem to suggest an S-Control - but if I want to put it on the Contacts Pagelayouts, would that get into an override situation? And is that a matter of somehow cloning what's there, but just overloading the Save button?
Hello.  I'm having an issue when I Override the New button a custom object.  I'm unable to get a value from the merge field or a specific object type.

I want to Override the New button for custom object X.  X has a master/detail relationship to Account, and a lookup relationship to Y.  I want to be able to go to the detail screen of a Y record, click New on the X related list, and I want to be able to access the Id of Y. 

However I don't seem to be able to get Y.Id.  I can get the Account Id (if I am on the Account detail page).  Is this because Y is a Lookup relationship and not a Master/Detail relationship?  Do I have to do this as a standard scontrol instead of as a New Button override?

Thanks for your time.
Chris


  • April 12, 2007
  • Like
  • 0
Hello.  I'm trying to submit a lead via Web2Lead - but programatically.  Below is the essence of the code.  It isn't working.  I don't see any errors, but no lead is created and I don't get the resulting email.  If I create an HTML form and try it, it works perfectly.

I'm doing this programatically because I want to do multiple things with the info.  Send some emails, create a Lead, etc...

Thanks for your time.
Chris

Set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHttp.Open "POST", "http://www.salesforce.com/servlet/servlet.WebToLead", False

QS = "debug=0"
QS = QS & "&encoding=UTF-8"
QS = QS & "&oid=my oid here"
QS = QS & "&debugEmail=my email addr here"
QS = QS & "&first_name=TEST"
QS = QS & "&last_name=TEST"
 

objHttp.Send QS
strResult = objHttp.responseText
Set objHttp = Nothing
 
response.write("[" & QS & "]<br>")
response.write("[" & strResult & "]<br>")
response.end