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)

Clear all form fields

(0) ShareShare
ReportReport
Posted on by

Hi friends,

            I need to clear my form fields while opening the form init method ,

i used all methods like refresh , reread but its not refreshing , please suggest me an solution.

thanks& regards,

padmapriya.v

           

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Please give us more information. How does it happen that you already have unwanted values when the form is still initializing?

    Where the form fields take their values? Are they bound to datasources?

  • Community Member Profile Picture
    on at

    Hi martin ,

               I am trying to clear all the fields in customised form "LHostpostdatedRecord"

    in init method but  my page page is not refreshed . It is same as before no change.

    My code is:

           CustVendPDCRegister_ds.refresh();

           CustVendPDCRegister_ds.initValue();

           CustVendPDCRegister_ASLReasonForHolding.text(" ");

           CustVendPDCRegister_ds.refresh();

    thanks & regards ,

    padmapriya.v

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    Unfortunately you didn't answer either of my questions. I can at least assume that you're talking about controls bound to a data source (CustVendPDCRegister_ds), but refreshing makes no sense (you'll get the same data) and it doing it in init() is too early anyway.

    You really must explain your problem if you want our help.

  • Suggested answer
    Pravasti AK Profile Picture
    2,985 on at

    Hi Padma,

    Please refer the below link:

    https://community.dynamics.com/ax/f/33/t/96140

     

     

     

    Thanks,

    Kavitha

  • Community Member Profile Picture
    on at

    Hi ,

     I created one dialog form and opening it through one menu item , then in that dialog form i put one text box field . when i am giving data in that textbox field, it getting saved their,next time when i am opening the same dialog form data's are not cleared from the textbox. so i need to clear the text field when ever i am opening that dialog form.

    thanks & regards,

    padmapriya.v

  • Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

    I wish you finally give us some details about your field; you make so difficult for us to help you.

    Dialogs normally don't have data sources - is it the case in your case? If not, I have no idea what you meant by the code above (refreshing CustVendPDCRegister_ds). If it has, isn't it a bug?

    If it's not bound, you're likely getting previous values from SysLastValue. If you tell us how you've build the dialog, we can tell you how to disable it.

    If it's bound to a datasource, you're getting values from there. If you don't want it, either don't use a datasource or create a new, empty record.

  • Suggested answer
    Pravasti AK Profile Picture
    2,985 on at

    Hi Padma,

    Use this code  "dttable_dtname.text(" ");" in Init methods in Form module.

    Then after you put your code, set the auto declaration property of the said text control into "YES", Then "Refresh" your Windows menu by clicking CTRL + W. Then open the form check the textbox if the value is clear.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans