I'm trying to push source to a scratch that I've been using for 3 weeks, but suddenly I'm getting an error on all my platform events:

Property 'publishBehavior' not valid in version 45.0

It's calling my attention to the meta files for the platform events. Here's an example:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <description>Fires when an incoming SMS is matched with an existing Conversation.</description>

I see the <publishBehavior> line that it's referencing, but not sure what to do about it. Is this something new?


Found it here in the Summer 19 release notes.

Summer '19 introduced a new field, <publishBehavior>, providing a new option to publish the event AFTER the commit of whatever process called it (so a trigger on that event could expect to find the changes made). Good idea. Default remains "publishImmediately".

My specific issue was that my scratch org where I created the Platform Events is Summer '10 (v46) but my sfdx-project.json file specified "sourceApiVersion": "45.0" which doesn't know what to do with that property. I updated the json file to 46 and everybody's happy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.