Javascripts

/Javascripts

Simple editing and record searching

If we need to find out whether there are similar or the same records to the current record, we can choose from the several methods, e.g.: use soql use search field in salesforce manual finding ... This method uses the standard function for searching records from Salesforce, but with already predefined search criteria (predefined is [...]

March 29th, 2017|Apex, Javascripts|0 Comments

Salesforce web-to-lead without spam

Web-to-lead is the easiest way how to generate leads from your web page into Salesforce CRM. Some users use web-to-lead as ‘Contact us’ form or require some steps before allowing content on the web page. When you have leads in your org, you can contact them and, hopefully, convert them into the contacts with created [...]

October 7th, 2016|Javascripts|0 Comments

Formatting currency

In some cases you may want to show numbers in the same way like Salesforce shows currency in outputField, but you have your value in own variable. Visualforce doesn’t recognise it as a currency and as a result doesn’t add nor currency sign (e.g.$), neither commas after thousands, millions,... Instead of apex tag outputPanel with [...]

August 26th, 2013|Javascripts, VisualForce|0 Comments

Get visualforce element in javascript

If you use Javascript in Visualforce page, you may find out that it is more time consuming to get elements from page. Visualforce tags have some lifecycle during rendering page. Lets create simple page: [crayon-5bede06dd0a32239887401/] Here is the final HTML source code of written commandButton [crayon-5bede06dd0a40681950523/] As you can see, id is j_id0:j_id1:theButton not just [...]

August 26th, 2013|Javascripts, VisualForce|0 Comments

Confirm before delete

Have you ever needed some confirmation from user before he makes some action on page, for example before deleting? Solution is simpler than you think. Use standard Javascript popup window confirm(); Here is a simple example: [crayon-5bede06dd162e131669736/] Do it in this way, because if you will use rerender on commandButton, action cannot fire. Visualforce will [...]

May 15th, 2013|Javascripts, VisualForce|0 Comments

How to work with jquery in visualforce

jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML. It is free open source software and easy to use. jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on [...]

May 15th, 2013|Javascripts, VisualForce|0 Comments