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 :
Finance | Project Operations, Human Resources, ...
Answered

site drop down need in report dialog

(0) ShareShare
ReportReport
Posted on by 30

hi all,

i need site in report dialog. So, i did the below code in dialog

dialogSite     = dialog.addField(extendedTypeStr(InventSiteId), "@SYS122446");

site.jpg

i wants only HK in site drop down. how i will do this?

please give me more shed on this.

thanks!

I have the same question (0)
  • @rp@n Profile Picture
    30 on at

    i need to write lookup for this? to get site only ? means HK

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    I'm not sure if understand.

    You have a lookup for sites. But you want it to show only HK site. So it would only show 1 value? Why would you need a lookup or dialog field for it?

  • @rp@n Profile Picture
    30 on at

    because if select value form site, its come with 0. as in drop down it showing the 1st column.

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Sorry, I don't understand.

  • MATTGUO Profile Picture
    22,349 Moderator on at

    Hi @rp@n,

    Are you looking for something like registerOverrideMethod method?

    dialogSite = dialog.addField(extendedTypeStr(InventSiteId), "@SYS122446");

    dialogSite.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(DialogUIBuilder, lookup), this);

    See this blog:

    ztirom.at/.../

  • @rp@n Profile Picture
    30 on at

    hi mattugo,

    the above code  will show only site in drop down?

  • @rp@n Profile Picture
    30 on at

    nikoloas,

    i mean to say 

    8546.a1.jpg

    2626.a2.jpg

    please give me more shed on this

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Could you share your full code of this class?

    The line that you shared seems correct. But perhaps you have something else in your code that explains this.

    To me it looks that the lookup is now using some integer data type (instead of string that InventSiteId is), and showing very strange contents.

    Either you have wrong code somewhere else in this class, or your environment is corrupted.

    Are you able to do a full x++ build and database synchronization in this system without errors?

  • @rp@n Profile Picture
    30 on at

    protected Object Dialog()

    {

       Dialog dialog;

       ;

       dialog = super();

       dialog.caption("@GDJ107");

       dialogFromDate              = dialog.addField(Extendedtypestr(TransDate),"@SYS24050");

       dialogToDate                = dialog.addField(Extendedtypestr(TransDate),"@SYS36680");

       dialogSite                  = dialog.addField(extendedTypeStr(InventSiteId), "@SYS122446");

       dialogCustomerGroup         = dialog.addField(extendedTypeStr(CustGroupId), "@SYS11904");

       return dialog;

    }

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Could you share your full code of this class?

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

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans