Questions tagged [visualforce-component]

Visualforce components encapsulate a common design pattern and can be reused several times in one or more Visualforce pages. Salesforce provides a library of standard, pre-built components, such as <apex:relatedList> and <apex:dataTable>, that can be used to develop Visualforce pages. In addition, you can build your own custom components to augment this library.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

<apex:outputlink> how to switch the value of target attribute between “samepage” and “_blank”

I built a table, each value on the first column will be a link. So if I click link A, a new tab will be opened. And then if I click link A again, instead open a new tab the already opened link A, ...
0
votes
1answer
17 views

Community Builder - Embedded Visualforce Page does not display

I'm building a Lightning Community. When I add a Visualforce Page Component within the Builder, it displays correctly: But when I publish changes and access the community, it does not: No errors are ...
0
votes
2answers
29 views

I'm trying to add a input -picklist field in my lightning component

Here are the snippets of code: Component: <aura:component implements="lightning:actionOverride,flexipage:availableForRecordHome,force:hasRecordId" access="global"> <...
0
votes
1answer
17 views

Format String Visualforce Component in a Custom Visualforce Template

I am struggling with something I think should not be difficult but I am not able to figure out, my date field display as the below screenshot. My aim is to remove from the template the characters 00:...
0
votes
2answers
35 views

Unable to make VF field read only

I have a field on a component for a VF page that I need to make read only for everyone unless they are listed in a picklist field(Project_Manager__c). I can see the usr value in the debug log so I ...
0
votes
1answer
28 views

Passing wrapper class data from vf to the component

how can i pass wrapper class data from vf page to component and show it in the data table or pageblock table I have the following code which creates the wrapper object. public class ...
1
vote
1answer
23 views

System.VisualforceException: Read access denied for Lead, controller action methods may not execute

I have removed Read and Created access for Lead object for Guest user profile which is for public sites. But controller is in Without sharing mode. Still it is throwing visualforce exception: Read ...
1
vote
1answer
42 views

How to store state and conditionally render UI of a VF component in JS

I am enhancing the app setup application to replicate Setup Assistant UI. To build the expandable setup UI. I need to store the state(Expanded/Collapsed) of the component. Normally in Aura/LWC, I ...
0
votes
0answers
17 views

Salesforce Note Lightning Component

Is it possible to create a custom Lightning Component which will open Enhanced Notes from within the component or added tab? I want it to be reportable related to the component, but only have the ...
0
votes
0answers
9 views

The first apex:tab inside a tab:panel always getting the default selection option value

We have seen a weird behavior in an existing component like below. Whenever we've changed the apex:selectOption value from the first tab of an apex:tabpanel is taking the option as the default value ...
1
vote
1answer
86 views

Constructor get called twice when Visualforce component has <apex:actionfunction> inside it

On my account detail VF page, I have added 5 custom related lists. 3 of those related lists have <apex:actionfunction> in the component code. I found out that the constructors of these ...
0
votes
0answers
21 views

Create select all checkbox such that if select all is done then all attachments must get selected

Below is my VF Page and i need to create select all checkbox such that if select all is done then all attachments must get selected and then user can delete them at a go. VF PAGE <apex:page ...
0
votes
0answers
29 views

Auto-populate lookup field works using onchange event but doesn't get selected

I have a Visualforce page where I have a lookup field Cleaning_Company__c. The Visualforce page is present inside a force.com site. I want this field to get automatically populated once the password ...
1
vote
2answers
33 views

Same Image Preview getting displayed for all attachments

I am trying to display respective attachment preview on a VF Page, but if you can see below picture of my VF page, same image is getting displayed for all attachments, not sure where i'm going wrong ...
1
vote
1answer
29 views

Create multiple delete functionality for all the attachments related to a particular case

I have created a button on case detail page called "delete attachments" once pressing that, the page directs to below VF page where all related attachments to that particular case are displayed with ...
0
votes
2answers
22 views

Result is Not Displayed After Pressing the button

I am new in Salesforce Coding. I am doing some practice in apex and visualforce page. I have one scenario here. Once I fill the form , land on next page. On this new page, when I click on 'Total ...
0
votes
0answers
16 views

Image not rendering as pdf in visualforce page when adding data:image/jpeg;base64 as an image property [duplicate]

