SugarCRM to achieve level three linkage in Editviews

Source: Internet
Author: User

In the "SugarCRM in the views of thecall JS" has been explained how to add JS code in the views, but in actual demand is still not enough.

(1) Add HTML code to a specific field in the page and trigger the corresponding JS method, and of course which tags in the HTML code are used, depending on the requirements.

(2) Only by loading the JS method may not be able to meet the requirements, while in order to consider the user experience and from other data tables or other types of files to extract data and populate the page, you can use jquery to complete the data filling work, and sometimes need to use Ajax to complete the asynchronous request processing data.

(3) Tip: Generally the above two steps are considered at the same time.

The following shows how to achieve national, provincial and municipal level three linkage:

(1) In order to be able to successfully put data into the data table, to ensure that three fields have been established (country, state, city), the method can be built through the module generator, or through the studio, or you can manually establish the field.

(2) in the custom/modules/modulename/metadata/editviewdefs.php directory, if no editviewdefs.php can be

modules/modulename/metadata/ editviewdefs.php copy came in to modify (there are two editviewdefs.php, but SugarCRM first load the custom editviewdefs.php), and then add code related code:

    1. A) include JS, which contains two JS packets, one is Jquery.js, the other is test3.js;

    1. b) In three fields, add a select tag, for example:

(3) Test3.js processing method, which uses JS, jquery and Ajax, but before this test3.js and Jquery.js first put to the specified directory, detailed code and comments in the test3.js, see for themselves.

(4) There is also a world.xml file to be placed in the root directory of PHP.

SugarCRM to achieve level three linkage in Editviews

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.