<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Properly Publish a DataRecordsSelectionChangeMessage Message? in Experience Builder Custom Widgets</title>
    <link>https://community.esri.com/t5/experience-builder-custom-widgets/how-to-properly-publish-a/m-p/1708008#M748</link>
    <description>&lt;P&gt;I did a bit more testing and it looks like my chosen action (flash the data on the map) is actually working despite the error. Is this a benign error for all actions? I'd prefer not to dump weird errors into the console every time a user runs a task but that's better than not having it work at all.&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jun 2026 00:15:51 GMT</pubDate>
    <dc:creator>DavidSolari</dc:creator>
    <dc:date>2026-06-13T00:15:51Z</dc:date>
    <item>
      <title>How to Properly Publish a DataRecordsSelectionChangeMessage Message?</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/how-to-properly-publish-a/m-p/1708005#M747</link>
      <description>&lt;P&gt;I'm working on a widget for ExB 1.17 that will select a point and a polygon feature from the map's data sources if a selection action is added to the widget. I was able to get the Extent Change message type handled pretty easily so I figured this would be fine too, but instead I get this error after the message is published:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bad jimuLayerViewId:widget_6-dataSource_2-&amp;lt;layer_name_here&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm incredibly confused because the actual ID's I'm passing in look like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;dataSource_1-&amp;lt;layer_name_here&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This means the completely separate Data Source from the other half of my map widget is getting into the message somehow? My actions look just fine in the settings panel and I don't see any obvious issues with my invoker function, anything I'm missing here?&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const invokeSelectionMessages = async (polyJlv: JimuLayerView, polyResult: Graphic, pointJlv: JimuLayerView, pointResult: Graphic, widgetId: string) =&amp;gt; {
  const polyDs = await polyJlv.getOrCreateLayerDataSource() as QueriableDataSource;
  const pointDs = await pointJlv.getOrCreateLayerDataSource() as QueriableDataSource;
  const polyId = String(polyResult.getObjectId());
  const pointId = String(pointResult.getObjectId());
  const polyRecord = await polyDs.loadById(polyId, true);
  const pointRecord = await pointDs.loadById(pointId, true);
  polyDs.selectRecordById(polyId, polyRecord);
  pointDs.selectRecordById(pointId, pointRecord);
  MessageManager.getInstance().publishMessage(new DataRecordsSelectionChangeMessage(
    widgetId,
    [polyRecord, pointRecord],
    [polyDs.id, pointDs.id]
  ));
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I tried running two publish actions (one per data source) but that just creates two errors.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2026 00:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/how-to-properly-publish-a/m-p/1708005#M747</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2026-06-13T00:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Properly Publish a DataRecordsSelectionChangeMessage Message?</title>
      <link>https://community.esri.com/t5/experience-builder-custom-widgets/how-to-properly-publish-a/m-p/1708008#M748</link>
      <description>&lt;P&gt;I did a bit more testing and it looks like my chosen action (flash the data on the map) is actually working despite the error. Is this a benign error for all actions? I'd prefer not to dump weird errors into the console every time a user runs a task but that's better than not having it work at all.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2026 00:15:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/experience-builder-custom-widgets/how-to-properly-publish-a/m-p/1708008#M748</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2026-06-13T00:15:51Z</dc:date>
    </item>
  </channel>
</rss>