I need to render an image in Visualforce as pdf. When I load the page without the renderAs="pdf" the image loads But the same image doesn't render in pdf except for a small box. Visualforce page to ...
0
votes
1answer
63 views

how to pass data from form made on LWC to visualforce page

I've been trying to connect paypal with salesforce using paypal api: "https://www.paypal.com/sdk/js?client-id=sb&currency=USD"> the problem, i'm not able to implement this api in lwc but i ...
3
votes
2answers
62 views

visualforce cross page communication

I have two visualforce pages, each containing a different visualforce component, that are on the same object layout, and now I have to make them communicate between each other. I have tried making ...
0
votes
1answer
18 views

How to separate particular field from a JSON response?

I am trying to retrieve a list of custom objects using an HTTP Request inside the visualforce page. I am able to send the request properly and I am also getting the result properly. The json response ...
0
votes
1answer
17 views

get <apex:input> value on button click

I have created a datepicker inside the visualforce page using <apex:input> and I want to get value of that <apex:input> into a variable. After little bit bit of googling , I found that ...
0
votes
1answer
31 views

how to display Url inside a <apex:pageBlockTable>?

I created a custom object with two cloumns, name and url. I just want to dislay these inside an apex page using <apex:pageBlockTable>. I used the following code: <apex:pageBlock id="...
0
votes
2answers
39 views

I'm getting the following error when I click New button which is a VF page that is linked with a PageExtension. Please help

List has no rows for assignment to SObject Error is in expression '{!urlIICRedirectEdit}' in component <apex:page> in page agciic_edit: Class.AgriFiIICPageExtension.urlIICRedirectEdit: line 45, ...
2
votes
1answer
68 views

ListView not loading - “Could not find requested ListView: '{!listName}'. Please contact your administrator.”

I have a combination of an Apex Class, an Apex Controller, a Visualforce Page and a Visualforce component that when put together, are suppose to show a drop down of Contact list views sorted ...
-2
votes
1answer
11 views

How to grab a my current Salesforce instance in an Apex class and reference it to my VF page [duplicate]

I know this should be a piece of cake but I am not a developer and just started today learning Apex. I have created an Apex class that supposedly grabs my current Salesforce URL instance then passes ...
1
vote
0answers
18 views

Accept button in email message that triggers a process in salesforce to update case record [closed]

I would like to know if it's possible to have Accept or Reject button in email message that a recipient can click then will trigger an update process (WF, PB or Flow) in a case record? The email that ...
0
votes
1answer
40 views

Issue with Test Class unable to cover SOQL query and insert statements

I have created a VF page that is basically a form. The issue is that my test class is unable to cover the SOQL statement inside the retrieve method. Also, it is unable to insert ptw or cle in save ...
0
votes
2answers
38 views

Not able to display list of string in visualforce email template

