Skip to main content

Questions tagged [platform-event]

Platform events are part of Salesforce’s enterprise messaging platform. The platform provides an event-driven messaging architecture to enable apps to communicate inside and outside of Salesforce. Custom data in your events are stored in custom fields that you define.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Install managed package via connected app API

New to salesforce, so might miss some details, but I'm trying to make it easy for our users on our website to simply connect salesforce to our website via some oauth flow and make it so, that actions ...
2 votes
2 answers
126 views

Unusually Low CPU Time Recorded by Limits.getCPUTime After DML Operation in Platform Event Trigger

I’ve encountered an unusual behavior in Salesforce Apex when working with a Platform Event. Specifically, it seems that Limits.getCPUTime returns an unexpectedly low value after performing a DML ...
2 votes
2 answers
868 views

Platform events and Chatter Posts

I am subscribing to platform events in apex trigger. In the trigger I am trying to post to user's chatter feed using Chatter Connect API. I am aware that in this case the context is "Automated Process"...
0 votes
1 answer
865 views

Issue while unsubscribe Platform event

I have created Platform event called accountUpdate__e. Whenever the account is updated from Contact I need to refresh my account fields using platform events .I added my LWC component in Account ...
0 votes
1 answer
32 views

How can I save a log of every attempt to insert a Lead without duplicate logs?

I have a requirement that every attempt to insert a Lead gets logged into a custom Lead_Log__c object. I cannot seem to get this to work while handling partial success inserts and also inserts of >...
1 vote
1 answer
201 views

Getting No such column error on PlatformEventChannel

I'm following documentation for integrating salesforce with AWS event bridge (HERE), but when I try to create a platform event channel With this payload: { "FullName": "...
1 vote
1 answer
42 views

Which conditions are necessary to enable the Event Monitor functionality?

I would like to confirm which conditions are necessary to enable the Event Monitor functionality. Currently, I can only see the sandbox environment, and under Company Information, I noticed that the ...
0 votes
1 answer
28 views

Automated Process User has an upcoming task

I have a trigger on a sales engagement runtime object, when a CDC is detected, the trigger publishes a PE, then a PE triggered-flow runs, which later creates a Task, this new task record is getting ...
7 votes
4 answers
15k views

Platform Events not working in one of our orgs

I have a simple Platform Event defined in several of our orgs (sandboxes), but in one of them, they just refuse to work. As a test, I set up an Apex trigger subscriber to the event, made sure it's ...
0 votes
1 answer
86 views

Change the presence status of a user via an API

From an external app I would like to change the presence status of a user via an API. I was not able to figure out if there is a public API but found this js code that supposedly works in an apex vf ...
1 vote
1 answer
113 views

How to Create an LWC Component to Show a Warning When the Industry Picklist Value Changes on a Salesforce Standard Account Page?

I'm working on a custom Lightning Web Component (LWC) to be added to the standard Salesforce Account page. This component aims to display a warning message as a toast notification whenever the ...
2 votes
1 answer
964 views

LWC Continuation SOAP API does not seem to be working

