I want to create a platform event dynamically using any programming language. But I didn't find any API. Can you please tell me I can make platform event dynamically?
-
When you say you want to create - do you mean that you want to create a platform event record or you want to create the platform event object/fields altogether?– Jayant DasCommented Mar 5, 2019 at 15:10
-
new platform object so to listen on that.– Sagar RanaCommented Mar 6, 2019 at 10:29
-
2Why would you need to create the metadata dynamically? What is your use case? Seems you just want to create the object first in Salesforce and then subscribe to it.– Jayant DasCommented Mar 6, 2019 at 13:15
-
actually i want to make a connector for various organisation. We have partner with salesforce also.– Sagar RanaCommented Mar 6, 2019 at 16:49
Add a comment
|
1 Answer
Platform events are migrated the same as normal Custom Objects. See Migrate Platform Event Definitions with Metadata API for specific details. Basically, you use the Metadata API, and you retrieve and deploy them the same as other CustomObject metadata objects, which also includes Custom Settings.
-
i'm new to it. Migration meaning we define a code and dynamically define platform event using java code also? Commented Mar 5, 2019 at 9:59
-
@SagarRanaMagar Yes, you can do so with the Metadata API.– sfdcfox ♦Commented Mar 5, 2019 at 10:01
-
Thank you for your response. Can you tell me how to use with metadata API? Commented Mar 5, 2019 at 10:04
-
1@SagarRanaMagar It's all in the documentation. What have you tried so far?– sfdcfox ♦Commented Mar 5, 2019 at 10:07
-
I try to create platform event using meta data api. But I don't know how to use. I am good in REST API. But I never seen these type of API to work with java. Commented Mar 5, 2019 at 10:20