I have a controller public class EmailController { public string AppId{get;set;} List<App_Child__c> aPRList=[select id,name,status__c from App_Child__c where App__c=:Appid limit 10]; ...
1
vote
0answers
76 views

Using custom fonts in visualforce email templates

I am creating visualforce email template and need to use custom fonts (mostly Neutraface Display, SalesforceSans, TrailheadBold2). Most of the search results i get are about using them in visualforce ...
1
vote
0answers
62 views

Send Approval Comments in Visualforce Email

I have a custom Visualforce email template with a VF component inside it that displays the most recent Comment from an approval process. It is built with the same approach shown in this blog post by ...
0
votes
1answer
26 views

Is it possible to use here 1 VF component for 2 VF pages?

I have a controller with 2 different methods: first takes the list of today's masters, and second - the list of tomorrow's masters. It's all the difference between my PDF pages: I made them as List ...
0
votes
0answers
18 views

'chaturl/chat/rest/System/SessionId' from origin VF page blocked by CORS policyResponse to preflight doesn't passcontrol check

VF Code:-- <apex:page> <apex:includeScript value="{!$Resource.jQuery}"/> <script> function myFunction(e){ alert('working'); console.log('Function called'); ...
0
votes
0answers
30 views

Call Custom Controller Extension Method in Aura Component Controller

I have a visualforce page that uses Javascript to execute a lightning component which fires off a flow (as seen below): function selectHandler() { var curUser = '{!curUser}'; console.log(...
0
votes
1answer
31 views

How to show fields based on a condition for other field

I want to show 4 custom fields (W__c, X__c, Y__c, Z__c) when other custom field have the following condition: If RealNumber__c < TargetNumber__c then show this field: W__c, X__c, Y__c, Z__c else ...
0
votes
0answers
92 views

Lightning Component issue sObject type 'Site' is not supported in Spring '20 Sandbox

I am having an issue saving any lightning component code in the developer console. I think that this must be an issue with Salesforce because even just changing string values with in html causes error ...
0
votes
0answers
163 views

how to set an attachment to the sendEmail quickaction apI through lightning component?

i need to populate the attachment on send email lightning quick action api. i can able to set the subject to the email quick action, but i need to add the attachment to the email. How can i send the ...
0
votes
2answers
131 views

How to convert json string to List<Map<String, Object>> in salesforce apex class?

I have this json string. [ { "id":2, "name":"Abc_SS", "description":"Abc" }, { "id":100, "name":"sales", "description":"sales" } ] How I can convert this json to List&...
0
votes
0answers
21 views

Contact Activity Timeline - adding other Contact related information (Cases created)

A question: would it be possible to add to the Contact Activity timeline items such as Case created , potentially also Chats & Messages from the service console? The idea being a more wholesome ...
0
votes
1answer
62 views

VisualForce Page - Apex:Repeat & Map not showing any values

I have problem showing my map value to the visualforce page, in my controller I populate the maps and create below method public Map<String, Decimal> getmapTargetCurrentMonth(){ return ...
0
votes
0answers
30 views

ActionSupport parameters not passing from component but will pass with same code outside component

Usually I'm able to find the answers to everything by searching, but I haven't come across any examples of this answered. I did find a couple questions that looked like they might be the same issue, ...
1
vote
1answer
29 views

Persisting Logs in Managed Packages

What is the best practice to persist logs from apex classes, batch jobs, and controllers? We are still in the development stage so we haven't considered LMA. We tried to store it in a custom object. ...
0
votes
0answers
37 views

Structure of visualforce page using standard controller, extension and wrapper of data?

I am creating a component to add to a contact record that shows aggregated note data from two different sources. Page <apex:page id="AggergatedNotes" standardController="Contact" ...
0
votes
0answers
30 views

Javascript Error when trying to use apex:actionFunction on service console

I have a visualforce component I am working on that simply has a table of data that is shown on a page layout within the service console. When you click on a link in the table, it opens a subtab using ...
0
votes
1answer
71 views

How can I pass a GET query param into my server side APEX controller?

Background: I am trying to redirect a user from an external site to my salesforce visualforce page with a GET query param as part of the URL. (This is part of a managed package) I want that parameter ...
1
vote
1answer
54 views

Trying to create an apex page with a specific height

I am not new to development but am when it comes to Salesforce Visual Force. I am trying to create a page that will be a certain height. When this Visual Force page is inserted into the Salesforce ...
0
votes
1answer
39 views

Pass the ID of current record to Visualforce Component from Apex Class/Controller

I'm working on a Visualforce Email Template which will be sent from the parent Loan (LLC_BI__Loan__c) record in Salesforce, and I'm trying to include fields from the child Entity Involvement (...
0
votes
1answer
12 views

Email address as a parameter in vf page

PageReference retURL = new PageReference('/OrderHistoryguest?orderNumber='+sapOrderNumber +'&email='+userEmailAddress); when i have passing email by apex class to vf page as a url parameter its ...
2
votes
1answer
635 views

Opening the VF page in a new Tab Lightning

We are converting a VF Page from Classic to Lightning and this VF page called from the button in Classic is like So when the button is clicked in Classic it opens the VF page in a new pop up window. ...
0
votes
0answers
12 views

Pass the new inputfield value to javascript before writing to the database

I have VF page. Some code: <apex:page standardController="CallReportHosp__c" extensions="CtrlCallHospEdit" id="CallsHospEditt"> <apex:form id="myForm"> <script type="text/javascript"&...
0
votes
0answers
14 views

Visualforce parent page child component communication question

I hope the following diagram elaborates the issue somewhat: Here is my use case: A VisualForce Page has the following area in it: A pageblocktabledisplays that shows some line items with some input ...

1
2 3 4 5
22