Promob has by default a few fields where we can enter customer information.
These fields are standard for all systems and distributions and can be divided into two categories: customer data and rep_ fields.
Currently we still have the concept of using a standard html for the client data and rep_ fields. This file is contained in the program/documents/data.html folder and is in the Connect repository.
Customer data are fields related to customer information, are located on the Connect home screen of projects and can be divided into:
- Identification data (name, email)
- Address data (address, city, etc.)
- Document data (CPF, CNPJ)
The rep_ fields are known this way because their id starts with rep_ and their characteristic is to inform data that usually do not change, such as, for example, the factory's zip code.
The data for the rep_ field is located in the Help -About menu:
However, each customer can create its own fields, depending on its needs, either project data or rep_ fields, and for this we call them custom fields.
IMPORTANT: Custom fields are saved in Promob's local folder (Program Data/Procad/System Folder/Repository/CustomFields.sys), so if this file is removed, the data will also be lost and must be filled in again.
Registering Customized Items in Promob Catalog
To register custom fields:
1. Go to Registration - Custom Fields.
2. The Custom Fields Table will be displayed:
Create a New Custom Field
1. Click New Field Creation to create a new custom field.
2. Enter the required data:
- ID: ID of the custom field.
- If the field starts with rep_, it will be displayed in the Help-About screen.
- For the other cases, it will be displayed in the project details.
- Name: Name of the field that will be displayed to the customer.
- The field can be translated.
- Type: define the field type.
- Text: Free text field.
- Checkbox: True or False;
- Date: Date
- Combo Box: Multiple options field.
- To create the options, the following information must be filled in: Option and external code.
- Initial Date System and Last Date System: Period that the field will be displayed;
- Test: Whether the field will be displayed for factory account;
- Active: Whether the field is active.
- Show field in Connect: If selected, the field will be displayed in the project detail screen.
3. When you have finished your registration, click Save.
Edit a custom field
To edit a field, just click on the field and edit the desired data.
When a new custom field is created, this information is saved in the database, in the CustonFields collection. CustonFields are by systemId, that is, applied to all systems without distinction of account (account).
Behavior in Promob Studio
Project Detail Screen
The fields displayed on this screen have the characteristic of being unique for each project, that is, when creating a new project, the information must be entered again.
When a custom field is created, it will be displayed in the project details screen. The exception occurs when it is a field of type rep_, and is marked as true in the Show field in Connect option.
The fields that are displayed on this screen have the characteristic that they are filled in once and regardless of the project, or when you reopen Promob they will be filled in.
They are typically used for store and factory data. The information is saved in the user's local folder and has nothing saved in a database.
The fields that appear on this screen are of type rep_ and are not marked true in the xxxxxx option.
Updating the default HTML
When a system has a custom field, regardless of whether it is project data or rep_ field, it will be dynamically added to the standard html so that it can be populated.
Validation of required fields
Some systems instruct the merchant to compulsorily register some standard or customized field. Therefore, before starting the budget generation process, Connect is responsible for creating this validation. If a required field is not filled in, a message will be displayed to the user informing that the specific field was not filled in and the budget will not be generated.
When generating a budget, these values will be populated in the base XML of the budget, which will then be applied a mask via XSLT.