I`m trying to execute Continuation from LWC action. The thing is that I use it for SOAP API. It is a long-time running request, but I have to show a loading spinner until the response will be ...
1 vote
2 answers
2k views

Publishing an event to Salesforce via CometD

I am trying to create a external client to publish Platform events to Salesforce event bus. I have used REST API to do the same but I wanted to do it via a true 'Publish'. My guess is that this will ...
0 votes
0 answers
24 views

Platform Events and NetSuite [duplicate]

I want two way sync with NetSuite with realtime data updates. I feel that Platform Events will be the best solution for this but I am curious how authentication works when publishing to them. Also ...
3 votes
1 answer
2k views

How to Test platform Event Trigger Flow

I have a flow which subscribes to a platform Event. This flow consumes the event and inserts a record. My test class is: Test.startTest(); Database.SaveResult result = EventBus.publish(...
5 votes
2 answers
3k views

What is the difference between Event Delivery and Event Publishing in Platform events?

Around Platform event limits, the documentation currently states that the Event Delivery default limit is 50K/DAY but Event Publishing limit is 100K/HR. Note the limit is 48 times more for Publishing. ...
0 votes
1 answer
135 views

Not able to subscribe to a platform event from Workbench

I'm trying to subscribe to a platform event in a Developer sandbox with the use of workbench (API 58.0). The use of Streaming API is enabled in setup. Via the queries -> Streaming Push Topic I am ...
2 votes
1 answer
2k views

How to handle an event in a child component that is fired from a dynamically created grandchild component?

I have a component that includes a child component. The child component has a button that fires showCustomModal on an overlayLibrary and the content is a dynamically created component. Component ...
1 vote
1 answer
230 views

How salesforce can suscribe to events happening in external system

No document, no example i am able to find to know without middleware how we can suscribe to external system. If we write schedule batch class to login and fetch events then how this becomes a event ...
6 votes
1 answer
2k views

Error handling when publishing platform events

We are in the process of redesigning our system to use platform events as a replacement of traditional trigger-based approach when all processing happen synchronously sharing single transactional ...
3 votes
2 answers
1k views

How do I pass a platform event payload from a PB process to a flow?

I read elsewhere that I can pass an event's payload to a flow from a process builder process. When I try pass values in my process all I see are the different fields from my platform event object. Do ...
0 votes
0 answers
118 views

Beforeunload unexpected behavior in LWC

Im trying to publish a platform event from a LWC if the browser tab gets closed or the browser itself gets closed. It works fine for both of the cases, however if I repeteadly click on the refresh ...
2 votes
1 answer
2k views

getRecordNotifyChange is not working all the time

Whenever changes happened in child record i want to update a field in my Parent.Parent field should be updated without refreshing the UI. So i have created a trigger in my child ,updated my parent ...
1 vote
0 answers
43 views

Why namespace prefix is not required while subscribing to platform event from LWC in a namespaced sсratch org?

I’m working on a managed package. While testing a beta version in a sandbox, I’ve noticed that my LWC failed to subscribe to a platform event. The reason was that I didn’t specify the namespace prefix ...
0 votes
0 answers
26 views

Override the Agent side live agent window with custom solution

I am facing a challenge with implementing a custom agent-side chat window that displays real-time chat messages. I've mentioned creating a platform event to access real-time chat messages, but there's ...
8 votes
6 answers
8k views

Can you call a webservice from a Platform Event Trigger?

For webservice callouts, I assume the same rules apply, but I just wanted to double check. I haven't found any information about Platform Events and Webservices. I assume I would just make it a @...
0 votes
0 answers
38 views

Web callout 1 record at a time - Future vs Platform events

So I have a situation where the third party web callout can only process record at a time. From SF perspective, if I would like to mass process records and send them to the external web service. I am ...
0 votes
1 answer
414 views

Filtering Platform Event Subscriptions with a LWC

I've got a LWC embedded on a lightning page for the SBQQ__Quote__c object. It's subscribing to a platform event channel. I have a trigger setup on Opportunity (parent object of SBQQ__Quote__c) that'...
2 votes
1 answer
182 views

Lightning Web Security - LWC cometD subscribe error

I have a lwc component, used on internal platform app and experience site, which listens to platform event. We use empApi to subscribe to platform events when user is internal and cometD library to ...
2 votes
1 answer
47 views

How does `EventBus.TriggerContextsetResumeCheckpoint()` work?

I'm currently looking at the "Apply Best Practices for Writing Platform Event Triggers" Trailhead where EventBus.TriggerContext.setResumeCheckpoint() is apparently used to set "...
1 vote
2 answers
464 views

Platform Events a nightmare - How to make them work in real life

I am trying to build a Platform Event-based application logger where arbitrary application code calls Tracker.log(...); and this is sent as an Event into an external database via an API. As it's ...
0 votes
0 answers
85 views

LWC Embedded in Aura Component to dispatch Events on Close Browser tab or Window

Hi I've been working with platform events in LWC, and I need to monitor user activity on an specific object record page. It works well but I had to do kind of a ping system between the LWC insances on ...
1 vote
2 answers
192 views

Are Publish immediate DML and DML Statements 2 different limit sets in Apex transaction?

We see in a debug log, as below: Number of DML statements: 1 out of 150 Number of publish immediate DML: 59 out of 150 Do we have separate limits for above 2 for a single transaction in apex?
15 votes
1 answer
5k views

Testing BatchApexErrorEvent trigger

I have a batch class which implements the Database.RaisesPlatformEvents interface. This interface has recently been introduced and helps log unexpected exceptions: https://developer.salesforce.com/...
0 votes
0 answers
114 views

Platform Events LWC Subscription not listening on Service Cloud

Hi I have tested this same code and setup in a sales cloud playground, and it works smoothly. However when I move the code to a Partner Developer Edition Service Cloud. The LWC Is not receiving the ...
8 votes
2 answers
813 views

Reliable Detection of an Automated Process User

Because User Mode database operations don't work for the Automated Process User, I need to litter my code with checks to see if the current user is such a user. I've previously got an automated ...
1 vote
1 answer
66 views

Is manual configuration always required when subscribing to Change Data Capture events via the Pub/Sub API?

I'm creating an application that subscribes to events via the Pub/Sub API. So for example, I'm subscribing to /data/AccountChangeEvent to receive notifications of Account changes. For this to work on ...
0 votes
0 answers
23 views

How to create event relay programatically

Is there any way to create an event relay programmatically or via the REST API? I've only seen a way to create it from the UI. Including the documentation here
1 vote
0 answers
291 views

Platform Event Channels and Channel Members

So having gone thru the documentation for Platform Events with Filters, I started implementing it. What I am trying to do is to create a Platform Event Channel Member for each user who will be ...
0 votes
0 answers
35 views

How to proper handle governor limits inside a platform event handler?

In a platform event trigger handler that needs to insert a list of SObjects that comes from the event payload. We can do a wrapper try catch to protect of all errors and log in a custom object, we can ...
1 vote
0 answers
59 views

Platform Event Trigger Flow - Flow Execution Error Event

Scenario: I have created a Flow that is triggered by the Flow Execution Error Event. So, if any Flow encounters any errors, this Flow will create a log of that error as records in the Error Log Object....
0 votes
0 answers
86 views

getting error [NoErrorObjectAvailable] Script error

import { LightningElement, track } from 'lwc'; import { subscribe, unsubscribe, onError } from 'lightning/empApi'; import { ShowToastEvent } from 'lightning/platformShowToastEvent'; ...
0 votes
0 answers
153 views

How to Unit Test Standard Platform Event in Trigger

I have a trigger on FOStatusChangedEvent, which is a standard event in Salesforce triggered when the FulfillmentOrder status is triggered. I need some help on how to unit test the standard platform ...
2 votes
1 answer
2k views

Connecting Platform Events to Amazon SQS/SNS [closed]

I have a requirement where I need to subscribe to Salesforce Platform Events via AWS. I did some research and found out that we can do so via Lambda. However Lambda has its own limitations. Is it ...
0 votes
2 answers
1k views

Passing object data to a platform event

Thank you in advance for any suggestions! Scenario: I have a screen flow that guides a user through updating certain fields on a custom object, after they have entered the required data it is ...
2 votes
1 answer
108 views

Catch/handle exception plus rethrow them in separate transaction

I have a small Salesforce app called ISV Cockpit that helps AppExchange partners to get notified about their app's unhandled exceptions within subscriber orgs. For that, this app leverages Salesforce ...
0 votes
0 answers
48 views

Event Delivery limit always exceeded

We have encountered an issue where a flow that creates platform events was triggered over 200k times. Our event relay is now constantly working to send these events. We have tried deleting the ...
-1 votes
1 answer
33 views

Events emitted greater than allocation

We are seeing our number of events emitted being greater than our allocated amount of 25k. Does anyone know how this happens? Also, we are not able to emit events right now because we are over the ...
0 votes
0 answers
114 views

Manage Platform Event Trigger Subscriptions From Apex

Is there a way to manage platform events trigger subscriptions programmatically? Specifically, I'd like to be able suspend and resume a trigger subscription using Apex code. I am aware of how to ...
1 vote
2 answers
169 views

Send Email from Platform Events

Is there a way that our customers can configure the User setting in PlatformEventsSubscriberConfig to specify a User in their production org? If so, how? See " The username of the user that the ...

1
2 3 4 5
9