Questions tagged [template]
The template tag has no usage guidance.
97
questions
-2
votes
0
answers
16
views
Adding operator in Salesforce HTML email templates
im adding two field values in html email template but its not work pls help me
Assigned on / Reassigned on: {!case.assignedon__c} || {!case.reassignedon__c}
0
votes
2
answers
79
views
Can we pass email body in API payload for sending email in salesforce marketing cloud?
I am exploring Salesforce marketing cloud's email APIs but am unable to find any email send API that allows sending email body (HTML content) in the send API like Braze (braze api). Is there any ...
0
votes
1
answer
78
views
Setting selected value of a lightning-combobox does not show when inside a <template for:each> tag
I have a LWC that displays anywhere from 1 to n lightning-combobox components. Since the number of combo boxes needed is unknown, the combo boxes are within a for:each directive:
<template for:...
0
votes
1
answer
101
views
Salesforce Closed/Won email
I'd like to display account information, such as company registration number in the opportunity closed/won email but it doesn't pull through. What am I doing wrong:
Sales Won notification
Opportunity ...
0
votes
1
answer
65
views
Share artifacts between two packaged Analytics templates
My Managed Package should contain two Wave/TCRM/Analytics templates:
FULL: Type app for subscribers with a Full Analytics Studio license
EMBEDDED: Type embeddedapp for subscribers with NO such ...
0
votes
1
answer
40
views
component not visible using condition
I trie to make a condition on a template in my HTML , within is visible or not based on the the condition in Apex , the condition work correctly but when I import the method in JS , my template become ...
0
votes
1
answer
276
views
Template Expression Doesn't allow for Computer Expression in lightning-input-field
I have been trying to iterate through and access some data that I'm getting from an apex call.
I have a list of field IDs that I get from a field set something like
this.positionFieldIds=['Name', 'Id',...
0
votes
2
answers
771
views
render child component div in lwc by matching data-attributes on button click
I have a component that displays a list of questions using a for:each. For each question rendered I have a child component (which is a simple form with a few fields) to capture a followup question.
I ...
2
votes
0
answers
664
views
undefined value from html button value attribute
I am iterating an array in template and on the button click I am trying to get the value of selected element but the value coming is undefined
<template>
<template for:each={pages} for:...
0
votes
1
answer
253
views
What is the best way to use one org as a template for another org?
Purpose is to save time, I've been reading about Trailforce - templates created from one org for different customizable orgs (if I understand it right, but that seems like a complicated way with ...
0
votes
1
answer
153
views
How to overwrite LWC template CSS
I have a LWC component with a table and want to make each row formatted as currency. I know with HTML we can use the format-style="currency" but I think the template is overwriting this ...
0
votes
1
answer
26
views
Don't see apex data
I have such code:
JS
@track messageBody;
@wire(getDataFromController)
emailTemplate ({ error, data }) {
if (data) {
this.messageBody = data[0].Body; //EmailTemplate ...
0
votes
1
answer
1k
views
How can you get the merge field to take a url field from an object and set it to show up as a picture image in lightning email template?
I am trying to have Salesforce LEX Email Template populate a specific image from a field that's from a Account object and (fyi) the field data type is URL. My idea was simple, put the url into the ...
0
votes
0
answers
126
views
Two level iteration not working in LWC
I have two level of iteration in LWC, and the second iteration is not displayed even if there are contents in it :
<template for:each={calendarCol} for:item="ccd">
&...
1
vote
0
answers
134
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">
<...
0
votes
0
answers
424
views
apex:outputField not aligning text to the right
I have a visualforce email template, and I have a field with rich text where the text is Right aligned.
I need to print it in the email attachment as pdf but it's always shown as left aligned, i tried ...
0
votes
2
answers
2k
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
1k
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: '...
1
vote
0
answers
3k
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
1
answer
415
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 ...
0
votes
1
answer
774
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
2
answers
27
views
create sales template
I received this inquiry from the Sales team.
Is this possible? From my understanding, it is not possible, but a second opinion would be helpful.
I wanted to create sales templates to automatically ...
1
vote
1
answer
469
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
2
answers
6k
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 ...
0
votes
2
answers
8k
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}>
&...
1
vote
2
answers
3k
views
LWC template button controls alignment issue
I have this alignment issue with the next button I have at the bottom, I am not sure how to align inside the box. The same code works perfectly in another scenario, but it had a smaller text in the ...
3
votes
0
answers
443
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 ...
0
votes
1
answer
562
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
0
answers
370
views
Data not rendering in salesforce UI LWC
I am new to LWC i have created a simple quiz app but the data is being not rendered in the salesforce UI . I have checked the code correctly but could see still the data is not being rendered in ...
4
votes
0
answers
2k
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 ...
1
vote
0
answers
183
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
1
answer
4k
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 ...
0
votes
3
answers
941
views
Translate CPQ Quote Template Content
Unable to use 'Template Content Variable' while translating Template Content record.
Requirement is I need to translate text in my template content to specific languages on quote document.
Please ...
1
vote
2
answers
5k
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 ...
4
votes
1
answer
22k
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 ...
0
votes
1
answer
550
views
Create case with template via REST API
I would like to create a case that asks for data to be filled in via something like an HTML form.
My research so far indicates that a Template is the weapon of choice for the "form".
I want ...
3
votes
1
answer
1k
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 ...
0
votes
1
answer
1k
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 ...
2
votes
1
answer
9k
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 ...
0
votes
1
answer
539
views
Map values once pushed in are persisting between LWC template transitions
So I am facing this problem here,in short it goes like I have two templates which are conditionally displayed on click of Next and Previous
so it is essentially lightning combo-box component with ...
0
votes
1
answer
5k
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:
&...
2
votes
1
answer
7k
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 ...
0
votes
0
answers
257
views
How to use an apostrophe in a Salesforce HTML email template body
I added an apostrophe to an HTML Email Template and it didn't render in the test email. I'm trying to write: "I'm".
I tried ', but that showed up as is.
How do I type an apostrophe in email ...
3
votes
1
answer
14k
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.
...
0
votes
0
answers
155
views
Call Apex method to iterate the value in a lightning web component
Trying to iterate the value in lightning vertical tab, data is showing empty.
Can anyone please help me what's wrong in the below code.
HTML:
<lightning-vertical-navigation compact>
...
1
vote
1
answer
4k
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
0
answers
314
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 ...
4
votes
2
answers
27k
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> ...
2
votes
1
answer
1k
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
2k
views
Remove email signature after sending single email with email template
here is the scenario.
UserA has email signature in his setting.
When clicking on a custom button, a template email is sent out to Person_B with sender UserA's name. Now the sent out name has 2 email ...