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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Disable Manual Entry lookup

(0) ShareShare
ReportReport
Posted on by 575

Hi Experts,

               

i Have a grid in a form.which has several fields(String edit) there are lookups on these fields as well.

the string edit field save the anyvalue (typed in by use or values from lookup)..i dont want this to happen the string edit should take values only from the lookup field.

is there any property that i need to change for this?

Thanks&Regards

Adam

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    DavidGunawan Profile Picture
    1,381 on at

    Hi,

    The edit field is related/lookup from other tables? If yes, then it will do the validation. If no then you can override validateField() method of the table/datasource. You can put your validation logic in the method.

    Regards

  • Verified answer
    Martin Dráb Profile Picture
    239,643 Most Valuable Professional on at

    I agree with using a validation. Don't try to force users to use the lookup form; they may have a valid value copied from elsewhere and they should be able to paste it to the string field. It's important for their productivity.

  • veera seenivasan Profile Picture
    575 on at

    Hi David,

                  I have added this code but it validation showing for both manual entry field and value selected from the lookup .how to avoid this

                public boolean validate()

    {

       boolean ret;

       ret = super();

       if(smaagreementline.ServicePlanId)

       {

           ret = checkFailed("plan is already suspended");

       }

       return ret;

    }

  • Verified answer
    DavidGunawan Profile Picture
    1,381 on at

    Hi,

    You can't just do simple validation of blank value.

    If the value of ServicePlanId comes from the lookup then you need to validate whether the value exist the list of lookup (either from other table or fixed list, etc).

    For example:

    public boolean validate()

    {

      boolean ret;

      InventTable  inventTable;

      ret = super();

      if(InventJournalTrans.ItemId)

      {

          inventTable = InventTable::find(InventJournalTrans.ItemId);

          if(!inventTable.recid)

               ret = checkFailed("Item ID is not exist in table master item table.");

      }

      return ret;

    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans