web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom command bar but...
Power Apps
Unanswered

Custom command bar button in model-driven apps - unable to copy the Currency column

(0) ShareShare
ReportReport
Posted on by 44

Hi there,

 

I am working on implementing a custom button in a model driven app which duplicates whichever records are currently selected. It has the OnSelect code of:

 

IfError(
 ForAll(Self.Selected.AllItems,
  Patch(Milestones, Defaults(Milestones),
  {
   'Project Name': "Copy of " & ThisRecord.'Project Name',
   'Expected Start Date': ThisRecord.'Expected Start Date',
   Project: ThisRecord.Project,
   Currency: ThisRecord.Currency
  }
 )
);
Notify("The selected item(s) have been copied successfully!", NotificationType.Success, 5000),
Notify("Failed to copy the selected item(s). Please try again.", NotificationType.Error, 5000)
);

 

Currency is a Lookup column to the OOTB Currency table.

 

When I exclude the Currency column from this code (so when the code only has Project Name, Expected Start Date and Project) it works perfectly, but with the Currency column I get this error:

 

Veeks01_0-1715761064264.png

 

From what I can tell, the error isn't happening because Currency is a Lookup column, as Project is also a Lookup column and there is no issue when copying that field to the new record.

 

For anyone who has been configuring custom buttons in model-driven app buttons recently you may be aware that it wasn't working for anyone until Microsoft rolled out a fix just a few days ago so I wonder if that is playing a part in this bug? You can read more about this here: Dataverse Model Driven App Command Bar Power FX Bu... - Power Platform Community (microsoft.com)

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 103

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
wolenberg_ Profile Picture

wolenberg_ 67 Super User 2026 Season 1

Last 30 days Overall leaderboard