Questions tagged [visualforce]

Visualforce is Salesforce.com's HTML template technology, allowing dynamic creation of web pages (as well as other files) utilising Apex logic and SOQL queries to replace merge fields with content.

Useful Links

1348 questions
27
votes
2 answers

How to format a date in VisualForce?

In Salesforce, if I'm binding a date into a VisualForce page, how do I apply custom formatting to it? Example:

{!contact.Birthdate}

codeulike
  • 20,946
  • 27
  • 113
  • 161
21
votes
2 answers

Getting error : Uncaught TypeError: undefined is not a function bootstrap.js:29 (anonymous function) bootstrap.js:29 (anonymous function)

I'm getting the following error Uncaught TypeError: undefined is not a function bootstrap.js:29 (anonymous function) bootstrap.js:29 (anonymous function) in my visualforce page in the developer console.I'm trying to integrate twitter-bootstrap…
iJade
  • 20,206
  • 52
  • 141
  • 227
17
votes
6 answers

How can multiple developers efficiently work on one force.com application?

The company I work for is building a managed force.com application as an integration with the service we provide. We are having issues working concurrently on the same set of files due to the shoddy tooling that is provided with the force.com…
Akrikos
  • 3,354
  • 2
  • 20
  • 20
14
votes
8 answers

Retrieve salesforce instance URL instead of visualforce instance

From a visualforce page, I need to retrieve our organization's salesforce instance's URL, and not the visual force URL. For example I need https://cs1.salesforce.com instead of https://c.cs1.visual.force.com Here's what I've tried so far and the…
Jan Julian
  • 443
  • 2
  • 4
  • 14
9
votes
2 answers

How to refer html element id specified in visualforce and pass onto javascript function?

I have apex tag that generate input text field. When someone clicks this field, I want to execute javascript. But when I check the HTML source, this…
Meow
  • 16,125
  • 50
  • 122
  • 176
9
votes
1 answer

Sending email with template using trigger

I have the following Trigger: trigger send_notification on Inquery__c (after update) { Inquery__c inquery = trigger.new[0]; String[] toAddresses = new String[] {inquery.email__c}; Messaging.SingleEmailMessage mail = new…
user2333346
  • 1,013
  • 3
  • 14
  • 40
8
votes
2 answers

Apex Code Version Control

Is there any way to integrate version control system for Apex & Visualforce code? I can thinking of keeping a separate repository but no way to have it integrated with Salesforce Platform. Thanks in Advance.
Mitul Makadia
  • 358
  • 5
  • 23
8
votes
1 answer

Parsing JSON Object in Salesforce Apex

How do I parse a jsonObject which is in a given format in Apex? I need List from the items array which contains the id attribute. What is some appropriate method? For parsing it, I try to create a class with code: public class JSON2Apex { …
Ritesh Mehandiratta
  • 6,595
  • 28
  • 114
  • 186
8
votes
1 answer

How to achieve nested conditional rendering without empty span tags from apex:outputPanel?

I am trying to generate clean XSL-FO from a VisualForce page. But the xml coming out of the VisualForce page is not valid due to the empty span tags that are being generated by nested apex:outputPanel tags (outer rendered=true, inner…
twamley
  • 771
  • 2
  • 13
  • 22
7
votes
4 answers

How to implement "Cancel" functionality in a VisualForce Page

I know that this is how to save a record I want a button to NOT save the current record (ie. Cancel) and navigate to the list of saved record (ie. list of objects for that object type). Something…
Sam
  • 2,573
  • 10
  • 39
  • 58
7
votes
2 answers

Display a text field after a checkbox is checked in visualforce

I have a requirement in which a Text field has to be made editable or rendered when a check box is checked, how can I achieve this?
user1048080
  • 187
  • 2
  • 5
  • 12
7
votes
2 answers

How to exit an apex function?

I have an apex function which has a void return type. I want to exit the function at a specific position. Is this possible in apex without changing return type pagereference?
Yogini Mane
  • 175
  • 2
  • 2
  • 8
7
votes
2 answers

How to find out which checkboxes have been selected on the next page in VisualForce?

I have a data table which iterates through a custom object and generates checkboxes. On the second page, I want to determine which of these checkboxes have been selected. In the VisualForce page: Age
Matthew Moisen
  • 12,418
  • 23
  • 90
  • 195
7
votes
2 answers

CSRF safe Custom button linked to Apex method

I'm looking for a technique to execute Apex code from a custom button added to the Opportunity object in a way that protects the user against CSRF. The current approach being used comes from the question - Custom Button or Link to a Visualforce page…
Daniel Ballinger
  • 11,767
  • 10
  • 66
  • 93
7
votes
4 answers

newline character on text area

I have a custom field called Current_Address__c which is of datatype textarea. I need to populate this field in the format below. ie a newline char after street and another newline after zip. street City state Zip Country The values of city state…
Prady
  • 9,658
  • 38
  • 120
  • 170
1
2 3
89 90