Questions tagged [template]
The template tag has no usage guidance.
92
questions
7
votes
1
answer
35k
views
Using arithmetic comparison in if:true statement in Lightning web component [duplicate]
I came to a situation where I want to render a text based on there index value. So, Let's assume I am having a loop which is having an index variable and I want to show some specific text if the index ...
7
votes
2
answers
905
views
Syntax guide for working with Salesforce Web Components
I am struggling to find any syntax documentation related to building a Web Component, and could really use some help.
For example, in my JS file I make a call to a custom APEX api that returns a ...
4
votes
0
answers
669
views
LWC: Add a region in custom community theme
I would like to add a region in my custom community theme.
For now I am only able to add my LWC components in the body area and would like to know how I can declare regions in my theme to accept LWC (...
3
votes
1
answer
11k
views
Iterate a Javascript map in Lightning Web Component template
I'm not very good with javascript, but I'm trying to iterate over list of values of a map/json objects to show them in an LWC. I'm not really sure if this could be achieved, but here's my sample code.
...
3
votes
2
answers
16k
views
LWC: Inside an HTML template for-loop, set loop variable property to new user-typed input element value?
I'm trying to write a Lightning Web Component (yay, first one).
Still in the "proof of concept; can I get user input to propagate around the page?" stage.
I have a List<MyApexWrapperClass> ...
3
votes
2
answers
4k
views
Creating custom Community Template
Is it necessary to use the templates (Kokua, KOA, Napili) provided by salesforce for building community or we can create our own community templates?
If yes, how is it possible. i am unable to find ...
3
votes
1
answer
906
views
How to add custom components to the new Email template builder in Salesforce sales/service cloud
I am trying out the new Email template builder in Salesforce service cloud (winter 21). Here you can drag standard components to the email canvas and configure them. I would like to have some ...
3
votes
0
answers
216
views
Clarification for all Data Extensions' templates
I would like to clarify several Data Extensions templates since there is almost no documentation available.
To be exact, I would like to know what are the use-cases and implementation steps for those ...
3
votes
0
answers
489
views
How To Create a Pinned Region in Custom Page Template
In a Lightning App, I've already created a custom page template successfully - relatively straightforward.
Now I need to create a custom page template that includes a pinned region, like in some of ...
3
votes
0
answers
567
views
Error when trying to deploy Lightning Page: "Error: You can't change a Lightning Page's associated template"
Relatively new to the SFDC world and I've come across this issue when trying to deploy Lightning pages to a new sandbox. When deploying my lightning page via workbench I get the following error:
...
3
votes
0
answers
118
views
Update object through Visualforce email template
I have a scenario where I have a custom object to store temporary keys. In my Visualforce email template, I fetch a key and inserts into the email and that works great.
But, I need to be able to set ...
3
votes
0
answers
1k
views
How do I export a Community Template from the Lightning Community Builder?
In the Salesforce Winter '17 "Using Templates to Build Communities" Docs (http://resources.docs.salesforce.com/204/11/en-us/sfdc/pdf/community_templates.pdf) the steps for exporting a Community ...
2
votes
1
answer
4k
views
Lightning web component - how to get width of an element in javascript
I want to get the width of an element in js and based on that width want to perform some animations. I am resizing the width of the below div from 1112px to 752px through CSS animation, when it ...
2
votes
1
answer
722
views
template if:true with get variable is not working
I have a custom part of code that I want to be displayed based on a custom logic
cmp:
<template if:true={myvar}>
<!-- custom code -->
</template>
js:
@track data;
get myvar(...
2
votes
1
answer
39
views
Duplicate Rule not firing for sample data Installed from Trialforce Template
I found out today that a duplicate rule on one of my objects does not fire. After doing a lot of testing I found out that it only doesn't fire for records which were installed as sample data when the ...
2
votes
1
answer
226
views
Visualforce Email Template PDF Attachment - Hide Table base on query result
I have a PDF attachment created via visualforce email template. I have a controller grabbing all quote line items, but would like to section off the line items based on a field (which I was able to ...
2
votes
2
answers
739
views
Quote Line Item Description vs Product Description
I don't understand the relationship between Product Description and Quote Line Item. They seem to be the same, yet they're not.
I'm trying to create Rich Text description for a Line Item
In a Quote ...
1
vote
1
answer
7k
views
LWC onClick for div not returning id or data-id for either target or currentTarget
Here is another issue I can't seem to figure out, had it working in past project, did the exact same thing and nothing.
No matter what I try the event param will not give back the id set in the ...
1
vote
1
answer
4k
views
How is the <template> tag used in lwc different from one used in web components?
According to usage of <template> in web components:
The elements under template won't appear in your page until you grab a reference to it with JavaScript and then append it to the DOM
For ...
1
vote
1
answer
79
views
How to do binary conditional rendering lightning web component [duplicate]
I have created a lightning web component to show several related object tables on a detailpage. Above one of the tables I want to show some extra specific data related to one of the object tables.
We ...
1
vote
1
answer
57
views
Record page link is not appearing in the email
I am sending out an email from my code after a certain action, and I am trying to add the record link to it. But in the email that is being sent out, the link of the record page is not appearing or ...
1
vote
1
answer
619
views
LWC: Can a "<template for:each=" be used with an inner "<template for:each=" where the inner for-each gets its value using the key from the outer?
I was looking to do the following and I'm not sure if it's possible in LWC.
I have a list of records which I'd like to loop through in the UI. I also have a map of records where the key is the iD of ...
1
vote
1
answer
2k
views
LWC: conditional display of message
I have a Lightning component I need to display on a standard lightning page only when the record being displayed meets 2 conditions. Being new to LWC means I'm learning on the go, and am struggling ...
1
vote
1
answer
4k
views
Custom Font not working In Custom HTML email template
I have created static resource and included ttf file for gotham font, when I used below code in visualforce page it is rendering as expected. but when same I included in custom html email template it ...
1
vote
1
answer
826
views
HTML template in marketing cloud
I created a template in marketing cloud using own html. While editing this template, in the layout view 'block', 'content' and 'layout' everything is non usable/editable and I can edit the template ...
1
vote
1
answer
1k
views
Nested tables with different headers and data LWC for:each
I have a requirement to create a component that is essentially 2 tables, parent/child. The parent table is Subscriptions, and the child table is Subscription Products that are related to that ...
1
vote
1
answer
749
views
Custom Lightning Record Page Template not showing up in Template Switching Wizard
Built a custom lightning record based on the code here (the "Making a Record page with collapsing regions" one). It shows up under Custom when i go to build a new lightning record page but when i go ...
1
vote
1
answer
870
views
Change a variable without showing it in ISML
Is it possible to change a variable in ISML without showing it?
Here is what I tried:
<isset name="sessionVar" value="${1}" scope = "session"/>
${session.custom.sessionVar} <br/>
${...
1
vote
2
answers
838
views
CPQ - Template Section - Group Field - Sorting
I am in the process of using the Group Field in the Template Section object to Group a Line Items section, and am hitting an issue.
It seems to be grouping in alphabetical order of the picklist ...
1
vote
1
answer
3k
views
How to add opportunity owner in email template?
guys I am having trouble including the opportunity owner in my email template.
This is what I used to include the opportunity owner:
{!Opportunity.Owner}
But when I use this I just get a blank in my ...
1
vote
0
answers
32
views
template does not render even when condition is true
I have a tabset in my html, inside a template with a if:true={condition}.
This is the code:
<template if:true={dealSelected}>
<lightning-tabset variant="scoped">
<...
1
vote
0
answers
1k
views
Dynamically building a record edit form from fieldset
I am working on creating a lwc that builds a record edit for dynamically for case closure, to replace the classic functionality of the Case Close Page.
I have a simple APEX class that I can pass a ...
1
vote
0
answers
69
views
Error Messaging Template
I'm trying to send a message via whatsapp using the Messaging Template and although the message arrives on my phone, this error is happening in the Messaging Template Error Log:
Does anyone know why?
1
vote
0
answers
222
views
Error when trying to export Community template
I am receiving the following error when trying to export a Community template. We don't have over 175 pages and theme layouts in our Community.
"We ran into a few problems. We can't validate the ...
1
vote
0
answers
168
views
Full Handlebars Markup Language in Lightning email templates?
Is it possible to use full Handlebars Markup Language (like Handlebars helpers, #each, #lookup, and callbacks to controllers) in Lightning email templates?
I want to create an email template for use ...
1
vote
2
answers
154
views
Workflow - Error - Visualforce email template - External image
I'm getting a weird error when trying to use my workflow to send out a visualforce email template.
The visualforce email template generates a PDF attachment (from VF component) and works fine when I ...
1
vote
1
answer
402
views
HTML error in VisualForce email templates
I created an email template in HTML and want to use this for a visual force email template. When inserting the HTML my code gives many syntax errors. When using the same HTML in a regular HTML ...
1
vote
0
answers
39
views
Search bar doesn't work on pressing `Enter` keypad in Community
I have a community with template Customer Account Portal. It has a global search bar which is built on Search template page.
Community page looks like this
Now When I enter searchstring in search ...
1
vote
1
answer
381
views
How to send custom email template in batch?
I work in higher education. We have a custom object, Application, and a custom email template, to send emails to applicants based on the information in their Applications. I was given a list of ...
1
vote
0
answers
33
views
Add lead attachments to email template without Apex / VisualForce
I have set up a workflow to send an email to the lead owner on lead creation. I would like to add the lead's attachments to the email. Without VisualForce or Apex please, as I am a mere mortal with no ...
1
vote
1
answer
70
views
Inline Visualforce page with AngularJS Templates throwing CORS Error
I'm working on an embedded VF page single page app and attempting to setup routes using ui.router ($stateProvider). I would like to break apart my views into inline templates but place them outside ...
0
votes
1
answer
184
views
How to use '==' in Template string in LWC? [closed]
I want to set check array value dynamically while looping in template.
My array:
Products =[
{ProductName: 'JSON1', Status: 'Active'},
{ProductName: 'JSON2', Status: '...
0
votes
1
answer
11k
views
Override background image/color in the community using the Napili template
I've been testing the customization capabilities of communities with napili template. One of the very basic things I cannot easily do is, branding. I can update the logo, but not the background. It ...
0
votes
2
answers
2k
views
I would like to disable a custom button once after clicking it in LWC? [closed]
<template>
<lightning-button class="slds-m-left_x-small" label="Save as Draft" type="submit"
name="Save as Draft" onclick={handleSubmit}>
&...
0
votes
2
answers
2k
views
LWC Template if:true Directive not working
I'm trying to conditionally hide the lightning-tab,using if:true directive .The "courses" array is populated or empty using @wire adaptor.I am trying to use if:true condition to check if ...
0
votes
2
answers
202
views
LWC: change class of lightning-input checkbox depending on status
I need to give a checkbox a class name depending on whether the checkbox is checked or not.
The checkbox is being displayed inside a lwc template.
How can I achieve this?
<template for:each={...
0
votes
1
answer
264
views
Translate CPQ Quote Document with custom (VF) template content
I'm trying to understand how one can get static text on a custom template content translated to the chosen language while generating a Quote Document. I tried using custom labels with translations but ...
0
votes
1
answer
228
views
How to draw fields of different types using for:each in LWC
I'm trying to draw a set of different fields (with type text, number, picklist and other) using for:each, but I get all identical fields (they differ only in names and labels). How can this be fixed? ...
0
votes
1
answer
816
views
Auto focus to first cell of empty row in lightning datatable when new is clicked
I have a Add button and a lightning datatable.
When I click on add button I want to add a row to datatable.
Now, Instead of showing a popup (after clicking add btn) I want to show an empty row and ...
0
votes
1
answer
3k
views
How to dynamically create lightning cards in lwc, with 2 cards in a single row using grid
I want to iterate over records and display those many number of lightning cards. Each row should have 2 cards using grid. I tried using for:each but it is only working on list. Below is my code:
&...