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 ...

learn more… | top users | synonyms

0
votes
0answers
5 views

Save attachment with Remote Objects

is it even possible to save attachment with remote objects to salesforce? I tried this: construct remote object model <apex:remoteObjects jsNamespace="MyModel"> ...
0
votes
0answers
25 views

Error while copying selected custom related list to another custom related list

We have a custom object PA_Process__c and has two custom related lists called Revenue__c and Billing__c. We need to have functionality that moves the selected Revenue record to Billing. Below is the ...
1
vote
3answers
28 views

How to use the REST API to get array from the Opportunity Object in JSON format from the Opportunity object using SOQL?

I'd just like to get an array of the opportunity data within Salesforce Visualforce so that I can manipulate it in Javascript. Below is the query that I'd like to use to pull in the array: select ...
0
votes
1answer
19 views

Email Template Not Mapping Information from Web-to-Lead Form

I am a bit new to salesforce. I am trying to populate "Signed Date" from my Web form on to the email template. But it is not populating only that field.My email tepelate is: Signed (Student) Date ...
2
votes
1answer
25 views

Unexpected Identifier for Onclick Javascript button

I created a custom button for custom object to place in the related list. The custom object has two look-ups, one for case and one for account. This button, when clicked, should open in a new window ...
0
votes
1answer
16 views

Issues passing value from javascript/jquery to controller using hidden input

below is my code: public with sharing class myController { public String passedInString { get; set; } public PageReference passedInValue() { system.debug('Passed in value: ...
1
vote
1answer
18 views

How to determine if a VF page is invoked in a console

I have a VF page which needs to be displayed in the Service console as well as a regular tab. The header should not be displayed in the console. However removing the header (showHeader = false) ...
1
vote
1answer
25 views

Is it possible to inject javascript without being need to add some visual component?

So, I have a Custom Link pointing to some static resource, this link is flagged as executable javascript. Then, I'm associating this link with custom component.Those are actually steps described ...
0
votes
2answers
29 views

taking rest response value from javascript to apex class

I'm getting Raw response for reports using rest API. Here is the code: <apex:page controller="ApiReports_cls"> <script ...
1
vote
1answer
17 views

Issue with Javascript not auto invocation on VF page

I am using a VF page to get the contents of a picklist and to display it on the page so a user can select a certain value and follow on with a case creation wizard.... I know I can do this with VF ...
0
votes
1answer
20 views

VF remote object paganition

If I am using VF remote objects and I want to allow paging through the results I need to add an OFFSET flag. ...
1
vote
1answer
20 views

Salesforce javascript alterate the custom object

Hello Stackexchange community. I'm trying to create a button that will allow to make some calculations based on the field in Custom Object (Contract_Information__c in my case). I've written this ...
1
vote
2answers
41 views

Access the force.com REST API with a pure Javascript page

I want to develop a front-end in Javascript (possibly with one of the fancy frameworks around such as AngularJS) that consumes the REST API of my Salesforce org. I don't want to embed my project in ...
5
votes
1answer
37 views

Stop Salesforce Standard UI Phone Number field formatting (on blur)

I would like to stop Salesforce from formatting phone number fields on blur when editing contact records through the standard UI. If I enter a mobile number (e.g. 0400 000 000) into the edit UI for ...
1
vote
1answer
46 views

How to pass an array of strings to JavaScript array from Apex controller

How can I pass an array of strings EventDates from method public String[] eventDates() to the JavaScript array in my visualforce page? datesFromCalendar holds an array of dates coming from JavaScript ...
-1
votes
0answers
27 views

Javascript/Visualforce Integration

I implement the guidelines for creating attractive presentation. When I preview, it shows me only the fields on single page. No CSS get applied on it. Please help me out. template: <apex:page ...
1
vote
1answer
19 views

Redirect to external link using Javascript

When I click GOOGLE1 button, the url is opened in a new window. But when GOOGLE2 is clicked, the page just refreshes. I'm missing something? <apex:page > <apex:form> ...
0
votes
2answers
54 views

How to save custom object data in salesforce with Apex controller

Following is my custom object controller in Apex. I think it will work fine with the data coming from VF page. But what for the variable datesFromCalendar which contains the contents of JS array. How ...
0
votes
1answer
38 views

Passing JavaScript Array to Apex Controller

I'm trying to pass JavaScript array to the Apex controller to save it in the Salesforce. First of all I'm unable to use Array or List in the controller, it gives type mismatch kind of error. Which ...
-3
votes
0answers
22 views

Best resources online to learn Javascript in Sales Cloud

Please suggest some useful resources online to learn about javascript in sales cloud.
0
votes
1answer
63 views

Open jQuery Dialog from Custom Button

We have a custom button on the detail page of the case designed to open a modal dialog popup, however receiving the $g(...).dialog is not a function error message. I've searched around the web and ...
0
votes
0answers
20 views

Salesforce Javascript for Email Templates error

Hello stackexchange gurus, I'm trying to create a button in Salesforce that will open an email template. The BCC recipients are based on certain options (Such as Deal Type and Supply Type, which are ...
0
votes
1answer
34 views

How to pass JavaScript array to Apex controller

Sorry for a simple question. I'm totally new to Salesforce. I want to pass JavaScript array to Apex to save its data in the Salesforce custom object. I want to know the best approach to do it without ...
0
votes
1answer
25 views

Setting Future Date in SF using javascript

Hello stackexchange gurus. I have a problem with setting a future Due Date for a task using javascript in Salesforce. Below is the piece of code i use: var d = new Date(); ...
0
votes
0answers
11 views

How to redirect to another page when we click on the (X) sign of LiveAgent_ChatForm

According to current functionality when agent click on End Chat button this get redirected to a survey page. Now according to current requirement, if client click on the (X) button to end the ...
0
votes
1answer
45 views

fancyBox jQuery for video pop up not working

I have written code so that i can embed videos in a visualforce page. However, I want the video to pop up in an aesthetic way. For that I am using fancyBox, which is not working. The details regarding ...
1
vote
2answers
39 views

Logging out of community on page load

My problem is when /secur/logout.jsp is executed it goes to login page. If user hit the back button it is going back to the previous page which should not happen. The following code is called on load ...
5
votes
2answers
78 views

document.getElementById('id').innerHtml = Static Resource Image

I have written one JS function on click of radio button, I want to show my Static Resource - Image file Help me out here **document.getElementById('id').innerHtml = ****************** My Static ...
0
votes
1answer
23 views

calling a javascript method to display a value on Output box by clicking apex command link

I am trying a scenario where on clicking a apex commandlink I need to capture a field's value and that value should be displayed on the same page in a seperate output text box or input text field. ...
0
votes
1answer
24 views

multiple function call to apex methods from javascript issue

I am trying to call three action functions from one javascript method and then trying to render some blocks after each action function completes. Some times it calls all the methods and sometimes it ...
0
votes
1answer
25 views

JavaScript alert message

I have created a Visual Force button for an Opportunity page. Part of it involves checking certain fields and using JavaScript alerts if fields are not correct. My issue is that the alert has in the ...
0
votes
0answers
32 views

Unsaved data handling in visualforce

I have a datatable displaying a list of records with pagination. Datatable supports inline-editing. Now i want to display warning popup if there are some unsaved data when the user tries to navigate ...
0
votes
2answers
28 views

Access Contact name from visualforce in javascript

I am on a visualforce page for a particular contact. Is there a way to access the name and id within a javascript block? A basic example: <apex:form > <apex:commandButton ...
2
votes
1answer
22 views

commandbutton changes its postion when shown using inline-edit shownonedit from when shown using javascript function

I have 2 commondbutons inside a div, initially display hidden . <div style="width:1000px;height:50px;text-align:left;"> <apex:commandButton value="Save" ...
0
votes
0answers
29 views

What values for the 'lktp' parameter are supported by the standard Salesforce lookup dialog?

I have some JavaScript code that shows a standard Salesforce lookup dialog for various types of objects, using something like: ...
3
votes
1answer
29 views

How can I avoid this JSENCODE() error when the help text is blank?

I've written a VF page that uses a lot of JavaScript. One particular pattern is giving me some trouble. I'm pulling the help text into a JavaScript object array, like so: var columns = [ { ...
1
vote
1answer
26 views

How to get Start URL value or ACS URL value of Connected App in Salesforce via Javascript or Apex Class?

I need to get Start URL value or ACS URL value of Connected App in Salesforce via Javascript or Apex Class, any idea how to do that? Regards, Gari
0
votes
1answer
24 views

Javacript on button to update a field on OLI

On a button click on parent object, i need to update a field in child object. I have tried to work out the below code,which if modified for parent works fine. But the moment I change it to work for ...
0
votes
1answer
40 views

Javascript not working in VF page

I have a requirement where when an option is selected in the picklist, one of the checkbox should be checked(whose id is PK1 in the code below). I tried executing using Javascript but somehow it's not ...
0
votes
1answer
28 views

how to download filter results from landing page in pdf/ any other format?

I have landing page which uses AmpScript and SSJS to displays result of filter on anather landing page in form of table. Is there any way I can save/download this table as pdf or any other format ...
0
votes
0answers
16 views

Task Creation for a case

I am trying to create a task from waiting button. I am able to open task creation page using the following Javascript... ...
0
votes
0answers
20 views

How can we add lookup dialog to unrelated field on custom object to a custom field on standard object

I have built a custom object that has a proposal number field that should be linked to custom proposal number field in Opportunity. Before I had this filed in custom object defined as lookup to ...
2
votes
1answer
34 views

VFRemote.js non-uglified/minified

Has anyone got (or know how to get hold of) a copy of the VFRmote.js in a non-uglified/minified state? I have, several times, had to debug the JavaScript remoting and run into issues since this is ...
3
votes
1answer
50 views

Dynamic Filter to query from visualforce chart

I have one requirement. I have to create dynamic report on task object, dynamic in the sense i have to get users name in a drop down list and if i select any user and click on "get report" I should ...
3
votes
1answer
82 views

Can you retrieve more than 2500 records with SSJS?

I am trying to use a script activity to update a data extension with the statuses of subscriber records. I have managed to get the code working but it will only add 2500 records. I have been reading ...
1
vote
1answer
30 views

Action Function not working

I have to upload a file using HTML input file and create a case and attach it to file. I am ablt to acomplish this using Javascript. Now I want to send the case Id to the controller. But I am not ...
1
vote
2answers
38 views

Is there a way to connect directly to Salesforce's REST API directly from JS? [closed]

I get a cross origin error when I do an AJAX call, and am wondering if there´s a way to solve that. Thanks!
1
vote
1answer
91 views

Return apex page message to Java script alert popup

I want to show the error message on Javascript alert popup.Is it possible? I have a custom detail button which calls below page and creates a related record.If related record exists then I want to ...
3
votes
1answer
92 views

How do you pass a global variable ($User) into javascript in Salesforce Visualforce?

How do you pass a global merge field type $User into javascript? I'm able to pull the User First Name into the HTML with the below HTML, but I would like to pass the User First Name into the ...
1
vote
2answers
31 views

List Custom button issue in Chrome

I am using List button in Listview as content source of OnClickJavascript, here am using three custom buttons one button is working perferctly. But another two buttons are not working in Chrome, these ...