Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

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.

0
votes
0answers
16 views

Issue In platform event after Insert Calling twice due to Process builder

I have created one platform event and publishing the json in it on account creation. I have one Process builder which populating the field on account creation. the issue is my Platform event is ...
0
votes
0answers
19 views

Sending External ID Fields in change data capture(CDC) payload

We have an external system(legacy) from where we will data convert and move the data to salesforce. Lets say the object name is 'Relationship'. every time later when data changes in salesforce for ...
4
votes
1answer
51 views

Do Apex Transaction have a unique Id (like Batch Ids)?

I am working on a Platform Event based Logging Framework (based on the ideas of Andrew Fawcett's Dreamforce session). I want to visually group Log entries of the same transaction or batch. Batch ...
0
votes
0answers
19 views

Lightning: Standard events are not firing in some Sandboxes

I have created a custom lightning component for users to create new Case from the Account related tab. However standard events such as "navigateToSObject", "navigateToObjectHome" are not firing after ...
3
votes
1answer
96 views

Get all platform event definitions via REST API

Is it possible to retrieve the list of all platform event definitions using REST API? If I have an event name, I can get its definition using data/v40.0/sobjects/<EventName>/eventSchema but ...
-1
votes
2answers
32 views

what is the core benefit of platform events [closed]

As per my understanding platform events are immutable and we can't query it. but how to relate with external system and internal system. please share any example for both internal and external system. ...
2
votes
1answer
57 views

Platform Event - lightning:empApi

I am using platform event and subscribing them in a lightning component. When i use my component as standalone lightning app or use it on lightning record page, the components subscribe well to the ...
2
votes
2answers
163 views

Change Data Capture

With the new Change Data Capture tool coming out soon, why would someone use this over Platform Events? My understanding is that CDC utilizes Platform Events under the hood anyways.
9
votes
3answers
104 views

Platform Event Apex trigger limits exception - where does it go?

If one publishes a Platform Event, the consuming trigger executes as Automated Process user. If that consuming trigger exceeds CPU limits, no notification is sent to the developer(s). Even though ...
1
vote
2answers
33 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"...
2
votes
2answers
100 views

How to clear/delete published Platform event from EventBus after sometime?

I'm publishing Platform Events using APEX Code EventBus.publish method and consuming the events in backend Java app using EventListener. Problem All the published events remains in EventBus and ...
1
vote
0answers
36 views

Unable to set component attribute on message received from lightning:empAPI

I have the following lightning component implemented and when a message is received I can obtain attribute data from the component but when trying to set an attribute it doesn't seem to set it, the ...
2
votes
1answer
69 views

Platform Events + Process Builder + Apex with @future method

I'm running into an issue with too many future calls when handling Platform Events with a Process Builder that uses an invocable Apex class. Basic setup is 2 processes: The first publishes an event ...
4
votes
2answers
786 views

Consuming Platform Events on Microservices

I am having few issues designing an architecture to use with Platform events and Microservices. According to microservices principle(Kubernetes), there should be at least 3(odd number) services ...
2
votes
1answer
42 views

How long is the delay between retries of EventBus.RetryableException?

In Platform Events, if you throw EventBus.RetryableException, the doc states: Events are resent after a small delay. The delay increases in subsequent retries. So, how small is small and how ...
5
votes
1answer
75 views

Platform Event ReplayId - metadata says it is a String of length 1000 but evidence shows it as an integer

Related post on uniqueness of replayIds Using Workbench to examine metadata for the OOTB field ReplayId on any Platform Event SObject (one that ends in __e) shows: bytelength: 3000 length: 1000 type:...
4
votes
1answer
198 views

Unable to subscribe to Platform Event Notifications in a Lightning Component via Lightning Out

The ultimate objective is to detect if a visualforce page (or the lightning component embedded within it) is already being viewed/used by a user when someone else opens it and subsequently restrict ...
3
votes
0answers
46 views

Is it possible for Salesforce Platform Events to cross orgs intentionally? [duplicate]

Let's say, for whatever reason(s) I have two orgs (maybe not me personally, but two businesses doing business together). Let's say org A publishes a Customer_Event__e (for whatever reasons). Would ...
9
votes
1answer
252 views

Cannot subscribe to platform events using cometd

I am trying to subscribe to a platform event using cometd. I have asserted that the event is getting published just fine but its subscribing that is an issue. I have placed console logs in the cometd....
3
votes
1answer
201 views

Unable to subscribe to platform event using emp api

I am trying to subscribe to my platform event using the empapi feature. This feature was added in v44. I am following the example of the documentation page: https://developer.salesforce.com/docs/...
0
votes
1answer
54 views

How to get current logged in user id in process builder

I am creating a process builder that will publish an event using platform events. I want the process builder to publish an event only when: The currently logged in user has the same ID as one of the ...
0
votes
0answers
30 views

How to properly subscribe to an event

I am trying to implement cometd on salesfoce. Basically, whenever my object gets updated on a certain field, I want to publish an event. CometD should then subscribe to the event and when it listens ...
2
votes
1answer
27 views

Public Platform Events which can be subscribe by any Salesforce Org

We would like to generate a public platform event which will be published on a single Salesforce org and it can be consumed by any other Salesforce Org. Few examples of this public platform event ...
8
votes
1answer
58 views

Developer Console query on EventBusSubscriber returns only 1 row

This is too weird and just started happening within the last few days Execute this query in DC (V43 or V44) SELECT Id,LastError,Name,Position,Retries,Status,Tip FROM EventBusSubscriber In DC Only ...
2
votes
0answers
38 views

Architect Solution around Platform Events limits

Am again in a design dilemma on how to architect solution regarding platform events limits. From the API documentation, even though I can publish 2.4Million Events in a day, the Comet D client(Java ...
1
vote
2answers
59 views

Can Salesforce Platform Events be Relied on as an Async Solution?

Recently I was working on a project where, in order to deal with recursion and governor limits, the previous developer decided to send Platform Events, with the expectation that the very same ...
6
votes
2answers
88 views

Platform Event throws RetryableException and then SFDC stops the trigger from consuming events for hours

Use case: Apex Foo.trigger subscribes to Foo__e platform event Hundreds of events happily processed On event n, Apex trigger executes and, for application-defined reason, decides it has to throw ...
0
votes
1answer
38 views

VF Email templates Boolean merge fields Automated Process User is always false

Use case: Trigger subscribes to Platform Event (hence running user = Automated Process) Trigger creates SObject w/ checkbox field set to TRUE Process Builder executes based on SObject values, ...
2
votes
1answer
159 views

Apex Platform Events Subscriber not always triggered

I am currently trying to troubleshoot a Platform Events implementation that seems to behave inconsistently. Here's the current architecture: I have an Apex Trigger on the Account SObject, where I ...
2
votes
1answer
111 views

Publishing platform event using trigger?

I'm trying to stream changes to tables such as Accounts to a handler that will update our data warehouse. I tried pushtopics but ran into limitations in query size and longtext fields, so now I'm ...
0
votes
1answer
95 views

how to retreive missed replay ids in platform events

when we publish an event in salesforce , i want to retrieve all the replay ids that are missed/ left without subscription. I have read in the same site that: Platform events form an ordered time ...
3
votes
1answer
71 views

Process Builder can't access Platform Event parameters in formula?

I created a Platform Event, and now I'm building a process that is triggered by the Platform Event. The Platform Event parameters either contain a ContactId or a LeadId, but not both. The process I'm ...
4
votes
2answers
180 views

For the Platform Event “Automated Process” user, why do both Visualforce controller access and email sending fail?

We are executing some asynchronous code that uses getContentAsPdf on a Visualforce page as the result of handling custom platform event and we get this error in the Apex Jobs listing: First error: [...
1
vote
1answer
65 views

Platform Events process old data

Sometimes when I publish platform event on change of certain Record, Platform Event Trigger fires with old data. If I publish event on insert, sometimes record is not visible for query. To test it on ...
3
votes
1answer
163 views

Subscribe to multiple channels using CometD

I'm trying to subscribe to multiple channels with CometD. I'm using the CometD static resource and syntax as per the Trailhead project: https://trailhead.salesforce.com/projects/workshop-platform-...
0
votes
1answer
316 views

Change Data Capture vs Platform Events vs Replication API vs Streaming API vs Batch Data Synchronization [closed]

I have a requirement to sync Salesforce data from 2 objects to Datawarehouse and insert/update data from Datawarehouse to Salesforce.We want this data sync to be realtime for this application.Data ...
6
votes
1answer
101 views

Call Salesforce from AWS : Platform Events vs Custom Rest Service

Our's a real-estate client who stores Property record's image in AWS. As the user uploads photo in AWS, we need to identify the Property record based on the Image name and update its field in ...
16
votes
1answer
548 views

Apex Rest Vs Platform Events for Inbound SF integration which one to choose?

Am in a design dilemma in choosing which would be the best approach in the Integration which we would be doing shortly. To give a brief idea, the external system wants to send JSON data to SF. We ...
2
votes
0answers
34 views

Problem encountered while setting cometdReplayExtension

Good morning my friends, I'm having a problem trying to set up the dp cometd extension so that a ligthining component can process published events before its subscription. Below is my component, ...
0
votes
1answer
177 views

Platform Event with Process Builder to Update Contacts Related to an Account

In a scenario where an account has a number of contacts. When a field on the account changes, need to propagate that value to all related contacts. I know it can be done with a visual flow and Apex ...
2
votes
2answers
453 views

Spot the Difference: Can't complete challenge with my code. Platform Events Basics

This is the challenge: Subscribe to a Platform Event in an Apex Trigger Your Salesforce app uses a trigger to listen to events. Once your app receives the notification from the order system ...
2
votes
0answers
94 views

Platform Events allow REST API JSON inputs to bypass field Required-ness?

We are finding that when feeding data to a SF Platform Event via the REST API (/services/data/v43.0/sobjects/My_Pletform_Event__e), Required field inputs can bypass endpoint validation by supplying an ...
2
votes
0answers
105 views

Managed Platform Event Trigger not working after Sandbox Refresh

We have the following scenario: We created a managed package that contains a Platform Event and an Apex Trigger subscribed to it and installed it at a customer Org. In the Customer Production Org we ...
3
votes
1answer
76 views

testmethod that publishes platform events - GACK 255731747

Use case: Testmethod that invokes a service with more than 200 Sobjects Service does work on each Sobject and as a side effect, also publishes Platform Events By varying the number of Sobjects, at ...
4
votes
2answers
564 views

How to monitor Platform Events consumption?

According to SU17 release notes there are the following Daily/Hourly limits for Platform events: Maximum number of events published per hour Maximum number of events delivered to CometD clients ...
1
vote
2answers
780 views

Can you query a Platform event? [closed]

I just want to know if you can query a platform event?
2
votes
1answer
108 views

How do we bulkify platform event triggers to retry on failures?

Here is the Salesforce provided code with my tweaks for my process: trigger O_EventTrigger on O_Event__e (after insert) { set<string> cids = new set<string>(); for(O_Event__e oe :...
2
votes
1answer
145 views

Does Messaging.SendEmail() not work in a Platform Event trigger context?

I can't figure out why an email isn't being sent. I've got a Platform Event trigger which ultimately is supposed to send an email. Most of the code isn't directly relevant, but here's the surrounding ...
1
vote
1answer
135 views

Initialise streaming client on button click, rather than init

I am using Mr Fawcett's the famous streaming component (https://github.com/afawcett/streamingcomponent) with his another great wrapper for deploying Custom Metadata Types (https://github.com/afawcett/...
3
votes
2answers
428 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 ...