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 :
Dynamics 365 Community / Forums / Finance forum / CoC FormDataSource to ...
Finance forum
Under review by Community Managers

Under review

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

CoC FormDataSource to AllowEdit not working

Posted on by
Hi guys,
 
In my task, I want to make a standard RetailTransactionSalesTrans form to be editable. One of the caveat is this form must be call from my custom menu. So I'm creating CoC for FormDataSource but seems not working,
Here is the code, Forgive me to not using Code block because in my experience it is un-usable.
 
[ExtensionOf(FormDatasourceStr(RetailTransactionSalesTrans, RetailTransactionSalesTrans))]
internal final class MY_FormRetailTransactionSalesTrans_Extension
{
     
    public int active()
    {
        boolean ret;
        ret = next active(); 
        if(ret && this.formRun().args().menuItemName() == menuitemdisplaystr(MYInquiriesTransactions))
        {
            this.allowEdit(NoYes::Yes);
        }
        return ret;
    }
}
 
 
When debug, seems nothing's wrong with the IF condition, the code to make it allowEdit is executed. But somehow the form is still not editable.
 
For the standard form we can find in Retail and Commerce > Inquiries and reports > Store transactions, which if we go through its menu Transaction -> Sales Transactions ->
 
So we will have the form ->
 
What I intended is to be able to edit the Financial Dimension of the current row. May I know how to make this form editable ? especially Financial Dimension tab part.
 
Thanks
 

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans