Skip to main content
The 2024 Developer Survey results are live! See the results
8 votes
Accepted

Split a row with data separated by ","

Guide Template Language does this effortlessly. No need for SSJS, or awkward AMPscript process loops. The following code: %%[ var @products set @products = '[{"item":"Elastic love","sku ":"...
Eliot Harper's user avatar
  • 16.6k
6 votes
Accepted

How can I access HTML attributes in Lightning

This is actually because your link is converted to an aura:html. You could get the href like this: var link = component.find("link"); console.log(link.get("v.HTMLAttributes").href);
sfdcfox's user avatar
  • 497k
6 votes
Accepted

LWC update toggle checked/unchecked attribute from JS

Just bind the checked attribute to javascript property. <lightning-input data-id="toggle2" type="toggle" label="TOGGLE2" checked={checked} message-toggle-active="" message-toggle-inactive="">&...
Rahul Gawale's user avatar
  • 12.2k
6 votes

Read value attribute in lightning button in the client js controller

Now you can use event.getSource().get("v.value") function to get lightning button value when clicked. From the Salesforce documentation: In the client-side controller, you can use one of the ...
Manuel Baquero's user avatar
5 votes
Accepted

Get array size from parent component?

You could have an aura:attribute say totalItems in the child and pass the length(i.e size) => {!v.items.length} of items. Parent: <aura:iteration items="{!v.items}" var="item"> <c:...
Praveen's user avatar
  • 10.1k
5 votes
Accepted

Can you know if a component's event is handled?

No. Strictly speaking, unless you come up with some arrangement with the parent, you cannot tell if an event was actually handled. What would that look like? @api eventHandled() { if(this.eventFired)...
sfdcfox's user avatar
  • 497k
4 votes
Accepted

When LWC invokes a function, is it possible for the function to access arbitrary attributes in the invoking element?

Your widget-tile component can include the widget passed in to it: @api widget; dispatchWidgetSelectEvent() { this.dispatchEvent( new CustomEvent('widgetselect', { detail: { widget } }) ...
sfdcfox's user avatar
  • 497k
4 votes
Accepted

Automatically set a value on an attribute sobject field

For a custom class, you won't have any way to set a dynamically named attribute. Other than your if/else chain, the alternative available to you would be a switch statement. switch on value { ...
Adrian Larson's user avatar
  • 151k
4 votes
Accepted

Getter Block execution without VF reference

You call the getter here: system.debug('ACCOUNT LOG GENERATED '+lAcc); Accessing the attribute value of lAcc in any way calls the getter.
Adrian Larson's user avatar
  • 151k
4 votes
Accepted

Pass attributes to child

Attribute valueFromParent in c:childComponent has private value of access attribute. It is visible only inside this component. Change it to public, or just remove access attribute c:childComponent &...
Oleksandr Berehovskyi's user avatar
3 votes

Background color of lightning Button

.greenBackgroundButton{ background-color: #3bcf56; } Should be: .greenBackgroundButton{ --sds-c-button-brand-color-background: #3bcf56; --sds-c-button-brand-color-border: #3bcf56; --sds-c-...
sfdcfox's user avatar
  • 497k
2 votes

Translate design:attribute

Below is an experimental approach 1.Create a Custom Label Named Hello 2.Create a component named HelloworldTranslate.cmp <aura:component implements="force:appHostable,flexipage:...
Mohith Shrivastava's user avatar
2 votes

Updating Profiles into All Subcribers from a Data Extension

Try this Extract the master DE using a data extract activity Transfer it into the export folder in your FTP using a file transfer activity. Transfer it to in the import folder using another file ...
0xsegfault's user avatar
  • 6,603
2 votes

Lightning Component Attribute

The only attributes for attributes are listed here. They are: access name type default required description And no, you're not missing anything; you'd use an aura:valueChange listener, as you're ...
sfdcfox's user avatar
  • 497k
2 votes

Using FuelSDK-PHP to connect Drupal 8 to Exact Target, and the "Email Address" attribute doesn't seem to be available to map to

Have you tried 'EmailAddress' with no space?
Mike's user avatar
  • 918
2 votes
Accepted

Possible to query _ListSubscribers and _EnterpriseAttributes and not use All Subscribers?

You can't query data from a specific list that isn't stored in the business unit where you are running the query from. The reason you can access the All Subscribers is because that is shared across ...
AnonWonderer's user avatar
  • 2,133
2 votes
Accepted

JB4A-SDK-Android 5.3.0 Attribute.Create(String, String)

Amazing that this hasn't come up before. Thank you. You are correct: the create() method is being obfuscated and is marked for internal-use-only. I will open a ticket for this to be addressed. You ...
Bill Mote's user avatar
  • 5,286
2 votes
Accepted

Where can i ckeck all the attribute fields of salesforce objects?

All fields are listed in the SOAP Api documentation. Here's the one related to the Opportunity sObject: https://developer.salesforce.com/docs/atlas.en-us.218.0.api.meta/api/...
Martin Lezer's user avatar
  • 7,295
2 votes

Set 'option' attribute of CheckboxGroup via Apex

cmp.set('options', response.getReturnValue()); You're missing a v. to set the attribute value: cmp.set('v.options', response.getReturnValue()); // removed extra semicolon; nice catch, Raul. so the ...
David Reed's user avatar
  • 93.2k
2 votes
Accepted

Where is this LWC attribute defined?

It's the event, not a property. If you have access to the source code of the component it must have something like this.dispatchEvent(new CustomEvent('accountfilter')); Sometimes the event has ...
Rahul Gawale's user avatar
  • 12.2k
2 votes
Accepted

How to pass value to attribute in visualforce page

A merge expression starts with {! and ends with }. Inside the expression, you don't need to use {! any more to pull in properties from the controller, and ! is specifically the boolean "not" ...
Derek F's user avatar
  • 62.8k
1 vote
Accepted

Data type not found in Data Extension creation

Here are the available data types for data extension fields: Text Number Date Boolean EmailAddress Phone Decimal For an image url, a text data type will work. Just be sure to make your field ...
jake314159's user avatar
1 vote

Set User and Attributes - Marketing Cloud

This code has to be implemented on your website and the mid value has to be the value that is your business unit id. The first two lines should be implemented on any page of your website. When the ...
Johannes Schapdick's user avatar
1 vote
Accepted

Set 'option' attribute of CheckboxGroup via Apex

What you are missing here is having a required value property for lightning:checkboxGroup. To solve the issue, add attribute to hold value attribute, an example here: component: <aura:component ...
Raul's user avatar
  • 18.8k
1 vote
Accepted

What are the similarities/differences between force:recordData attributes

The documentation you are looking for force:recordData can be found on the official documentation link as below: https://developer.salesforce.com/docs/component-library/bundle/force:recordData/...
Jayant Das's user avatar
  • 30.6k
1 vote
Accepted

How to define a field value of an object in javascript

The change attribute needs to reference a controller function (that you write) not a data field. If Techniek is a custom field, you will need to include the __c too so Techniek__c. Lightning ...
Keith C's user avatar
  • 137k
1 vote
Accepted

Check whether Marketing Cloud subscriber attribute is required or not

This can be achieved through the "Describe" method. (See https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/describe.htm) I ran a describe call via the SOAP API for the ...
jacobhobson's user avatar
1 vote

How to display a specific list in a component lightning?

For client to apex methods/variable you need @AuraEnabled annotation AuraEnabled Annotation You may have to annotate every property you are accessing in your component with @AuraEnabled. The @...
Rao's user avatar
  • 16.7k
1 vote
Accepted

Is there any way to access the Aura $A global instance namespace or AuraLocalizationService through a VisualForce page?

You should be able to make an empty lightning app and component and call your localizationservice function in the callback of that component creation. Something like this: <apex:page > &...
Caspar Harmer's user avatar
1 vote

Personalization strings problems

You don't have to delve too far into Ampscript to be able to do some basic personalisation. The Lookup function is really all you need to get data from other data extensions. %%[ VAR @var, @this SET @...
TCassa's user avatar
  • 878

Only top scored, non community-wiki answers of a minimum length are eligible