Wonach suchst Du?
What are you looking for?

Enable / Disable address fields shown in the address modal overlay

Overview

In the WebUI of metasfresh, addresses of business partners can be recorded in the record tab “Location” at the bottom of each entry in the “Business Partner” window.

Fig.: Location tab in the business partner window

This system configuration allows you to control which address fields are shown in the address modal overlay.

Fig.: Address fields in the address modal overlay

Example

Code reference

The following code reference will help you locate the related system configuration entries: de.metas.ui.web.address.AddressDescriptorFactory#SYSCONFIG_PREFIX

Configuration via WebUI

  1. Log in to metasfresh with the user role “System Administrator”.
  2. Open “System Configuration” from the menu.
  3. Use the filter to find the address configuration entries you want to adjust, e.g., by searching for “address”.

Fig.: Address fields in the address modal overlay

Configuration via SQL

The SQL to find the sysconfig entries is:

select name,value from ad_Sysconfig where name like 'de.metas.ui.web.address.AddressDescriptorFactory%.IsDisplay';

The following SQL select statement will return the german translations of the queried address fields:

select e.ad_element_id, ad_language,columnname,e.name,e.printname, etrl.name,etrl.printname  from ad_element e
join ad_element_trl etrl on etrl.ad_element_id = e.ad_element_id
where columnname ilike 'address%'
and ad_language='de_DE'
order by ad_language,e.name;

Adding a new address field

Fig.: create a new ad_element address5 in swingUI

Fig.: create a column in c_location table

Fig.: sysconfig address 5 isdisplay

addressDescriptor.addField(buildFieldDescriptor(IAddressModel.COLUMNNAME_Address5)
										   .setValueClass(String.class)
										   .setWidgetType(DocumentFieldWidgetType.Text)
										   .setDisplayLogic(getSysConfigDisplayValue(IAddressModel.COLUMNNAME_Address5))
										   .setDataBinding(new AddressFieldBinding(IAddressModel.COLUMNNAME_Address5, false, I_C_Location::getAddress5, AddressFieldBinding::writeValue_Address4)));

//@formatter:off
	String COLUMNNAME_Address5 = "Address5";
	String getAddress5();
	void setAddress5(String address);
	//@formatter:on

Fig.: Address 5 Field in the local webUI


View source file on GitHub.com