You need to sign in to do that
Don't have an account?
Nonick
Visual Force Email Template - Date Format Issue and general VForce assistance
I'm looking for a method to format a datestamp field into a dd/mm/yyyy field.
The object we're refferencing is the default Opportunity object.
Currently returns:
Start Date:Tue Nov 25 00:00:00 GMT 2008
Would like it to return:
25/11/2008
The code for this is:
Start Date:{!relatedTo.EngagementStartDate__c}<br />
Anyone have any ideas? Everyone says to use the get, methods on a date, but our sforce resource stated that I can't do that in a template or merge document.
Regards,
N
PS
While we're here, I'd like to also merge in information of the Primary Contact. I know this is a one line requirement that has a whole slew of problems, but my alternative is writing a trigger that populates a new lookup field with the primary contact and using that field to drill to various pieces of information, this is a REALLY cumbersome solution, I'd rather call on the related contact roles list, but accounting the resource, if/else functions don't work on that list.
Message Edited by Nonick on 11-26-2008 05:24 PM
The object we're refferencing is the default Opportunity object.
Currently returns:
Start Date:Tue Nov 25 00:00:00 GMT 2008
Would like it to return:
25/11/2008
The code for this is:
Start Date:{!relatedTo.EngagementStartDate__c}<br />
Anyone have any ideas? Everyone says to use the get, methods on a date, but our sforce resource stated that I can't do that in a template or merge document.
Regards,
N
PS
While we're here, I'd like to also merge in information of the Primary Contact. I know this is a one line requirement that has a whole slew of problems, but my alternative is writing a trigger that populates a new lookup field with the primary contact and using that field to drill to various pieces of information, this is a REALLY cumbersome solution, I'd rather call on the related contact roles list, but accounting the resource, if/else functions don't work on that list.
Message Edited by Nonick on 11-26-2008 05:24 PM
format like this
{!day(cx.Start_Date__c)}/{!month(cx.Start_Date__c)}/{!year(cx.Start_Date__c)}
wacky
is there anything special I need to do to make an object an official child of another object?
I've got a master/detail field in the custom object linking it to the opportunity, but the opportunity doesn't list it as a child.
Trying to use the following code to pull the material:
Suggestions?
edit:
actually it DOES show it in the apex explorer but the name of it is something along the lines of R00N20000001CFcUEAW
I don't want to hard code that beast anywhere.
Message Edited by Nonick on 11-26-2008 10:08 PM
When you encounter this scenario you can address it by navigating to the lookup or master-detail relationship field edit page and entering the desired value for the "Child Relationship Name" field. The best value for this is usually a qualified version of the Related List Label.
The value *should* default to the name qualified version of what you provide in the Related List label field in the custom field wizard for relationships going forward.
Can someone please give me a hint where these functions are documented?
day(cx.Start_Date__c)
month(cx.Start_Date__c)
regards
Yes! Documentation on these functions would be very helpful. Anyone know where a complete list might be?
It is not clearly documented, but you can use all formula field functions as described in the help section:
https://na5.salesforce.com/help/doc/en/customize_functions.htm
hth
{!day(cx.Start_Date__c)}/{!month(cx.Start_Date__c)}/{!year(cx.Start_Date__c)}
Worked. But if those fields are blank, the two slashes "//" remains. Is there any way to hide them?
try to surround it with an IF, e.g.
{!IF(ISBLANK(cx.Start_Date__c),'',day(cx.Start_Date__c)}/{!month(cx.Start_Date__c)}/{!year(cx.Start_Date__c))}
Excellent! Thanks for the date format. Solved my problem before i had to ask the question!
;)