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 / Dataverse Model Driven...
Power Apps
Unanswered

Dataverse Model Driven App Command Bar Power FX Button - Error today -Cannot read properties of null (reading 'identifier')

(0) ShareShare
ReportReport
Posted on by 40

I have a command bar button on a main form using power fx formula. It clones a record. It was working fine until today (it looks like Microsoft did a copilot update??). It is now not working and I get the following error:

 

Error:  Cannot read properties of null (reading 'identifier')

 

I have removed and re-added the datasource in the DefaultCommandLibrary (canvas app) but it has not helped.  Is anyone having a similar problem and any ideas on how to solve?

 

Edit - here is my power fx formula - it was working fine until today????

 

If(
Confirm(
"Are you sure you want to clone this order?",
{
Title: "CLONE AN ORDER",
ConfirmButton: "Yes",
CancelButton: "No"
}
),
// If user clicks "Yes"
With(
{
NewOrder: Patch(
Orders,
Defaults(Orders),
{
'Order Type':Self.Selected.Item.'Order Type',
'Plan No':Self.Selected.Item.'Plan No',
Portfolio:Self.Selected.Item.Portfolio,
'Lot No':Self.Selected.Item.'Lot No',
'Account Code':Self.Selected.Item.'Account Code',
'Issue No':Self.Selected.Item.'Issue No',
'Contractor No':Self.Selected.Item.'Contractor No',
Description:Self.Selected.Item.Description,
'Site Contact Lot':Self.Selected.Item.'Site Contact Lot',
'Start Date':Now(),
Report:Self.Selected.Item.Report,
'Internal Notes':"Cloned from " & Self.Selected.Item.'Order No' & ". Please update before sending"
}
)
},
Navigate(NewOrder);
Notify("Cloning process completed. Please update before sending.")
),
// If user clicks "No"
Notify("Cloning process aborted.")
)

 



I have the same question (0)
  • LucyCC Profile Picture
    95 on at

    Thank you for posting, I'm having the same error as of two days.

     

    I'm also having deja vu: a couple of weeks ago my custom command buttons stopped working with an error: "The Component Library is still publishing. Please try again." After many hours of hair pulling I logged a support request, and it turned out it was a global error caused by a MS update. All info here.

     

    So I wonder if MS are working on the custom commands and keep wrecking the build somehow?

     

    I'm going to log another support request and will post any updates here.

  • LucyCC Profile Picture
    95 on at

    Also, I've not looked at your code but I suspect it's a problem with the custom command. My code works fine when I use it from a button in a custom page within my model driven app. The only difference between the custom page code and the custom command code is that the custom command includes an If(Confirm..) clause, just like yours. Confirm is only available for custom commands. However that bit of code was working just fine (and is actually still working on another button). Also, the problem for me is intermittent, occasionally the button works just fine.

  • sharonsammy123 Profile Picture
    40 on at

    Thanks LucyCC, comforting to know that it is not just me 🙂

    Interestingly, when the error first appeared I used the command checker (by adding "&ribbondebug=true" to the url) to see what was happening. It showed an error for the button, noting that the component library was missing.

     

    I managed to fix this error showing on command checker by republishing the command in the app, the component library and regenerating ribbon metadata - I am not sure which action made a difference. I also cleared the browser cache.

     

    HOWEVER, even though the button on command checker is not showing as error, the button still does not work and gives this error - "Cannot read properties of null 'reading identifier'".

     

    I really think it is a bug!  

     

  • chiachanglin Profile Picture
    5 on at

    Hi, 

    I too would like to report the same issue as of recently.

    Not sure if the steps to simulate it are the same but I've noticed that attempting to duplicate an existing record in the main form (after selecting them on the view) will trigger the error.

    If I were to create a new record and immediately duplicate it, no such error occurs.

    EDIT:

    Another observation I've noted (on my end that is) is that the error triggers if I'm attempting to duplicate the sole record in the table. Mind you, this issue has never happened before.

     

    If there more than a single record in said table, duplication will not trigger any error regardless of whether an existing record is selected or duplication immediately occurs after record creation.

    EDIT 2:

    Actually never mind, upon starting a new session, attempting to duplicate any of the records will trigger the error.

     

    Guess it's hard to tell if there's any pattern to this issue. 

  • MarkPP Profile Picture
    107 on at

    I have also started to get this issue. I am going to raise a support ticket. I would encourage anyone who has the issue to raise a ticket and then it helps get on Microsoft radar.

  • decersw Profile Picture
    19 on at

    I'm having the same issue with a new button just developed today. Weirdly I only get the error when I'm trying to get a value from a related entity.

     

    I'm also having an issue where I cannot use Self.Selected.AllItems on a Main Grid button. I add it into a ForAll but it just doesn't do any of the actions. I have to use Self.Selected.Item even though I'm not limiting the number of items that can be selected.

  • RoaldA Profile Picture
    4 on at

    We have exactly the same issue. Started to occur about 2 days ago. Anyone has a fix for this?

  • MarkPP Profile Picture
    107 on at

    Raise a support ticket with Microsoft. The more people that raise a ticket the higher up there priority list it will go. I haven't heard back from support yet but if i do I will pop an update on here

  • 12226317 Profile Picture
    2 on at

    Confirmed with MS appears they trying to identify the root cause of the issue, glad i'm not going crazy questioning myself. 

    issue is trending, keep reporting.

  • sharonsammy123 Profile Picture
    40 on at

    Microsoft have acknowledged my support request and have reached out to me for more details.  

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard