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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Power FX button - Command to Save and Close

(1) ShareShare
ReportReport
Posted on by 123
Hi
 
I am trying to write a power fx command to save and close a record.
 
The button appears and I've tried an fx to update a value and this works, but cant seem to find any command to help me save and close the record.
 
 
Button is called Submit CR
 
This was the command suggested by CoPilot
 
 
But this didn't work.
 
Any help would be massively appreciated. 
 
Thanks
Damesh
I have the same question (0)
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    Hi,
    I am trying to write a power fx command to save and close a record.
    Does close here mean to close the form interface for the current record? Or changing the state of that record to 'Closed'?
    1)Close current form:
    --There are ready-made OOB button--Save&Close.
    2)Change record status:
    You should check the status column of the current table: whether the name is correct and whether it contains an option called Closed:
    It seems that we can't customize Status column, we just can add or change options on the Status Reason.
    I hope you can mark my answer verified if it answer your question! If you have any questions, please feel free to contact me.
    Regards,
    Leah
     
  • Damesh Peri Profile Picture
    123 on at
    @leah Ju, thank you for response.
     
    I was trying to close the record. I am aware of the OOB Save and Close. 
    I know you can save and close a record using JavaScript. I was trying to replicated the same function but using power fx.
     
    The patch command is something Copilot suggested. But as mentioned it didnt work. 
     
    Thanks
    Damesh

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans