New answers tagged

0

You are missing the Standard Controller in the apex:inputField. I think this below line. <apex:inputField value="{!mainTaskConfig .Task_Name1__c}" required="true" styleClass="slds-input" /> need to be modified with this one. Also there is a extra spece need to be removed. <apex:inputField value="{!Main_Task_Configuration__c.Task_Name1__c}" ...


0

An in-depth convention guidelines for APEX programming can be found at https://github.com/anupj/Apex-Code-Convention/blob/master/ApexCoding.txt Also, this document focuses more on the SalesForce administration side, how to name about every entity. https://github.com/cfpb/salesforce-docs/blob/master/_pages/Salesforce-Naming-Conventions.md Similar question ...


2

Yes, what you want to do can be done. You want to see the External Identity Documentation. In particular Dynamic Branding Using Custom Login Pages and Extend an Endpoint with the Experience ID. The latter will be the technique you'll need to use to provide the unique branding experience for each external app.


0

The problem with above code is unreleasedCheck is not associated with any record. So will show the last value assigned to it. You can overcome this problem by using a wrapper class. Create a wrapper class, add cdocs list and unreleasedCheck to it and initialize it in your way in APEX code. In VF, iterate the wrapper class list. You will get the output as ...


1

It appears to me that you're not setting the values of the variables you're asking about in your question following this section of code: for(Case_Associated_Document__c caseDoc : a){ unreleasedCheck = String.valueOf(caseDoc.Unreleased_Check__c); unreleasedCertificat= String.valueOf(caseDoc.Unreleased_Certificate__c); } I don't know ...


2

One way is to pass a reference of the page controller into the component like this. The component has an attribute defined: <apex:component controller="ComponentController"> <apex:attribute name="pc" type="PageController" description=""/> ... </apex> The page sets a value in that attribute via a controller property: <c:...


0

instead of commandButton use outputlink with target attribute. <apex:commandButton action="{ url to redirect}" target="_blank or _top">Click Here</apex:commandButton> Replace with: <apex:outputLink value="{ url to redirect}" target="_blank or _top">Click Here</apex:outputLink>


1

You have to instantiate PDFViewerCtrl after setting the parameters in the visualforce page. As you are creating an instance of PDFViewerCtrl first and then setting the visualforce page parameter it won't set the values in the constructor. The constructor is called when an instance is created of the class and when your instance is created, it won't find any ...


1

You implemented correctly in LWC of dispatching event. However callback function is not meant for adding some event handlers. You should add event listener directly. Below is the code with changes needed in vf page: <script> document.addEventListener("dosearch", function(event){ console.log('vf event data window listener => ', event.detail); });...


0

