• KnewTVs
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 5
    Replies
How to get the name of a product in stead of the ID. Out of range issues. Query works fine in SOQL Explorer.
Have tried all kinds of combinations and can not get this trigger to work... trigger secondupdate on Content_to_Playlist__c ( after insert, before update) { if (Trigger.isInsert) { for(Content_to_Playlist__c mycontent: Trigger.new) mycontent.ri1__Content_length_in_seconds__c = mycontent.ri1__Content__r.ri1__Length_in_Seconds__c; } if (Trigger.isUpdate) { for(Content_to_Playlist__c mycontent: Trigger.old) mycontent.ri1__Content_length_in_seconds__c = mycontent.ri1__Content__r.ri1__Length_in_Seconds__c; } }

I need to filter a related list for the active inventory in a related list. Similar to this question:

http://community.salesforce.com/t5/Visualforce-Development/Visualforce-Email-Template-Display-filtered-Opportunty-Report/m-p/148071

 

This is simple in an XSLT implementation.

 

I found the following:

http://community.salesforce.com/t5/Visualforce-Development/Visualforce-email-template-On-Account-displaying-all/m-p/154143#M18324

<apex:dataTable value="{!relatedTo.Opportunities}" var="o">

<apex:column value="{!o.Name}" rendered="{!o.IsClosed == false}"/>

<apex:column value="{!o.CloseDate}" rendered="{!o.IsClosed == false}"/>

</apex:dataTable>

 

This seams a lot easier than having to write a customer controller.

I have tried to apply the rendered="{!o.IsClosed == false} approach to the following code with no luck.

 

Any suggestions?

 

<apex:repeat var="cx" value="{!relatedTo.ri__Units__r}">

<tr>

<td WIDTH=100 >{!cx.Year__c}</td>

<td WIDTH=200>{!cx.Make__c}</td>

<td WIDTH=300>{!cx.Model__c}</td>

<td WIDTH=200>$<apex:outputText value="{0,number,00,000}"> <apex:param value="{!cx.ri__ListPrice__c}"/> </apex:outputText> </td>

<td WIDTH=200><img src={!cx.ri__Unit_Main_Image__c} height=100 width=150 alt={!cx.Model__c} /></td> </tr> </apex:repeat>


How to get the name of a product in stead of the ID. Out of range issues. Query works fine in SOQL Explorer.
Have tried all kinds of combinations and can not get this trigger to work... trigger secondupdate on Content_to_Playlist__c ( after insert, before update) { if (Trigger.isInsert) { for(Content_to_Playlist__c mycontent: Trigger.new) mycontent.ri1__Content_length_in_seconds__c = mycontent.ri1__Content__r.ri1__Length_in_Seconds__c; } if (Trigger.isUpdate) { for(Content_to_Playlist__c mycontent: Trigger.old) mycontent.ri1__Content_length_in_seconds__c = mycontent.ri1__Content__r.ri1__Length_in_Seconds__c; } }

I know that this is a question thats gone around a lot but I still dont have a good solution to the problem

 

I understand that date times are stores in the salesforce database as UTC, but on standard oppertunity pages the time will correctly display as the local time, but when i display the time on the visual force page it jsut shows as UTC again!!!

 

I know about the apex .format() as a way to pass the visual force page a locally formatted time, but my question is this.  If i am doing a query in my controller and returning that query back to the visual force page to be displayed into a grid, how do i get it as local time?  

 

here is my code, i simplified it here...

 

public PageReference query() {

qryString = 'SELECT Id, account.name,stageName,truck__c,pickupDateTime__c,'+ ' items_to_donate__c, drop_off_location__c,truck_size__c,neighborhood__c FROM Opportunity '+ 'WHERE CloseDate = ' + dateStr1 + ' and '+stageQuery+' ORDER BY truck__c, pickupDateTime__c ASC' ;}

}

queryResult = Database.query(qryString) ;

 

 

then on the front end i have

 

<apex:pageBlockTable value="{!queryResult}" var="a" id="rows" width="50%">

 <apex:column ><apex:facet name="header" ><b>Pickup Time</b></apex:facet>

{!a.PickupDateTime__c} </apex:column>

 </apex:pageBlockTable>

 

any help you guys can offer would be amazing!!

 

 

Is there an easy way to only display the Time of a DateTime object in VisualForce?

 

Also is there an easy way to display the Day-of-the-week like 'Friday' in VisualForce?

 

Currently, I'm using a switch statement taken from the pdf on Formulas, but am wondering if there is a better method:

{!CASE(MOD( TODAY() - DATE(1900, 1, 7), 7),0, "Sunday",1, "Monday",2, "Tuesday",3, "Wednesday",4, "Thursday",5, "Friday",6, "Saturday", "Error")}

 

Thanks

Parker