Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AllowEdit on data source remains read only

(0) ShareShare
ReportReport
Posted on by 380

I am using CustInvoiceJour with a new data source linked to refrecid of the journal. the problem I am experiencing is the new data source allowedit = yes is not working. the new grid added to custinvoicejour remains readonly. I can delete and Add fine but not edit. 

I had tried several Form control overrides on the init data source, active on TAB and data source. but it remains read only. AutoDeclaration = yes was used on the data source and form control as well. 

This is AX 2009 fyi!

*This post is locked for comments

  • Christiaan Profile Picture
    Christiaan 380 on at
    RE: AllowEdit on data source remains read only

    Thanks for double checking on another platform, I found the issue had to be custom code and indeed in VAR layer a Tab change event manipulates the AllowEdit on CustInvoiceJour_ds. now I did see this before and disabled it but I realized there are two DS sources both with AllowEdit No: CustInvoiceJour and CustInvoiceTrans need to be set to AllowEdit before custom DS will actually work. basically I understood from this is if any DS is allowEdit No others are also No.

  • Christiaan Profile Picture
    Christiaan 380 on at
    RE: AllowEdit on data source remains read only

    Thanks for double checking and it narrow down my options to custom code must have overwritten allowEdit on data source and it was in VAR layer under a method for Tab change event. Now I did try this before but did not change anything for me only until I made AllowEdit on two data sources : CustInvoiceJour and CustInvoiceTrans. they were set to AllowEdit No. Just setting AllowEdit Yes on custInvoiceJour is not enough. Appreciate your help!

  • Verified answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: AllowEdit on data source remains read only

    Unfortunately i have not installed AX2009 environment. I can't check the code. Sorry.

    But i've tried to add a new DS to CustInvoiceJournal form in AX2012R3, set AllowEdit = YES, create a new TabPage with custom grid and it works. But, my new DS not joined to any DS.

  • Christiaan Profile Picture
    Christiaan 380 on at
    RE: AllowEdit on data source remains read only

    Setting the Parent CustinvoiceJour data source to AllowEdit = Yes does not change the Tabpage custom grid to allow changes. It is probably same as putting allowEdit in code for the Grid itself.

  • Christiaan Profile Picture
    Christiaan 380 on at
    RE: AllowEdit on data source remains read only

    Here are the screen shots you asked for. CustInvoiceJour is a base AX SYS layer Form with three data sources. I am adding additional TAB with a new data source. InventDim is also a SYS layer data source but it has AllowEdit turned on. 

    Fig: Base AX custInvoiceJour data source with AllowEdit, delete, create NO.

    add-data-source.jpg 

    Adding data source passive linktype; with AllowCreate No (no adding of records) only allow Delete and Change = Yes

    add-data-source.jpg

    Tab and Grid modifications. AutoDeclaration is turned on for TabPage only.

    morphx_2D00_Tab-and-Grid.jpg

  • Suggested answer
    Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: AllowEdit on data source remains read only

    If the grid has DataSource property filled with DS table which AllowEdit = No you not be able to edit any field on the grid, no matter from which DS this field.

  • Christiaan Profile Picture
    Christiaan 380 on at
    RE: AllowEdit on data source remains read only

    CutInvoiceJour Form has two data sources both AllowEdit, AllowDelete, add NO specifically. then inventdim data source is AllowEdit turned on. If I set my custom Datasource allowDelete and AllowAdd to Yes (or true) it does allow me to delete records, the odd thing is the AllowAdd does allow me to select new icon. but the grid fields do not show drop down boxes. I am not able to enter in values either. I am suspecting security plays a role or the linkage to CustInvoiceJour does not allow me to change records. I am System Admin of course. the CustInvoiceJour relation I prefer to use passive and at the time of TAB click I execute the executequery in PageActive method of the data source to load the grid with records. this works fine and is best form performance from my experience. I had also tried to use linktype: Active/delay with innerjoin and removed executequery() code entirely still allowedit on data source remains read only. I do not consider a linkage issue is the problem. Delete always works as expected. I had also explicit hardcoded the data source_ds.fieldnum(xx,xx,).allowedit = yes. in the Init() methods, Tab click method and even object control itself. No change to AllowEdit parameter. I do realize this is AX 2009 maybe I am missing a specific 2009 trick or technology fix?

  • Rustem Galiamov Profile Picture
    Rustem Galiamov 8,072 on at
    RE: AllowEdit on data source remains read only

    Hi Christiaan!

    What is the value of CustInvoiceJour allowedit properties? Is this your custom form or existing and customised form?

    Can you provide some screenshots?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans