Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support ...
3
votes
1answer
38 views
Getting size of a list in javascript or jquery
I have a list on my controller. I want its size in javascript function. How to get it?
1
vote
2answers
41 views
Calling Extension Methods from JavaScript
Here's what I want to do. I'm overriding a new/edit button for tasks. when a VF page loads, have it check a condition in my extension. If that condition is met, show a pop-up and re-deirect the user ...
1
vote
2answers
44 views
What Javascript code is required to convert a lead to account
I want my agents to be able to convert a lead to an account from the lead list view. I have created the custom button but need the appropriate code. I used what was suggested but get a message Missing ...
3
votes
2answers
56 views
Does embedding static resources in section header still work
I was trying to modify some styling in standard pagelayout. I know way back there was an hack where devs used to create static resource with JS in it and embed the JS in the section header of a ...
3
votes
1answer
53 views
Wait for .each & contained async calls to complete before redirect
Using JS REST toolkit, I'm trying to insert one customer record and multiple related contact records, and then redirect to the detail page of the customer record via JS. The problem is JS redirects ...
1
vote
1answer
32 views
ActionFunction working in Chrome but not in IE and Moz
So, the page has an action which must be invoked when "enter" is pressed.
VISUALFORCE:
//script:
function pressReturn(e, currOffer) {
var keyPressed = e.keyCode;
if (keyPressed == 13) {
...
1
vote
1answer
40 views
Adding Date and Integer in jQuery
<script type="text/javascript">
function duedatecal(){
var dmy = $(".invoicedate").val().split("/");
alert(dmy); // it is in the format of mm/dd/yyyy
var invoicedate = new Date(
...
-2
votes
0answers
23 views
How to take input using ajax for geocoding [closed]
I am using google API V3 for geocoding. How can I take input by ajax. My code is :
<script type="text/javascript">
var geocoder;
var map;
function initialize() {
geocoder = ...
1
vote
1answer
33 views
Using PE created new VF page for Opportunity showing wrong probability value based on stage picklist value selected
I have created a VF page for Opportunity, added this new vf page to Opportunity new button. When I am creating a new Opportunity, probability is showing in correct value. For example if I select the ...
1
vote
1answer
65 views
Default the “Send Notification Email” Checkbox to Checked
I have been trying to figure out how I can make the "Send Notification Email" checkbox checked by default when changing the owner of a Case record in Salesforce. I know that you can toggle this from ...
1
vote
1answer
59 views
VisualForce page with custom controller and lookup causing JavaScript UI issues
I noticed that I'm experiencing UI issues with every Salesforce instance that I have access to when I create a custom VisualForce page using a custom controller and that I display a lookup field on ...
1
vote
1answer
62 views
Enabling a field in input page based on a picklist value
VF page to enable one of two fields based on picklist value in the same page. Please verify my code whether is right or worng. I am running this code but nothing happen.
<apex:page ...
5
votes
0answers
84 views
Javascript Remoting breaks on complex relationship data
We use Javascript Remoting to retrieve some complex data from the controller. The SOQL query looks like the following:
SELECT Id,
( SELECT Id, Sales_Rep_r.Name, Customer_r.Name,
...
2
votes
1answer
33 views
Redirecting to detail page in Streaming API
I was just trying to get heads-up on Streaming API. Following is the link which provides a basic example for Streaming API. I'm using the same code, besides that i was trying to add one functionality ...
1
vote
1answer
77 views
Cross-site Scripting (XSS) in security review.?
I am getting Cross-site Scripting (XSS) while scanning in force.com scanner.if i remove javascript there is no error..what to change in javascript code..please help its quite urgent...may be encode ...
2
votes
2answers
33 views
Date coming back in wrong format using JS remoting
I return instances of an APEX Class in a JS remoting API.
public class OpportunityDetail {
...
public Date closeDate;
...
The problem what is returned to my JavaScript client code is ...
2
votes
1answer
46 views
Creating a VF page dependent picklist error?
I am creating a VF page, on that we need to have 13 picklist fields and 13 dependent picklist fiields. We have created 10 picklist fields and 10 dependent picklist field. For creating 11th dependent ...
1
vote
2answers
99 views
Get Current User when using forcetk.js / JqueryMobile pack
Im currently having a play with the Salesforce JqueryMobile pack and have got stuck trying to get hold of the current user Id. (Pack: ...
1
vote
1answer
78 views
Display javascript result in a pageblocktable
I am making a Ajax call to a REST API and parsing the response and maintaining the parsed values in a delimited string. I want to display the same string in the pageblocktable without taking the ...
3
votes
1answer
57 views
input type color and upload file
I'm trying to allow a user to both upload a document and utilize the HTML input type="color". Then click Save and have both saved to the record. The color as a field on the record, the file as an ...
0
votes
2answers
103 views
Apex:include should only rendered When onclick event occurs
I'm having a page Say VFPage1 with class apex1
In my page2, my code is something like this
var arr = document.getElementById("contactandaccount");
alert(arr); //getting null here
...
2
votes
1answer
70 views
reRender not being called, yet controller is executing
I'm stuck on a reRender issue.
I have a commandButton element which calls an action function, which should reRender a pageBlock on return and then trigger an oncomplete event.
Action button in ...
2
votes
3answers
110 views
Passing apex:inputField user entry as parameter into Command Link
I am getting the nickname from an inputField and updating a list of strings and displaying the list of strings on a table. The outputField displays the newly entered value, but the controller variable ...
1
vote
2answers
173 views
How do we get a id of field from a apex:pageBlockTable?
I have a pageblocktable where i do have some input fields which also has a apex:inputtext and has a lookup icon on click of which i am calling up the native lookup.
The issue i am having is with the ...
1
vote
1answer
74 views
Can I reference a Static Resource in an HTML Area?
I'd like to reference a Javascript file (Static Resource) in an HTML area within Salesforce - is this possible? Or can I only reference Static Resources from a VisualForce page?
If it is possible, ...
3
votes
1answer
70 views
apex:pageBlockSectionItem collaspe or expand throws “twistSection is not defined” JavaScript exception
I have an apex:pageBlockSection defined within an apex:component. The component is used within an apex:pageBlock of a Visualforce page. It isn't rendered when the page initially loads.
When a user ...
2
votes
1answer
51 views
Sharing / without sharing and @RemoteAction
I have a global class (without sharing). One of its method is a @RemoteAction, which instantiate another class (public and without sharing) and uses one method of the instantiated class. This method ...
1
vote
1answer
73 views
send email button from custom object
I am a newbie, and that's the probably reason why I am lost with this problem.
I have two email templates created (one for students, and another for professorial). There is a custom object, and I need ...
1
vote
1answer
65 views
Dynamic table in salesforce using HTML
I have a list of record in my controller. I want to display the record into my VF page but don't want to use salesorce components want to display the list into a HTML table 1 by 1. How to achieve ...
0
votes
1answer
90 views
Using Javascript to reference a VF field and update database
I'm trying to reference a VF form field in my javascript and update in the database. I've got the update part working, but I'm still having a lot of problem trying to referencing "temp_approver" in my ...
1
vote
0answers
29 views
How to embed a standard delete page into a custom console?
I have a custom console, with the essential registers and the user can delete an object through this page. When he click on Delete I want show him the standard delete page without the sidebar and ...
2
votes
2answers
125 views
parameters wont passs via Javascript
I am having trouble passing values via Javascript.
APEX PAGE:
//STUFF HERE
<b>First Goal:</b><br /><br />
Goal:<apex:inputField id="Goal" ...
2
votes
2answers
107 views
DataTables in VisualForce Page, Setting swfPath as Static Resource
I have been working with the DataTables library in VisualForce and have everything working except for the export features. I followed the sample initialization on the DataTables website, but am ...
1
vote
1answer
66 views
Custom Button for Convert Lead with Javascript
I would like to prevent users from converting a lead if some fields are missing (State, country, company type) - I don't want to use standard validation, as I want the users to remain on the same ...
2
votes
3answers
112 views
Standard Button CODE Available?
Is there a repository of the actual code behind Standard Buttons? Specifically, I'm looking for the code for "New" (and in my case, it's for use within a Related List on Opportunity).
I want to ...
4
votes
1answer
71 views
Catching all errors when using ajax toolkit
I am writing some javascript to be executed by a custom button on a Lead page. I would like to capture all of the validation errors that may be thrown when I update the page.
It seems that if I save ...
2
votes
1answer
165 views
Can't update record with Javascript remoting
I'm using JS function to get a contact record and another function to update the record after hitting save. getRemoteContact() works beautifully, but saveRemoteContact() only works at random. I've ...
1
vote
1answer
81 views
Deploy VF with RemoteAction
I have a visualforce page which calls methods tagged with @RemoteAction. The methods are in an extension class which is public, like methods. The class is the extension used in the page. In sandbox ...
0
votes
2answers
118 views
How can I redirect the page to navigate to a new record (Case) that was created with a custom button?
I have a custom Javascript button on Opportunity Layout that executes a method that creates a case. After the alert says "Case Created" and User clicked OK, I want the page to redirect to the Case ...
0
votes
1answer
100 views
Hiding chatter feed in service cloud console
We have a requirement to hide the chatter feed for Accounts for service cloud console users. The chatter feed is contained within two divs on the Account page, with ids 'feedLinks' and ...
1
vote
1answer
69 views
Set “Related To” in Service Cloud Console Interaction Log
Usually within the service cloud console, the "Related To" field in the interaction log is automatically set to the opened record.
We have a VF page overriding the account view and edit pages and ...
2
votes
1answer
77 views
Manage (and re-use) apex:pageMessages from Javascript
I would like to know if is possible to set and show a apex:pageMessages block from javascript
I've been trying to do something like this:
VF page:
...
<apex:pageMessages id="jserror"/>
...
...
1
vote
1answer
105 views
Custom Button Javascript - send Validation Error Text to screen?
Is there a way to send (if any) the Validation Error text to such a button, shown below? I would put it at the "Error" text at the end, if possible. I cannot find a reference to this in my searches.
...
0
votes
2answers
138 views
How to render Google visualization Api Table and ImageChart as pdf
I am using Google visualizatio API Table and Imagechart . I want to render it as pdf . Please suggest me. Here is my code:
formatCurrencyLabel = function ( value ) {
return "$" + String(value);
}
...
0
votes
2answers
129 views
Setting color for multiselect picklist
EDIT:Sorry for not specifying this critical part. I want this to be done on a Multi select picklist on standard salesforce *(even if it means hacking the side row by adding a dummy component) and not ...
-2
votes
1answer
361 views
HTML5 FileReader API & IE Support (reader.readAsBinaryString) [closed]
I have trouble reading the Uploaded File (XLSX) via FileReader API's "readAsBinaryString" method in IE10. "readAsText" method works fine. Has anyone come across this, does IE support this method? Am I ...
3
votes
1answer
117 views
Custom Button (javascript) - Field Name Changes Not Automatically Made
I understand generally WHY this happens, but I'm curious if there is a better way to write the two references in code below so that if I RENAME the FIELD in SF, it updates the code?
{!REQUIRESCRIPT ...
0
votes
0answers
46 views
Grids in Visualforce pages
Has anyone tried using Grids in VF pages using jquery plugins or any other libraries.
I am looking at an library plugin which provides an excel like UI.
The basic idea is to have custom object fields ...
1
vote
1answer
90 views
Custom Button - OnClick JavaScript - Reference Current Date?
I'm missing something simple here probably, but it's escaping me.
FormToUpdate.set("RETURNFUNDS_Sales_Rep_Signature_Date__c", {!today()} );
I've tried now() and today() above at the end, and it's ...
5
votes
2answers
60 views
javascript highlighting inside eclipse
I'm trying to find a way to enable javascript syntax highlighting while editing a VF page inside eclipse.
Has anyone had success in enabling this?