Your on-page JavaScript does not have direct access to the member variables of your page controller. You may populate values from the controller to your JavaScript using expression syntax, {! someValue }. However, expressions are essentially just text substitution performed by the Visualforce runtime: they aren't live references to the page's view state (...


1

This unit test should cover the code shown. Because createAccountContact() contains no branching logic, any unit test that Causes createAccountContact() to be executed. Does that throw an exception or fail an assertion. should cover it successfully. Because you've plainly accomplished (1), it seems the problem is likely (2) - somewhere, potentially in ...


0

You can use the headerValue attribute of <apex:column> to display the column header. Excerpt from the above mentioned documentation headerValue The text that should be displayed in the column header. If you specify a value for this attribute, you cannot use the column's header facet. Note also that specifying a value for this attribute ...


2

You should be checking "s" instead of mapKeys, and presumably check each value you're interested in: for(String s: mapkeys) { if(s == 'Account' || s == 'Contact' || s.startsWith('agf__')) { Note that if mapkeys came from a Schema.getGlobalDescribe(), they're always lowercased, so: if(mapKeys.contains('account')) { But, this would not do what you expect ...


1

<apex:page standardController="MyObj__c" action="{!IF(ISPICKVAL (MyObj__c.FieldA__c,'TypeA'), URLFOR(...), NULL)}"/> <apex:pageMessage severity="warning" summary="Sorry, you can not ..."/> </apex:page> You can use the page action attribute and return NULL to stay on the page. The ...


0

Have you checked the File Upload and Download Security settings under: Setup > Security Controls > File Upload and Download Security There is a row for PDF files. I believe you will want to change the Download Behavior to "Execute in Browser" to force the browser to display the PDF rather than downloading and saving the file on your computer.


2

You can use Apex Cookies to pass values between pages. Here's a working demo. On PageOne, whatever value user enters in the input box, that value will be stored in greeting cookie and will be retrieved on PageTwo and displayed on the page. // Page One <apex:page controller="PageOneCtrl" docType="html-5.0"> <apex:form> <apex:...


0

You need to use property variables in the wrapper class, see below : instead of this public class stateWrapper { public String stateName ; public Integer contactCount; public Integer accountCount; you have to use like this public class stateWrapper { public String stateName { get; set;} public Integer ...


0

If the desired action when clicking a button/link associated with action method SaveAction is to return to the user a PDF page: public PageReference SaveAction() { //insert Opp based on the values from the Input VF page. PageReference pdfPage = generatePDF(); pdfPage.setRedirect(true); pdfPage.getParameters().put('Id',someId); // to tell ...


0

I think you can use toExternalForm() method of URL Class to solve this issue toExternalForm() :Returns a string representation of the current URL. Example: String MySFURL = URL.getSalesforceBaseUrl().toExternalForm(); this will return your salesforce URL as a string. So you can try this: email.setHtmlBody('Hello ' + FirstName + '<br/><br/>...


0

This can be done in two ways: You should have to create imageLst in the CarouselTestController's constructor like this : public class CarouselTestController { public List<string> imageLst{get;set;} public CarouselTestController(){ imageLst.add('http://lorempixel.com/1500/600/abstract/1'); imageLst.add('http://lorempixel.com/1500/...


3

you need to use URL.getSalesforceBaseUrl().toExternalForm() to work url properly. It will solve your problem email.setHtmlBody('Hello ' + FirstName + '<br/><br/>Thanks for registering. This is your Member ID ' + contact.Member_ID__c+'.<br/><br/><a href="'+URL.getSalesforceBaseUrl().toExternalForm()+'/'+c.id+'">Click Here</a&...


0

I'd advise to start without the 'https://NotSureAboutThisOne/' line. I expect that that will allow you to preview the visualforce page (all the rest looks fine to me). The url parameter is the URL for the Lightning domain on your Salesforce instance. For example, https://myDomain.lightning.force.com. I doubt if this is actually necessary. Previewing the ...


0

The "AJAX" type switch mode results in a round-trip to the server and the DOM is regenerated. This wipes out any changes that may have been made to the DOM by the client since the last update. Change the switchType attribute to "client." Self-contained example follows. <apex:page > <script> function filter() { var ...


2

You will need a separate VF page with renderAs=pdf that contains all content you need. You would pass the newly created contact ID to this page so you can retrieve the appropriate fields (you might need an Apex controller to do this). However, you won't display this page to the user. Instead, your save process will instantiate a PageReference to that ...


2

When a work item is assigned to user through omnichannel. It creates one entry in Agent Work object. If a workitem is in user omnichannel then agent work status is assigned. If workitem moved to my work then agent work status changed to open. Try to build custom logic on this object to get the cases assigned to user using omnichannel.


0

Priya, here's a better pattern to use for populating selectLists as you only need to populate it once (lazy load pattern - worth learning). Note also variable names for clarity (and I renamed your custom setting) public String selectedReason {get; set;} public List<SelectOption> reasonOptions { get { if (reasonOptions == null) { ...


0

Any call to the controller that is not a partial page update (Ajax) will refresh the entire page using the values from the controller variables (getters) or controller getXXX methods As you have: <apex:actionFunction name="CallmySad" action="{!MethSad}"/> the controller action method MethSad is invoked and the entire page is refreshed. By adding ...


0

thanks for your response i resolved above issue by adding get ,,,, here is my working code public String TestReason {get; set;} public List<SelectOption> TestList{get { List<SelectOption> options = new List<SelectOption>(); options.add(new SelectOption('','--None--')); //List<Test_Reason__c> TestReasonValue = ...


1

Add in showHeader="false" to your apex:page tag. <apex:page showHeader="false">


4

You can use lightning component inside a VF page. In this way you can avoid maintaining the separate code base for VF Page. When VF Page will render it will display the lightning component. Create a lightning Application <aura:application access="GLOBAL" extends="ltng:outApp"> <aura:dependency resource="c:mycomponent"/> </aura:...


0

We created a Hierarchy Custom Setting called Environment Settings. This has tier specific information such as Base URL. Hierarchy Custom Settings are accessible from formula fields. One important thing to remember is to update this Custom Setting when you do a Sandbox refresh or deploy this between tiers to make sure it has the correct value.


0

Played around some more and turns out this change is what fixed it in the CSS: <style type="text/css" media="print"> @page { @top-center { content: element(header); } @bottom-center { content: element(footer); } size: 8.27in 11.69in; ...


0

As far as I know, account cannot have Partner user as owner. Have you tried another object? Try this with any custom object.


0

solved see the code above for the fixed version to this question


2

If you're looking to include page numbers inside of your PDF you can supply these dynamically with CSS in a @page rule. For example: @page { size: A4; margin: 2cm; @top-center { /* Page header, centered */ content: "Header Text" } @bottom-right { /* Page footer, to the right */ content: "Page " counter(page) " of " ...


0

@Nishad, the following nested syntax works for me according to https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_remote_objects_using_retrieve_query_object.htm. let criteria = { where: { Id: {in: ids}, or:{ Email: {like: '%test1%'}, or:{ and:{ firstname: {...


0

If you want to redirect to the parent's detail page, you can use the lookup field on child record and then navigate to that record. So your code should be public pagereference insertChild(){ insert childList; Pagereference parentPage; if(!childList.isEmpty() && !string.isBlank(childList[0].Lead_Gen__c)) parentPage=new ...


3

Not sure what you are trying to achieve here, but as far as I am understanding, you want to redirect to the parent's detail page after inserting the child records. If that's the case, then you can simply do public pagereference insertChild(){ insert childList; Pagereference parentPage; if(!childList.isEmpty() && !string.isBlank(...


0

I think you can resolve this error by initializing the parent obj like: Instead of this line Parent.Id=parentId; you have to initialize Parent: Parent = new Lead_Gen__c (); Parent.Id=parentId; But didn't understand what you are trying to achieve here by updating parent. Since you are not passing any parent field values...


2

I did come across this known issue on the SFDC side; however, it didn't specify if it was classic only or not. I'm hypothesizing that this is largely due to the fact that Lightning appears to process task list views different than classic. The list of "views" for classic is different from what we have available in Lightning. I think it's that key difference ...


0

I think you can add 'in' after the 'like' condition, try like this instead of where: { Email: {like: likeEmailList } } try like this where: { Email: {like:{ in: likeEmailList} } } if you are still facing any issue, the below method should work: where: { ...


1

From what I have read above; I believe you need to use the renderedCallback() method, which is a part of the rendering lifecycle of an LWC and runs once the rendering phase has completed. You can see the Component Lifecycle info here. So you would need the following instead: renderedCallback(){ window.addEventListener('message', function(event) { ...


0

Currently, Salesforce does not allow to show and hide the actions on a page layout based on some condition, but if you have the record types, you can create a different page layout for each record type and keep the buttons required for that record type. This will give you the flexibility to show and hide button when you are using record type. Else, You ...


0

You can't hide button but you can add validation on button and perform validation based on your requirement for Onclick Javascript Custom button. Ex: { !REQUIRESCRIPT("/soap/ajax/32.0/connection.js") } if (addYourConditionHere) { alert('Validation message on button') }


0

That it is only occurring for a subset of the columns makes me think that your input CSV might not contain the exact headers Full Name and Manager Email. It is possible that there are encoding issues with those headers. E.g. In reality they might actually be "Full Name", or Full Name (with a trailing space), or any other combination of characters that ...


0

Looks more like the rerender might have been your issue. For anyone else running into similar issue. Per, apex:param not assigning value within apex:actionSupport for apex:inputCheckbox


0

I can't add comments to ask this question, because of my low reputation, but can you use getContentAsPDF()? does this have to be a word doc?


0

I think you can change the input field size using the slds style class(change size--12-of-12 to size--4-of-12): instead styleClass="slds-select webformField slds-size--12-of-12" you can try like this styleClass="slds-select webformField slds-size--4-of-12" Hope this will work...


0

I ended up by doing it in javascript as follow. function calculateSize() { var total = 0; j$("input[name='att_ids_group[]']:checked").each(function() { total += j$(this).data("size"); }); j$("#zipSize").text(total); if (total > "1500000"){ j$('#alert').text('Total size of files selected cannot exceed 1,500,...


1

Its Not possible. Reason: If you notice what is rendered for tag <apex:>, you will find that there are lot of elements like div, span etc. But the most important one is iframe inside which we enter the content. Inside iframe you will find another html document in which you will simply have head and body. You cannot get functional placeholder by ...


Top 50 recent answers are included