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 :
Microsoft Dynamics AX (Archived)

Lookup form control won't accept value...what am I getting wrong here?

(0) ShareShare
ReportReport
Posted on by 2,007

Good morning all,

Sorry if this is the dumbest question ever, but I have searched and searched for a solution to this issue and while I am sure the solution is probably something simple, I can't see it and my frustration is mounting.

I have two forms with two lookup fields that use the same lookup for the field value. In one form, my users can select a choice from the lookup drop down and the field fills in the value and when it saves, the value is retained.

In my other form, the user can pull up the same lookup with the same values, but when the lookup value is selected, the form control never accepts the value. It just remains blank. 

Does anyone know what the cause of this could be? I tried changing the AUC GUID to force users to get a new AUC file and clear their design caches, but that had no impact. I think it is a setting on the form control itself.

Any help would be greatly appreciated. Thanks.

Brandt

*This post is locked for comments

I have the same question (0)
  • Vilmos Kintera Profile Picture
    46,149 on at

    Is the lookup() or modified() method overriden on your FormControl or on the FormDataSource.Field? Does the table participate in a join?

  • Brandt Fundak Profile Picture
    2,007 on at

    Vilmos,

    It is on the field and the table participates in a delayed join to the InventDim datasource that is on the form.

    I'm assuming that is the culprit? (The one that works doesn't do a join.)

    Brandt

  • Vilmos Kintera Profile Picture
    46,149 on at

    It is hard to tell if it is custom stuff since you can do lookups in so many ways. Have you tried debugging?

    So it is a lookup method on InventDim, which is joined to another table. Which field are you using for the lookup, and also can you paste the code?

  • Brandt Fundak Profile Picture
    2,007 on at

    I have tried debugging, but the lookup works fine.

    The form in question is InventTransRegister. The InventDim table is inner joined to the main InventTrans data source of the form and set to not allow edits or creates. I am joining the InventBatch table to that table to allow us to set a new field I have added called ParentInventBatchId. I assume that since InventDim is set to not allow edits, anything joined to it probably isn't editable either...

    Brandt

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    I just clicked together a simple form, top DS InventTrans, inner join InventDim, delayed join InventLocation with inserting/editin configured the same way as in your example.

    I have added fields from InventTrans and InventDim to a grid, and to a separate field group some fields from InventLocation.

    Can confirm that lookup and storing the value is working fine if the field behind has a relation on the table. If you have custom lookup forms/methods, I'd say the code in there is the one that is incorrect.

  • Brandt Fundak Profile Picture
    2,007 on at

    Vilmos,

    It looks like you were right. The modified method was calling a class that I believe was deleting the value after it would set it, making it look like it had never been set. Thanks for pointing me in the right direction.

    Brandt

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans