Retain user input values

Source: Internet
Author: User
Axapta uses the xsyslastvalue class to save user input values. This class consists of methods such as getlast and savelast. Of course, the most important is the above two methods.
Runbase implements the syssaveable interface to save user input values. This interface defines some methods for obtaining and saving user input values. Runbase calls getlast and setlast of xsyslastvalue in the promptprim () method to obtain and save user input values. user input values are stored in syslastvalue of the database table.
Therefore, to save user input values, axapta creates a table syslastvalue on the database layer and uses the class xsyslastvalue to operate table read/write, the methods defined by the syssaveable interface are used to read and write data.
After understanding this process, you can save user input values in all places, for example, saving user input values in form. All forms in the system are set through syssetupformrun. Because the designer did not save the user input value as part of the form design when designing the form, the syssaveable interface is not implemented by default, of course, we cannot modify it here. A better idea is to create a new class that inherits from formrun, so that the class can implement some methods unrelated to the specific form in syssaveable, and then implement the remaining methods in the specific form, the class then reloads the init method of formrun, calls the getlast method of xsyslastvalue before Super (), reloads the close () method of formrun, and then calls the savelast () method before Super.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.