• jeremy_ross
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 26
    Replies
Steps:
  1. Create class 'test'
  2. Sync IDE, confirm class appears
  3. Create package 'testpackage'.  (setup > create > packages)
  4. Add class to package
  5. Run 'sync w/ server' on /src.  Allow IDE to perform sync.
You now have src/testpackage, however operations on this package in the IDE result in the dialog "... Resource is not a Force.com IDE managed resource."

Jeremy
Should I be getting compile errors on a class that doesn't implement all the methods that are specified in an interface that it implements?  I'm not.  Is this a run-time only check?

Jeremy
In a form with only one button, if a user hits enter to submit, the submit button's action does not get called.  Other than javascript, is there a way to call a controller method when the user submits the form by pressing Enter?

Note that in my case, the form button is using reRender.  Not sure if that has any effect on the above.

Jeremy
Anyone successfully use GET with an apex:form?  Is there support for it?

Jeremy

Anyone know why outputPanel reorders attributes in elements it contains?  Seems like the contents of the outputPanel should be opaque to it.  I wonder what else it does to its contents I'm not aware of. 

Jeremy
I've created a folder in my eclipse project for holding various stuff that needs to be version controlled with the project.  However, it apears that the force.com IDE thinks it's a package and is complaining that my package.xml is missing.  Is there some way to tell the IDE to ignore developer-created folders?

thanks

jeremy
I'm having a problem getting the start status to render.  I'd expect it to show up when clicking the Search button, but it doesn't.  The page looks something like this:

Code:
<apex:commandButton id="searchButton" reRender="testList" value="Search" />
<apex:outputPanel id="testList">
 <apex:actionStatus>
  <apex:facet name="stop">
     test stop text
  </apex:facet>
  <apex:facet name="start">
    <apex:repeat value="{!records}" var="record" id="recordRepeat">
   <!-- omitted -->
   </apex:repeat>
  </apex:facet>
 </apex:actionStatus>
</apex:outputPanel>

 Is there something else required in order to get the start facet to show up? 

TIA

Jeremy

 



Message Edited by jeremy_ross on 09-28-2008 09:33 PM
I'm using a standalone outputField (no pageBlock, etc.).  The styleClass attribute is populated, however when the page is rendered, the resulting <span> element is missing the class attribute.  Any idea why?

thanks

Jeremy
I know how to perform this function using a formula in a workflow rule:

Code:
CASE( MOD(  TODAY()  - DATE(1900, 1, 7), 7),

2, TODAY(),

3, TODAY()+6,

4, TODAY()+5,

5, TODAY()+4,

6, TODAY()+3,

0, TODAY()+2,

1, TODAY()+1,

TODAY() )


How do I do this very same thing in an Apex trigger?

I tried this, and it set the date to Tuesday of this week:
Code:
Email_Series_Start_Date__c = System.today().toStartOfWeek()+2;    

However, I'd really like to set it to the next Tuesday if Tuesday has already passed this week. As an aside, this date field is driving the start date for an email drip campaign which should send on Tuesdays.
 
Thanks in advance.

Dave M.


Message Edited by DManelski on 10-22-2008 03:54 PM
Hi,
I want to insert data into salesforce using dataloader. So I created an excel file with data. Few of the fields are look up fields so my excel file has the ID as the value in that field. This works for me but I want to share this data with my team mates and we will need to change the ID for these fields corresponding to their instance. ID is a foreign key/look up in another table.
Also data loader takes only ID for these look up fields. If I have a label value instead of ID it does not insert data.


Example
Field1Field1Field3Field4

SubjectActionLabel
a0C80000001Qfxma0C80000001PqoEa0C80000001Qfxetext1


FieldInquiry SuspendedUsage Email
a0C80000001QjWEa0C80000001PqoEa0C80000001Qfxetext2

FieldGeneral SuspendedUsage Email
In this example Field1, Field2, Field3 are lookup fields in another table. They are foreign keys. So if my team mate wants to use the same data to export into their instance this would not work because they will have a different set of IDs on their instance.

If we have  huge data then it would not be possible to load same data. How can we achieve this so that one set of data can be used across multiple instances.

Quick response would be appreciated.



thanks,
kathyani
Hi,

For anyone looking into using TinyMCE in a VF page: it breaks the Salesforce functionality for lookup fields to paste a selected value from the lookup popup window.

More specifically the function that occurs when you click a magnifying glass next to a lookup inputField, it launches a popup from which you can search and select a record. If the TinyMCE script is loaded I get this error logged in Firebug:

Permission denied to get property Window.lookupPick

function onclick(event) {
  top.window.opener.lookupPick2("thePage:theForm", "thePage:theForm:mainBlock:theSection:j_id46_lkid", "thePage:theForm:mainBlock:theSection:j_id46", "0037000000c2L04", "John Doe", "cas4", "Acme products", "cas4_lkid", "0017000000Sxxxx", false);
}


-paul
In a form with only one button, if a user hits enter to submit, the submit button's action does not get called.  Other than javascript, is there a way to call a controller method when the user submits the form by pressing Enter?

Note that in my case, the form button is using reRender.  Not sure if that has any effect on the above.

Jeremy
I'm still new to this, so hopefully I am using the right terms:
 
I have created a Controller Extention as an Apex class that will in effect override the !save of the standard controller.  What I was hoping to do is save a field to a related object in this method, which I have been able to do, but I need to get the value that I will write from an <apex:inputField> page component.  Is this possible? I can't seem to find a way to reference these components in Apex.
Code:
public class LeadTouchExtension{

   public final Lead_Touch__c leadTouch;
                
   //Create a new save action
   ApexPages.Action saveAction = new ApexPages.Action('{!LeadTouchSave( string )}');
   
   public LeadTouchExtension ( ApexPages.StandardController stdController )
   {
      this.leadTouch = (Lead_Touch__c)stdController.getRecord();
   }
     
   public void LeadTouchSave()
   {
      try{
         
         for( Lead relatedLead : [Select ID, Salutation, FirstName, LastName FROM lead WHERE Lead.ID = :leadTouch.Lead__c LIMIT 1 ] )
         {
            //this needs to reference the Form and any pageBlock (maybe page block section) by name.                
            relatedLead.FirstName = ***Need to reference page component here!***  
         
            update relatedLead;
        
         }
      
      }
      catch( DmlException ex )
      {
         ApexPages.addMessages(ex);
      }

      
   }

}

 
Anyone successfully use GET with an apex:form?  Is there support for it?

Jeremy

Hi all, I'm a relatively new Apex developer, and was looking for a list of Apex naming rules. I recently attended a Dev 501 class and I remember we briefly touched on this topic, but for the life of me, I can't find documentation or discussion on this. If you have a good link for me to follow, that'd be great.

Things like:
-When I try to use an underscore in my class name, Eclipse complains that it can't write to the server, so I assume underscores are bad.
-I know there's an upper limit on the number of characters in a name, but I don't know what it is.

Thanks all,
-Dominic
  • October 06, 2008
  • Like
  • 0
I have a client that needs to have phone lines with their properties (call waiting, call forwarding, etc) to be associated with an opportunity.  So, I've created a custom object called Phone Lines and created all of the fields.  When the users are creating the opportunity and adding phone lines, there is nearly always more than one and sometimes can be 20 or more (If the number is too high, we'll just import).  Often the phone lines have the same properties, so ideally, there should be a way for them to add a line and then instead of saving and going through the process of adding another line, I'd like a button that will allow them to save that number and bring back the form with the same properties selected, except the line number.  Since this has a lot of customization, I figured it would be best using VisualForce, but outside of the basic tutorials, I have no practical VF experience and would like a little guidence.  What I'd like to do is this: 
1. When they enter a phone number, and click the "save & clone" (or something like that), I would like to stick the data from the first number in an array
2. Take the properties of the last saved number  and repopulate the form minus the number. 
3. The user will continue to do this until they have entered all the numbers that they need to enter
4. The user would then click a "finish" button and that would take the data from array and save the data in the database.

Can anyone give me some recommendations?  Can I use VF for this?  I've been looking for arrays and all I can find are Lists - are lists arrays in APEX?

Any help or advice would be appreciated.
Is there  any kind of document/guide that explains in details exactly what happens on a VF page when you click a command button?    Which gets are run, which sets are run, what exactly is rerendered, etc?  Right now, I am having to work this all out by trial and (lots of) errors.

Thx,
Hamayoun
<div id="outside_page">
{!url}
</div>

the outside_page which is a jsp loads up but the css in that file is not recognized. I guess conflict with css on visualforce page? I also tried moving css from the outside_page to the visualforce page, but the outside page does not read the css in visualforce page. Is there any way around it?
  • October 03, 2008
  • Like
  • 0
Anyone know why outputPanel reorders attributes in elements it contains?  Seems like the contents of the outputPanel should be opaque to it.  I wonder what else it does to its contents I'm not aware of. 

Jeremy
We have a date of birth field on a custom object.  When we bind this field to an apex:inputfield the datepicker has a rather limited range of years in it.  Can we specify a year for it to start with?  Say 30-40 years ago?  I realize that a user could just type a date in, but it inevitably ends up that the user sees the datepicker control and thinks that they need to use it to select a date.  Thanks for any help.