Action ‘Update_a_record’ failed: An error has occurred. No resources were found when selecting for update – Fixing Cross-Company Update Issues in Finance & Operations Using Dataverse Virtual Entities (Power Automate)


Recently, while trying to update the Projects table in Finance & Operations using the Fin & Ops Apps actions in Power Automate, we ran into below error:

An error has occurred. No resources were found when selecting for update.

A screenshot of a computer

AI-generated content may be incorrect.

A screenshot of a computer

AI-generated content may be incorrect.

After digging deeper, we realised the issue had nothing to do with the payload or field mappings. The root cause was that the default company of the connection user in Finance & Operations was different from the company of the record we were trying to update. The Fin & Ops connector always operates in the context of the user’s default legal entity, and unlike the “List items present in table” action, it does not offer any “Cross Company” option for update operations. The result is that Power Automate looks for the record in the wrong company and, naturally, F&O returns a “record not found” error.

A screenshot of a computer

AI-generated content may be incorrect.

In our scenario, we had dual-write and virtual entities enabled. When this is the case, Finance & Operations exposes many of its data entities as Dataverse Virtual Tables. These tables are essentially real-time proxies: Dataverse reads and writes directly into F&O while automatically handling the underlying company and key structure. So instead of updating the F&O Projects table directly, we switched our Power Automate logic to update the corresponding virtual entity in Dataverse. That simple change immediately resolved the issue. The update worked flawlessly across companies, and we didn’t have to worry about the user’s default company or any cross-company flags.

A screenshot of a computer

AI-generated content may be incorrect.

This completed without errors, even for multi-company data.

A screenshot of a computer

AI-generated content may be incorrect.

There are other approaches as well, depending on how your environment is set up. We could bypass the connector entirely and make raw OData PATCH calls to F&O, as long as we manually specify the full composite keys, including the DataAreaId. Another option is to build a small custom API or X++ service that accepts a legal entity parameter, executes a changeCompany call in F&O, and safely performs the update on the server side. Both approaches work, but they require more configuration, authentication handling, and careful error management. For most day-to-day automation scenarios, the virtual entity route remains the simplest and most reliable.

In our case, switching to the Dataverse Projects (mserp) virtual table solved the issue immediately. The update completed without errors, even for multi-company data, and the flow became much cleaner.

A detailed explanation of this limitation can be found here, and was very helpful in troubleshooting:

Multiple legal entities issue with the Fin & Ops Apps connector in Power Automate

Hope it helps..

Advertisements

Fixing the “Only 1 of 2 keys provided for lookup, provide keys for dataAreaId, ProjectID / Not found” Error in Power Automate (Fin & Ops Apps)


Recently, while working with the Projects table from a Finance & Operations (F&O) environment, we ran into an error while using the Get a record action in Power Automate. (BTW this was the first we were using the Fin & Ops connector)

The flow kept failing with the following message:

Only 1 of 2 keys provided for lookup, provide keys for dataAreaId, ProjectID.

This error appears when we try to fetch a record from an F&O using only the ProjectID. But unlike normal Dataverse tables, F&O tables often come with composite keys.

Instead of passing just the ProjectID, we must pass the full composite key in the format:

dataAreaId,ProjectID

In our case, the correct value was:

AUST P-REP-34

Below, we can see it working properly

A screenshot of a computer

AI-generated content may be incorrect.

At one point, even after passing the correct composite key, we started getting a NotFound error:

Action ‘Get_a_record’ failed – NotFound

A screen shot of a computer error

AI-generated content may be incorrect.

Nothing had changed in the inputs — it was just not working. The fix was surprisingly simple..

We deleted the Get a record step, re-added it, provided the same inputs again, and the error disappeared. It could be related to the connection reference not being updated properly in the background.

Hope it helps..

Advertisements

Fixed – Error occurred while loading document template / Error occurred while loading preview error in Dynamics 365


Recently, one of the users reported the following error while trying to generate a PDF for a Quote record in Dynamics 365:

Initially, the Export to PDF option was showing a blank list of templates.

A screenshot of a computer

AI-generated content may be incorrect.

This happened because the user was missing a few essential privileges on the Document Template tables.

To fix the blank template list, we updated the user’s custom security role with the appropriate privileges on the following tables:

  • Document Template
  • Personal Document Template
A screenshot of a computer

AI-generated content may be incorrect.

After adding these, the templates started appearing in the “Export to PDF” dialog.

Even though the templates were now visible, the user still got the following error while trying to preview or export:

A screenshot of a computer

AI-generated content may be incorrect.

This was due to one missing privilege in the Customization area of the security role.

We added: DocumentGeneration privilege

A screenshot of a computer

AI-generated content may be incorrect.

Once this privilege was granted, the preview and PDF generation started working as expected.

If we are unsure which privilege might be missing in similar situations, a quick way to find out is by using Developer Tools (F12) and monitoring the Network tab while reproducing the error. The failed request, such as ExportPdfDocument, usually reveals the missing privilege directly in its Response section (for example, missing prvDocumentGeneration privilege). This saves time and avoids trial and error when troubleshooting permission issues.

