To Change the Label of a Field

You can change the label for an original data field on the DAC and graph levels. The following sections provide detailed information:

To Change the Label of a Field on the DAC Level

To change the label of a control for a field used on multiple forms, you should customize the PXUIField attribute of the field in the data access class extension. To do this, perform the following actions:
  1. Open the field in the Data Class Editor, as described in To Customize a Field on the DAC Level.
  2. In the Customize Attributes box, select Append to Original.
  3. On the More menu (under Actions), click Edit Attributes.
  4. In the Attribute list of the Customize Attributes dialog box, which opens, click the PXUIField attribute to select it.
  5. In the parameter list, specify a new label for the DisplayName parameter, as the screenshot below shows.
  6. Click OK to exit the dialog box.
  7. Click Save on the editor toolbar to save your changes to the customization project.
    Figure 1. Changing the display label of a field


As a result, the editor adds the following attribute for the field to the DAC extension.
[PXCustomizeBaseAttribute(typeof(PXUIFieldAttribute), "DisplayName", "NewName")]

To Change the Label of a Field on the Graph Level

To change the label of a field for a single form, you should customize the PXUIField attribute of the field in the graph extension. To do this, perform the following actions:
  1. Create the code template that includes the original attributes of the field and the DACName_FieldPropertyName_CacheAttached() event handler, which replaces the attributes within the graph, as described in To Customize a Field on the Graph Level.
  2. By using the Code editor, replace the original attributes in the template, as shown in the following code snippet.
    [PXCustomizeBaseAttribute(typeof(PXUIFieldAttribute), "DisplayName", "NewName")]
    protected void DACName_FieldPropertyName_CacheAttached(PXCache cache)
    {
    }
  3. Click Save on the editor toolbar to save your changes to the customization project.