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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Make data source editable

(0) ShareShare
ReportReport
Posted on by 6

I am currently working on upgrade + implementation project. In ax2012 ReqTransExplosion has DS called tmpReqExplosionOnhand ( underlying table of same name), there it has been allowedit false of sys layer has been changed to to Yes in the cus layer. In d365, as per the standard implementation DS is non editable.

I have to tried force through code to make DS has allow editable true. In form level init method, DS init, DS active methods. The DS buffer in the code shows the allowedit to be true. However in the form, none of the fields are editable. I tried to make the control editable to see if that works.

Is there a way, we can make standard forms DS that is  non editable as editable D365? If not, do we have to duplicate the table and implement the necessary code changes?

Thanks,

VD

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,482 Super User 2025 Season 2 on at

    Hi NoobDaxCoder,

    What is the exact business requirement to make this temporary table editable? What is it what you need to achieve?

  • NoobDaxCoder Profile Picture
    6 on at

    Hi Andre,

    Yes, Need to make this tempdb table as editable. One field needs to be editable for now, in future they might add more.

  • Verified answer
    GirishS Profile Picture
    27,829 Moderator on at

    Try the below code on the form init method and check. I have written COC for form init method.

    Public void init()
    {
        next init();
        FormDataSource fds = this.YourDataSourceName_ds;
        fds.allowedit(true);
    }

    Thanks,

    Girish S.

  • NoobDaxCoder Profile Picture
    6 on at

    Hi Girish,

    I have already tried to DS editable Form init, DS init, DS active etc.That did not help. I am just interested to know whether it feasible or not, at this point.

    I tried alternative method, to create new duplicate table and create relation, same as in the primary index of the table TmpReqExplosionOnhand. Added this table in ReqExplosionOnHand form and created new control pointing to duplicate Table DS, so that any modification made to this duplicate table should be updated to the non editable table. That did not work.

    pastedimage1666869775571v2.png

    pastedimage1666869869265v4.png

    [ExtensionOf(formDataSourceStr(ReqTransExplosion, xyzTmpReqExplosionOnHand))]
    public final class xyzDevReqTransExplosion_xyztmpReqExplosionOnhandDS_Extension
    {
      public void initValue()
      {
        next initValue();
        FormDataSource xyzTmpReqExplosionOnHand_DS = this;
        XYZTmpReqExplosionOnHand xyzTmpReqExplosionOnHand = xyzTmpReqExplosionOnHand_DS.cursor();
        tmpReqExplosionOnhand tmpReqExplosionOnHand = xyzTmpReqExplosionOnHand_DS.formRun().dataSource(formDataSourceStr(ReqTransExplosion, tmpReqExplosionOnhand)).cursor();
        xyzTmpReqExplosionOnHand.Explode = tmpReqExplosionOnHand.Explode;
      }
    
    }
    
    [ExtensionOf(formDataFieldStr(ReqTransExplosion, XYZtmpReqExplosionOnhand, Explode ))]
    public final class XYZDevReqTransExplosion_XYZtmpReqExplosionOnhandDS_Explode_Extension
    {
      public void modified()
      {
        next modified();
        FormDataObject expLode = any2Object(this) as FormDataObject;
        FormCheckBoxControl expLodeCheckBox;
        FormDataSource XYZtmpReqExplosionOnhand_DS    = expLode.datasource();
        XYZtmpReqExplosionOnhand xyztmpReqExplosionOnhandLocal = XYZtmpReqExplosionOnhand_DS.cursor();
        TmpReqExplosionOnHand tmpExplosionHand = XYZtmpReqExplosionOnhand_DS.formRun().dataSource(formDataSourceStr(ReqTransExplosion, TmpReqExplosionOnHand)).cursor();
    
        tmpExplosionHand.selectForUpdate(true);
        ttsbegin;
        tmpExplosionHand.Explode = xyztmpReqExplosionOnhandLocal.Explode;
        tmpExplosionHand.update();
        ttscommit;
      }
    
    }
    
    
    
    
    

    both controls are not editable still. 

    pastedimage1666870432416v1.png

  • GirishS Profile Picture
    27,829 Moderator on at

    Can you tell me the navigation for the form.

    Is it from purchase order form?

    Thanks,

    Girish S.

  • NoobDaxCoder Profile Picture
    6 on at

    Production control > planned production order > (action pane) View > (menu button) Explosion > Explosion form > Tab > Critical On-hand inventory > Grid DS ( should be editable)

  • GirishS Profile Picture
    27,829 Moderator on at

    Only the selected fields are editable in the form. I tried the same code which I have posted previously and its working.

    Fields that are marked with yellow are only editable. Refer to the screenshot below

    pastedimage1666874018436v1.png

    Thanks,

    Girish S.

  • NoobDaxCoder Profile Picture
    6 on at

    Hum, None of the fields are editable for me.

    I think there must be some other extension class that is making datasource non editable.

    Is there a way find out of all the extension class that is called when opening a form or doing some other operation?

  • GirishS Profile Picture
    27,829 Moderator on at

    You can do a meta data search for explosion form. From there we can find out all the objects that are referring to this form.

    Refer to the below link for Metadata search.

     https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/467688/search-meta-data 

    Thanks,

    Girish S.

  • NoobDaxCoder Profile Picture
    6 on at

    Is there any keyword other than allowedit?

    I checked all, and commented the codes were allowedit(false).

    Still none of the fields are editable. :S

    pastedimage1666893417805v2.png

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

News and Announcements

Season of Giving Solutions is Here!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 732 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 413 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 289 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans