• nhobert
  • NEWBIE
  • 0 Points
  • Member since 2011

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

I have a few Field Sets defined on various Standard Objects that I want to deploy using Eclipse.

However I cannot find where they are defined when using Add/Remove Metadata in Eclipse.

 

Thanks for your help

Neal

 

What I am going for is two dataTables on the same page. I created the one dataTable using the standardController: Opportunity. I then created  a custom controller for TradeIns called TradeInController2 that will be used in a component that will create the other dataTable on the page. I am extremely new at this so I am not sure If i'm on the right track or not and what my problems are in my code.

 

For your help here are the requirements:

 

Develop a visual force page that will allow us to query both opportunities and trade ins on the same page.  It would be able to search on the following fields from each

Opp.
Close date
Equipment state
Modality

Trade in
Deinstallation date
Equipment state
Modality

 

Currently the error I am receiving when trying to save my Component is  "Error: The content of elements must consist of well-formed character data or markup."  This is my first project so any fixes for my code and or help would be extremely appreciated.  I have gone through tons of documentation, but none have good examples of what my boss is asking so I am doing the best I can...

 

Controller for Component:

 

public class TradeInController2{

    private final Trade_in__c tradein;

    public TradeInController2() {
        tradein= [select name, Deinstall_Date__c, Status__c, Modality__c from Trade_in__c ];
    }
    public Trade_in__c getTradeIn() {
        return tradein;
    }
        }

 

Component:

 

<apex:component controller="TradeInController2">

    <apex:dataTable value="{!tradein}" var="tr" cellPadding="4" border="1">
              <apex:column >
                    <apex:facet name="header">Trade-In Number</apex:facet>
                    {!tr.name}
              </apex:column>
               <apex:column >
                    <apex:facet name="header">De-Install Date</apex:facet>
                     {!tr.Deinstall_Date__c}
              </apex:column>
              <apex:column >
                    <apex:facet name="header">Equipment State</apex:facet>
                    {!tr.Status__c}
              </apex:column>
              <apex:column >
                    <apex:facet name="header">Modality</apex:facet>
                    {!tr.Modality__c}
              </apex:column>

    </apex:dataTable>

<</apex:component>

 

 

The Page:

 

<apex:page standardController="Account">
 
    <apex:pageBlock title="Hello {!$User.FirstName}">
    </apex:pageBlock>   
    <apex:pageBlock title="Opportunities">
        <apex:dataTable value="{!account.Opportunities}" var="opportunity" cellPadding="4" border="1">
              <apex:column >
                    <apex:facet name="header">Opportunity Name</apex:facet>
                    {!opportunity.Name}
              </apex:column>
              <apex:column >
                   <apex:facet name="header">Close Date</apex:facet>
                    {!opportunity.CloseDate}
              </apex:column>
              <apex:column >
                     <apex:facet name="header">Equipment state</apex:facet>
                      {!opportunity.Equipment_State__c}
              </apex:column>
              <apex:column >
                    <apex:facet name="header">Modality</apex:facet>
                     {!opportunity.Equipment_State__c}
              </apex:column>
        </apex:dataTable>
     </apex:pageBlock>
    
     <apex:pageblock title="Trade-Ins">
           <c:TradeInComponent/>
    </apex:pageBlock>


   <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false" title="false"/>
</apex:page>

 

Thank you for your help in advance.

 

Chris

I am running into an error when trying to create a dynamic soql query string with a date variable.  I'm not formatting the date correctly.

 

Here is how I'm building the query:

 

String strSOQL = 'Select Name,Event_Date__c, openSlots__c, Time_of_Event__c, Description__c, Type__c,Service_Line__c, SFDC_Facility__r.Name, Fee__c, ' +
    		'Remaining_Space_Available__c,Maximum_Space_Available__c, Event_Status__c from SFDC_Event__c where (Event_Status__c = \'Open\' or ' +
    		'Event_Status__c = \'Wait List\' or Event_Status__c = \'Closed\') and Service_Line__c like ' + '\'' + serviceLineString + '\'' + ' and ' +
    		'Type__c like ' + '\'' + typeString + '\'' + ' and SFDC_Facility__c = ' + '\'' + facilityString + '\'' + ' and Event_Date__c >= ' + startDate + ' and Event_Date__c <= ' + endDate + ' order by Event_Date__c';
    		

 

Here is the system debug output for the start date:

 

4/01/2011

 

 

And here is the debug of the entire soql string output:

 

Select Name,Event_Date__c, openSlots__c, Time_of_Event__c, Description__c, Type__c,Service_Line__c, SFDC_Facility__r.Name, Fee__c, Remaining_Space_Available__c,Maximum_Space_Available__c, Event_Status__c from SFDC_Event__c where (Event_Status__c = 'Open' or Event_Status__c = 'Wait List' or Event_Status__c = 'Closed') and Service_Line__c like '%'and Type__c like '%' and Event_Date__c >= 4/01/2011 and Event_Date__c <= 4/30/2011 order by Event_Date__c

 

 

How does the start and end date variables need to be formatted?  With single quotes?

 

Any help is appreciated.

Thanks.