25
votes
Bell notifications via apex
From Winter 2021 you will be able to send notifications directly using apex. The below code works with winter 2021 and later.
Id typeId = [SELECT Id FROM CUstomNotificationType WHERE DeveloperName = '...
17
votes
Bell notifications via apex
You can definitely send Bell Notifications via apex. Andrew Fawcett explained this feature in detail in his article https://andyinthecloud.com/2019/06/30/getting-your-users-attention-with-custom-...
12
votes
Accepted
Process Builder - Add Minutes,Hours to Event End Date
Use the Formula like
Now() + (60/24/60)
Give your required minutes in first 60.
If you want for 10 minutes to be added, Give like
Now() + (10/24/60)
Then you will get the 60 minutes added to the ...
12
votes
Accepted
Are lightning event synchronous or asynchronous?
Are lightning event synchronous or asynchronous?
Yes.
Asynchronous
When fire() is called, the event is placed in to a queue for later execution.
Atomic
Until canceled or completed, only one event ...
9
votes
Accepted
Re-entering a Journey (Journey Builder SFMC)
This sounds like a "high water-mark" issue. Was new data added to the data extension? If not, the Interaction or Fire Event activity may be running as intended, but not detecting new rows ...
9
votes
Accepted
Lightning Components: What is the easiest way to have an onclick event on a HTML-tag?
Inline Javascript is not supported due to security threat and you can simply use onclick event and always follow the Unobtrusive principles.You can look at document here which mentions to avoid inline ...
9
votes
Accepted
ShowToastEvent notification is not displayed in LWC
As you can see here platformShoToastEvent can only be used in Lightning Experience explicitly.
Since standard toasts are based on Appliacation Events there is nothing to handle your event in Lightning ...
8
votes
Accepted
How to send multiple parameters to Event in LWC
Pass a JS Object direct into detail
const selectedEvent = new CustomEvent('custevent', {
detail: {
type: "Fiat",
model:"500",
color:"white"
}
});
Access the object ...
7
votes
Is it possible for nested subcomponents to receive events from parent components in Lightning?
There is a lot going on in this post so I'll give you some thoughts but can't answer everything.
1.
The preferred way for parent to child communication is to use <aura:method>. See https://...
7
votes
How to handle lightning:buttonMenu onselect event to identify edit or delete?
Update (API Change)
In order to determine which menu item was used, check the event's "id" and "value" parameters to determine which meny item was used:
({
handleSelect: function(...
7
votes
Accepted
System.FinalException: Record is read-only. How to update fields in event object?
Field updates belong in a before trigger and do not require additional DML operations. I suggest you have a read of Triggers from the Apex Developer Guide:
You can define triggers for top-level ...
7
votes
Accepted
CometD Issues when subscribing to Platform Events
This is a know issue documented in the Platform Event project Build an Instant Notification App:
If you notice an "Exception during handling of messages Unrecognized
advice action handshake" ...
7
votes
Bell notifications via apex
You can achieve the bell notification through the new Summer '19 Custom Notifications feature however, it's not triggerable via APEX just yet. I know this doesn't directly answer the question re: APEX,...
7
votes
Accepted
Platform Events- Event Delivery Limit for Simple Use Case
If I have 1000 users on SF and they receive every event and 51 calls come in == 51 published platform events to 1000 waiting users won't I go past the limit?
Yes the number of events delivered would ...
6
votes
Accepted
Treat click event on <lightning:icon> as a click on <ui:input>
Add an onclick to the div and use something similar to (Pardon my naming):
Component
<aura:component description="myProblemComponent" implements="flexipage:availableForAllPageTypes">
<...
6
votes
CometD Issues when subscribing to Platform Events
I'm receiving this message as well. Not in the Trailhead but in my own code both within Visualforce page and withing a lightning component. I don't think you can catch this exception as it's caught by ...
6
votes
Accepted
How to clear the filename and value of apex:inputFile
You can pass the element id in the checkFileSize method, and then do your processing then
<apex:page controller="FileUploadController">
<apex:inputFile id="inputfile" value="{!newAtt....
6
votes
Accepted
Fire an event when the page has loaded with all the assignation
renderedCallback called after every render of the component. This lifecycle hook is specific to Lightning Web Components, it isn’t from the HTML custom elements specification. This hook flows from ...
5
votes
Accepted
Lightning Components: Firing a nested/child component's methods from the super/parent component?
I guess the application events should just work .I feel you are messing a bit with the syntax .
Lets try correcting it
The application events are fired as below
//super-component_controller.js
({
...
5
votes
How can I add an event redirecting to a record to a Lightning component?
Use force:navigateToSObject
Documentation
redirectToSobject: function (component, event, helper) {
var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": "...
5
votes
Accepted
Fill the WhoId and WhatId fields when create an event
WhoId for an event has to be leadId or a contactId.
Create a contact record
Contact cnt = new contact();
Cnt.LastName = 'Test ';
Insert cnt ;
Even.whoId = cnt.Id;
WhatId can be account,...
5
votes
Accepted
Putting a barcode in a Marketing Cloud email
You can do this with the BarCodeURL() AMPScript function:
<img style="width: 400px;" alt="WHEE" src='%%=BarCodeURL('WHEE','Code39', 400, 200, 0)=%%' width="400">
Reference:
AMPScript Function ...
5
votes
Accepted
Application Event not firing in lightning
You should define the name of the application event in javascript controller same as the application event name.
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
...
5
votes
Onclick handler doesn't fire in dynamically-added dom element
I was able to get something to work by calling addEventlistener rather than setting an attribute. However, I wasn't able to add a regular Lightning controller function via component.getReference() - I'...
5
votes
Accepted
Platform Events- Length of time an event is published for?
Platform events are inherently momentary. They don't have a duration as such, but they are stored on the platform for 24 hours to facilitate replay.
Events exist in a channel, a stream, which is ...
5
votes
Accepted
SOQL aggregate functions do not work with Task.ActivityDate
I have found a workaround by creating a custom field of type date under the Activity object called ActivityDate__c. Thus we can reformulate the initial query as
SELECT WhoID, COUNT(Id), MIN(...
5
votes
Accepted
Bell notifications via apex
I am not sure if it is the best approach, but I had a situation very close of that. I needed to create a notification for an user linked with a Case.
List<FeedItem> FeedItemList = New List&...
5
votes
One trigger per object is commonly espoused as best practice, but is that so for event triggers as well?
A short answer based on my experience
In SFDC, you can have multiple subscribers to a platform event - these could be n triggers, or a trigger and a process builder, or ...
You need to think about ...
4
votes
Accepted
Event parent relationship fields are null in trigger
This problem has a very simple solution, but first we need to understand the reason. You are using trigger context variables in iteration and trigger context variables i.e. trigger.new, trigger.old ...
4
votes
Accepted
Implement press="c.someMethod" on a custom component
You need to make the attribute of type AuraAction. This will enable you to pass in the handler action directly.
Define it like this:
<aura:attribute name="press" type="Aura.Action" default="{!c....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
event × 466apex × 92
lightning-web-components × 54
lightning-aura-components × 51
trigger × 51
lightning × 51
javascript × 34
soql × 31
calendar × 31
visualforce × 29
tasks × 22
activities × 18
lightning-events × 15
marketing-cloud × 13
aura × 13
email × 11
api × 11
account × 11
contact × 11
eventlogfile × 11
platform-event × 10
unit-test × 9
community × 8
lookup × 8
rest-api × 7