ActivityNumber Not Auto-Populating on Initial Publish for New Excel Add-in Rows

Hi All,

I’ve implemented a customization for a custom data entity where:

  1. We added a new ID field (from an ISV), which is related to the ActivityNumber.
  2. In the Excel add-in for this entity, when the user enters the ID, the corresponding ActivityNumber should automatically populate.

The logic works as expected — but only after the first attempt.

When I create a new line in Excel and enter the ID, I get this message:

After that, both the ID and ActivityNumber fields go blank.

However, when I enter the same values again, the lookup works perfectly, and the ActivityNumber populates as expected.

Additionally:

  • If I clear ActivityNumber on an existing line (where ID is already set), the autofill also works fine.
  • This issue only occurs on the first attempt when creating a new line.

Is there a known reason why this happens only for new rows on the first publish attempt? Is there something I need to adjust or another way to ensure the logic triggers correctly on first insert?

You’ll need to give us more information. We know nothing about your entity and your logic, which data source it’s about and how it’s related to the fields and so on.

What did you find when used the debugger?

Is your logic failing only if you’re importing data through the Data Connector or in other cases as well, such as when writing to the entity from X++? If you don’t know whether it’s specific to Data Connector, well, now you have something new to test to collect more information.