Hope it helps..

Advertisements

Understanding “Block Deletion of Out-of-the-box Attribute Maps” in Dataverse / Dynamics 365


In Dynamics 365, attribute maps define how data flows from one record to another when creating related records. For example, when creating a Contact from an Account, fields like Address, Phone Number, and Website are copied automatically through predefined mappings. These mappings are part of standard Microsoft solutions like Sales, Customer Service, and Marketing.

If we try deleting these out-of-the-box (OOB) mappings, we will encounter an error — the platform restricts the deletion of system mappings to protect standard data flow and solution integrity.

A screenshot of a computer error

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.

Using the Block Deletion of Out-of-the-box Attribute Maps feature setting, we can govern this behavior. Navigate to Environment → Settings → Features to locate this option.

A screenshot of a computer

AI-generated content may be incorrect.

When we disable this setting, the platform allows the deletion of OOB mappings.

A screenshot of a computer

AI-generated content may be incorrect.

A screenshot of a computer

AI-generated content may be incorrect.

In some scenarios, it could be applicable, like during lead conversion, where we may want to remove OOB mappings (like Address, Job Title, or Description) to populate these fields using external data. Some organizations use a custom quoting process instead of the OOB Opportunity → Quote flow. They remove the standard attribute maps that automatically copy data into Quote fields to prevent conflicts with their own automation.

However, even if these mappings are deleted, they can reappear when Microsoft pushes future solution updates. The recommendation is to only disable this setting if there is a specific and controlled use case, typically in a non-production environment, and with a backup plan in place. Keeping this setting enabled ensures consistency and prevents loss of important system logic that underpins Dynamics 365’s standard data flow.

Hope it helps..

Advertisements

Flows getting triggered multiple times / missing callbackregistration record – Power Automate / Dataverse


Recently, we observed that one of our flows was getting triggered multiple times in our UAT environment; however, the flow was working properly in our Development environment.

A screenshot of a computer

AI-generated content may be incorrect.

On comparing the flows trigger, we didn’t find any differences.

A screenshot of a computer

AI-generated content may be incorrect.

However, when checking for the callbackregistration record, we observed that for the Dev env, we had the callbackregistration record available.

A screenshot of a computer

AI-generated content may be incorrect.

However, it was missing for our UAT environment.

A screenshot of a computer

AI-generated content may be incorrect.

Turning the flow on and off didn’t create the corresponding callbackregistration record.

https://nishantrana.me/2025/09/02/fixed-flow-not-getting-triggered-incorrect-callback-registration-record-power-automate-dataverse/

Eventually, we deleted the trigger and recreated it in the UAT.

A screenshot of a computer

AI-generated content may be incorrect.

After recreating the trigger, we could see our flow getting triggered only once as expected.

A screenshot of a computer

AI-generated content may be incorrect.

However, we also noticed that the name of the callbackregistration record was not just the GUID, but it also had MTA suffixed to it in our UAT.

daf9fae3-a405-ee11-8f6e-00224817f864:MTA

A screenshot of a computer

AI-generated content may be incorrect.

So may this record was already existing and had an incorrect filter expression, which got fixed when we deleted and created a new trigger.

We also deleted this callbackregistration record, and turned our flow on and off. This created a new callbackregistration record with the same MTA suffixed to it.

A screenshot of a computer

AI-generated content may be incorrect.

So the solution here could be to find the callbackregistration record either with a GUID or with MTA suffixed to it, delete the record found, and turn the flow on and off.

Hope it helps..

Advertisements

JavaScript Gotcha: Why [x == (a || b)] Fails


Recently we observed that our JavaScript code was not working as expected.

Now when we write conditions in JavaScript, it’s natural to want to check if a variable equals one of multiple values. A common mistake is to write the condition like this:

if (loanType == (CareFeeDeferralFeesShort || CareFeeDeferralFeesLong)) {
    // do something
}

At first glance, it seems like this would check if ‘loanType’ is equal to either ‘CareFeeDeferralFeesShort’ or ‘CareFeeDeferralFeesLong’`’. Unfortunately, that’s not what JavaScript actually does.

The ‘||’ operator in JavaScript doesn’t return a boolean. Instead, it returns the first truthy value it encounters.

For example:

console.log(1 || 2); // 1

console.log(0 || 2); // 2

So in our case:

If ‘CareFeeDeferralFeesShort’ is ‘1’, then ‘(CareFeeDeferralFeesShort || CareFeeDeferralFeesLong)’ becomes ‘1’.

If it’s ‘0’ (falsy), then the expression becomes ‘CareFeeDeferralFeesLong’.

This means the condition effectively reduces to checking only one value, not both.

The right way is to compare the variable separately against both values:

if (loanType == CareFeeDeferralFeesShort ||
    loanType == CareFeeDeferralFeesLong) {
    // do something
}

Here, JavaScript evaluates each equality independently:

‘loanType == CareFeeDeferralFeesShort’

‘loanType == CareFeeDeferralFeesLong’

If either is true, the whole condition passes.

Takeaway

(x == (a || b)) is not the same as `x == a || x == b`.

Hope it helps..

Advertisements