I really need to use lightningStyleSheets=&quot;true&quot; in my component (styled otherwise it just doesn't look as nice). (standardcontroller=&quot;Lead&quot;). Where I'm stuck is that I need to take this page and save it as a pdf to the lead record, which seems to requre using renderas=&quot;pdf&quot;. However it seems these 2 cannot be used together-- it just displays Salesforce Internal Error... on the page. I am trying to think of some sort of workaround. Is there any way to upload this page to the Lead record without using renderas=&quot;pdf&quot;? What if I load the page in a lightning component, then load that component in a new vf page- would that work? Just trying to think of anything.. really need to make this work :) Any suggestions are appreciated
123521
I have a VF page with lightningstylesheets = &quot;true&quot;. (This needs to stay this way-- when I take that away the whole page doesn't look right.) I need to save this VF page as a PDF to my Lead record, from an after update trigger. I am seeing that I cannot use renderas=&quot;pdf&quot; together with lightningstylesheets=&quot;true&quot;. I am also seeing that when I try to save the page as is as a pdf, it does not work-- the logs say  Internal Salesforce.com Error.  Does anyone have experience with a similar issue? How can I make this work? Here is the code I'm trying to get the body of the page as pdf:  PageReference pref = Page.SEEK_MVP_PDF_Display;         pref.getParameters().put('id',leadId);         Blob b; if(Test.isRunningTest()) {   b = blob.valueOf('Unit.Test'); } else {    b = pref.getContentaspdf();    system.debug('B: ' + b); } ContentVersion cv = new ContentVersion();         cv.versionData = b;         cv.title = 'SEEK Medicare Eligibility Check';         cv.PathOnClient = 'SEEK_Eligibility_Check.pdf';         insert cv;  ContentVersion Content = [SELECT id, ContentDocumentId FROM ContentVersion where Id = :cv.Id];         ContentDocumentLink contentlink=new ContentDocumentLink();         contentlink.LinkedEntityId= leadId;         contentlink.ShareType= 'V';         contentlink.ContentDocumentId= Content.ContentDocumentId;         insert contentlink;
24391
Following up this question , I am wondering if it is possible to make use of the Change Password lightning component:    It is not documented anywhere, and it is not used in standard pages.       The default Reset Password page uses some standard salesforce-like change password form.   The Visualforce page, well it's pretty basic VF page...  So here are my questions:   Where can I use the Change Password component? Is is possible to customize this component?
77359
This isn't a question about the pros/cons of Lightning/Visualforce, but is a question about how to build custom UI for the period of time (a year or many years?) where some users/orgs have Lightning Experience turned on and other users/orgs don't.  Is the answer that you have to implement the custom UI twice, once in Lightning and once in Visualforce? Or is there a better approach?  (I am thinking particularly about managed packages that in principle should work in all sorts of orgs, but the problem also applies to once-off code in an org if only some users have Lightning Experience turned on.)  PS  The comment thread on the question below includes a link to Trailhead's  which looks like a good resource on how to get existing Visualforce to work in both classic and lightning environments. I'm getting the impression that building app UI that uses Lightning technology at all (client side MVC etc) will not be commercially rational (and there are certainly technical limitations too) for some time to come...
74032
Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?  How do I import * from @salesforce/schema or @salesforce/label?  I am looking for a way to get all labels or all SObject describe information details to retrieve in LWC at once.  I can see that such syntax is provided by ES6 and is used widely by Salesforce itself, however, it is not possible to use the following syntax in LWC:   import * as schema from '@salesforce/schema'   import * as label from '@salesforce/label'   or this syntax  import {label, schema} from '@salesforce';   since both versions generate error     LWC1512: Missing resource value for @salesforce"   or      LWC1512: Missing resource value for @salesforce/label   Is there a way to load every label data and every SObject description data using only Javascript without any Apex Server-side code?  By the way, if we look as Salesforce Playground we could notice that   the same syntax is used to import everything from lwc  import * as Engine from 'lwc';   however, if we try to insert such line into any of Lightning Web Component, we would receive the following error     LWC1001: Invalid import. Namespace imports are not allowed on "lwc",   instead use named imports "import { LightningElement } from 'lwc'"   or   LWC1517: Invalid LWC import
9557
I am trying to build navigation from one component to another in a Lightning application. Following this answer  got me working with one exception, the new page doesn't seem to be in the Salesforce1 navigation context, there is no back arrow when the second component is loaded.   Am I missing something simple? Sure feels like I am.
32398
Like we do have SymbolTable for apex class, to find their references/dependencies; do we have anything for the Lightning Components(to find dependencies/references of lightning components/application/events).  Please let me know, if there are any other(native to Salesforce) mechanisms.
64328
In Aura, we can do      $A.get('e.force:refreshView').fire();   to cause standard components to update.  How can we do an equivalent in LWC because sfdx refuses to publish .js code with $A in it saying the usage is disallowed in LWC?  For now i tricked it with   eval("$A.get('e.force:refreshView').fire();");   but that is obviously less than ideal....
10770
I have the following VF page, but when I render it as pdf the Apex:repeat tables break in the middle to the next page. I'm thinking of limiting the tables displayed in each page to avoid table breaks. Is there any way of doing this or any better ideas ? Any help on this would be appreciated.   &lt;!-- Report Data --&gt;         &lt;apex:outputPanel layout="none" &gt;             &lt;apex:repeat value="{!rsReportRows}" var="reportRow" &gt;                 &lt;!-- Risk Data --&gt;                 &lt;table cellpadding="7" style="border-top:1px solid black;border-left:1px solid black;border-right:1px solid black; border-bottom:1px solid black; width:100%;"&gt;                     &lt;tr&gt;                         &lt;td style="text-align:center;" colspan="{!parentObj.fieldApiNamesList.size}" &gt;&lt;b&gt;Risk&lt;/b&gt;&lt;/td&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;apex:repeat value="{!parentObj.fieldLabelsList}" var="fieldLabel" &gt;                             &lt;th style="font-size:{!pdfFontSize}pt;" &gt;&lt;apex:outputText value="{!fieldLabel}" /&gt;&lt;/th&gt;                         &lt;/apex:repeat&gt;                     &lt;/tr&gt;                     &lt;tr&gt;                         &lt;apex:repeat value="{!parentObj.fieldApiNamesList}" var="field" &gt;                             &lt;td &gt;                                 &lt;apex:outputField value="{!reportRow.risk[field]}" rendered="{!field != 'risk__residual_score_movement_direction__c'}" /&gt;                                 &lt;apex:outputField value="{!reportRow.risk[field]}" rendered="{!field == 'risk__residual_score_movement_direction__c' &amp;&amp; (CONTAINS(reportRow.risk[field],'Up') || CONTAINS(reportRow.risk[field],'Down') || CONTAINS(reportRow.risk[field],'Right'))}" /&gt;                             &lt;/td&gt;                         &lt;/apex:repeat&gt;                     &lt;/tr&gt;                 &lt;/table&gt;                  &lt;!-- Related List Data --&gt;                 &lt;apex:repeat value="{!relatedList}" var="rList" &gt;                     &lt;apex:outputPanel layout="none" rendered="{!rList.isSelected &amp;&amp; rList.fieldsList.fieldApiNamesList.size &gt; 0}" &gt;                         &lt;table cellpadding="7" style="border-bottom: 1px solid black;border-left:1px solid black;border-right:1px solid black; width:100%;"&gt;                             &lt;tr&gt;                                 &lt;td style="text-align:center;" colspan="{!rList.fieldsList.fieldApiNamesList.size}" &gt;&lt;b&gt;{!rList.relationshipLabel}&lt;/b&gt;&lt;/td&gt;                             &lt;/tr&gt;                             &lt;tr&gt;                                 &lt;apex:repeat value="{!rList.fieldsList.fieldLabelsList}" var="fieldLabel" &gt;                                     &lt;th &gt;&lt;apex:outputText value="{!fieldLabel}" /&gt;&lt;/th&gt;                                 &lt;/apex:repeat&gt;                             &lt;/tr&gt;                              &lt;apex:repeat value="{!reportRow.objRecords[rList.relationshipName]}" var="record" &gt;                                 &lt;tr&gt;                                     &lt;apex:repeat value="{!rList.fieldsList.fieldApiNamesList}" var="field" &gt;                                         &lt;td&gt;                                             &lt;apex:outputField value="{!record[field]}" /&gt;                                         &lt;/td&gt;                                     &lt;/apex:repeat&gt;                                 &lt;/tr&gt;                             &lt;/apex:repeat&gt;                         &lt;/table&gt;                     &lt;/apex:outputPanel&gt;                 &lt;/apex:repeat&gt;                 &lt;div style="clear:both;"&gt;&amp;nbsp;&lt;/div&gt;                 &lt;div style="clear:both;"&gt;&amp;nbsp;&lt;/div&gt;             &lt;/apex:repeat&gt;         &lt;/apex:outputPanel&gt;
72357
i just observed  release notes, and in my org critical updates area, we r using $A.createComponent()/ $A.createComponents() in bunch of our custom lightning cmps's. still i am not under stand how this critical updates 'll effects of our orgs, can you please explain how it'll effects for below code snippet.  we r using simple like below:  cmpcontroller.js  opencustomcmpmodal: function(component,field1,field2,field3){  var attributes = {    'chldfield1': field1,    'chldfield2': field2,    'chldfield3': field3 };      $A.createComponents(                 [                     ["aura:html", {                         "tag": "h2",                         "body": 'Modal header',                         "HTMLAttributes": {                              "class": "slds-text-heading_medium slds-hyphenate"                          }                     }],                     ["c:mycustomcomponent",attributes]                 ],             function(components, status) {                 if (status === "SUCCESS") {                     modalheader = components[0];                     modalBody = components[1];                    var promiseaction =  component.find('overlayLib').showCustomModal({                        header:modalheader,                         body: modalBody,                         showCloseButton: true,                         cssClass: "my-modal,my-custom-class,my-other-class"                     });                     component.set("v.modalPromise",promiseaction);                 }             }); }
73821
In Visualforce you can use custom html attributes like this   &lt;apex:outputText html-data-myAttr="myValue" ... /&gt;   Now in a Lightning-Component trying the same  &lt;ui:outputText html-data-myAttr="myValue" ... /&gt;   I got only     The attribute "html-data-myAttr" was not found on the COMPONENT markup://ui:outputText: Source   How to set custom attributes in Lightning?
120135
I've two components:  &lt;c:Lightning_component_Aura&gt;   &lt;c:lwcLightningWebComponent aura:id="myLwcComponent" /&gt; &lt;/c:Lightning_component_Aura&gt;   I've declared a function inside LWC using @api. Now the documentation says, this method can be called from Parent component but the way they provided is for if parent component is also LWC component.  I would like to call this child LWC component from a parent Aura component. Like we do by provideding a aura:id to an Aura component and find that instance and call the aura method.  Aura Example:  component.find('childComponent').method1();   I tried supplying LWC an aura:id and call the @api method like this but it did not work.  Any suggestions on how to do that?
85334
I am currently having an issue to show the content fetched from salesforce database to UI. The data is stored in HTML form and I want it to show on UI using LWC without escaping HTML. Previously we were having specific component in lightning and VF page to unescape HTML and show the HTML content on UI. I am looking something similar to it.  Here is the code,  &lt;template if:true={teamRecords} &gt;     &lt;template for:each={teamRecords} for:item="team" for:index="index"&gt;          &lt;div class="col-md-3 col-sm-3 col-xs-12" key={team.item.siteComponent.Id}&gt;               &lt;h4&gt;{team.item.siteComponent.Title__c}&lt;/h4&gt;               &lt;div lwc:dom="manual"&gt;                     {team.item.siteComponent.Description__c}                     &lt;!--I want to use the Unescape HTML here--&gt;               &lt;/div&gt;           &lt;/div&gt;     &lt;/template&gt; &lt;/template&gt;
67600
I am using style attribute to use media queries in lightning components something like this:  &lt;style&gt;   .legendBox {     background: none!important;     min-height: 50px;     padding: 5px 0px;     position: absolute;     width: 90%!important;     left:9%;     margin-top:-15.25%!important;     border:0px!important;   }    .bootstrap-sf1 .pre-scrollable {     max-height:none!important;                   overflow:none!important;   }  &lt;/style&gt;   My question is how to use these media queries in css section of lightning component. If possible please suggest the method as I am trying to submit the code for security review. Will it fail there?
110287
I've been exploring implementing Angular 2.0 in Salesforce custom pages and found that if I set showHeader=true in the VF page, I run into some issues.   It looks like including the header loads "sfdc/main.js", which defines the browser's Map() function without checking if one already exists. This removes some needed prototype functions that are native to ES5/6 such as "set" (needed in Angular 2) and "delete" (needed for an ES6-shim).   I've found that even including an ES5 shim before the ES6 one in attempts to restore some of these prototype methods does not work. If I set showHeader=false, "sfdc/main.js" is not loaded and everything works fine.   Is there a recommended way around this, or is it possible to update "sfdc/main.js" to conditionally define Map() if one does not already exist? It looks like it leaves out quite a few native functions supported in modern browsers.  Thanks
113698
We are developing a new Lightning Community to replace our Partner Community. However, when we use our visualforce pages with LightningStylesheets=true on the Lightning Community, the Lightning styling is not applied.  I understand that this is the case because Lightning Communities are not Lightning Experience.  Is there a way to force LightningStylesheets anyway? I am trying to stay away from having to rebuild/restyle all our legacy visualforce pages.
43180
I'm trying to make a component in my community be able to pull in the record Id.  I followed the information in this question:   And this documentation:   My config file looks like this:  &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"&gt;     &lt;apiVersion&gt;45.0&lt;/apiVersion&gt;     &lt;isExposed&gt;true&lt;/isExposed&gt;     &lt;masterLabel&gt;ContractorSearch&lt;/masterLabel&gt;     &lt;description&gt;Searches for contractors for a given set of criteria&lt;/description&gt;     &lt;targets&gt;         &lt;target&gt;lightning__RecordPage&lt;/target&gt;         &lt;target&gt;lightningCommunity__Page&lt;/target&gt;         &lt;target&gt;lightningCommunity__Default&lt;/target&gt;     &lt;/targets&gt;     &lt;targetConfigs&gt;         &lt;targetConfig targets="lightning__RecordPage"&gt;             &lt;objects&gt;                 &lt;object&gt;Requisition__c&lt;/object&gt;             &lt;/objects&gt;         &lt;/targetConfig&gt;         &lt;targetConfig targets="lightningCommunity__Default"&gt;             &lt;property name="recordId" default="{!recordId}" type="String"                  label="Record ID" description="Should not be changed from default value."/&gt;         &lt;/targetConfig&gt;     &lt;/targetConfigs&gt; &lt;/LightningComponentBundle&gt;   Any ideas?
11623
If we want to have custom lightning component in LWC lightning-datatable, for example Upload file for each of the records, how can we do that?