Hi everyone!
I do not know if I am in the right place, but I need help with writing a command in Power FX to trigger a custom button in our model-driven app in PowerApps. I searched the internet but could not find the right solution.
Scenario:
I have created a custom button in the model-driven app on the table 'Opportunity Line'. I need this button to update a toggle on the parent Opportunity when a user uses this button (set it to true). As a result, a cloud flow will be triggered.
Currently, I am using this command, but when I click the button, nothing happens:
Patch(
Opportunities, // Parent entity name
LookUp(
Opportunities,
Opportunity = ThisRecord.Opportunity // Match the OpportunityID in the child record with the parent
),
{
'Convert to Sample Request': true
}
)
I know I am doing something wrong but I don't know what, as I am very new to Power FX commands.
Thank you!