Skip to content

Commit 3c1c366

Browse files
committed
ops
1 parent a42a620 commit 3c1c366

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/sim/blocks/blocks/microsoft_dataverse.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,16 +492,19 @@ Return ONLY the expand expression - no $expand= prefix, no explanations.`,
492492
}
493493

494494
// Map block subBlock IDs to tool param names where they differ
495-
if (rest.searchEntities) {
495+
if (operation === 'search' && rest.searchEntities) {
496496
cleanParams.entities = rest.searchEntities
497497
rest.searchEntities = undefined
498498
}
499-
if (rest.functionParameters) {
499+
if (operation === 'execute_function' && rest.functionParameters) {
500500
cleanParams.parameters = rest.functionParameters
501501
rest.functionParameters = undefined
502502
// Prevent stale action parameters from overwriting mapped function parameters
503503
rest.parameters = undefined
504504
}
505+
// Always clean up mapped subBlock IDs so they don't leak through the loop below
506+
rest.searchEntities = undefined
507+
rest.functionParameters = undefined
505508

506509
Object.entries(rest).forEach(([key, value]) => {
507510
if (value !== undefined && value !== null && value !== '') {

0 commit comments

Comments
 (0)