Field States
Description
Makes/unmakes a certain field required.
Return Function
n/a
Parameters
Name | Description | Type |
field | The name of the field | String |
value | To make the field required, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name. This parameter is optional and the default value is empty. | String |
Example
The following example makes the customer comments field (cl.obs) required.
sdk.setRequired(FIELDS.CL_OBS, true);
Example 2
The following example makes the field U8882_EXTCL.PIN required. This field belongs to entity U8882_EXTCL (customer extension entity)
sdk.setRequired(FIELDS.U8882_EXTCL_PIN, true,TABLES.U8882_EXTCL);
Description
Makes/unmakes a certain field disabled for the user.
Return Function
n/a
Parameters
Name | Description | Type |
field | The name of the field | String |
value | To make the field required, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name. This parameter is optional and the default value is empty. | String |
Example
The following example sets the customer comments field (cl.obs) to disabled, meaning the user cannot change its value.
sdk.setDisabled(FIELDS.CL_OBS, true);
Example 2
The following example sets the field U8882_EXTCL.PIN disabled if the user does not have administrator permissions. This field belongs to entity U8882_EXTCL (customer extension entity).
if (!sdk.User.esa) {
sdk.setDisabled(FIELDS.U8882_EXTCL_PIN, true,TABLES.U8882_EXTCL);
}
Description
Makes/unmakes a certain field invisible for the user.
Return Function
n/a
Parameters
Name | Description | Type |
field | The name of the field. | String |
value | To make the field required, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name. This parameter is optional and the default value is empty. | String |
Example
The following example sets the customer comments field (cl.obs) to invisible, which means the user will not be able to see the field.
sdk.setHidden(FIELDS.CL_OBS, true);
Example 2
The following example sets the field U8882_EXTCL.PIN invisible if the user does not have administrator permissions. This field belongs to entity U8882_EXTCL (customer extension entity)
if (!sdk.User.esa) {
sdk.setHidden(FIELDS.U8882_EXTCL_PIN, true,TABLES.U8882_EXTCL);
}
Description
Makes/unmakes a certain field readonly, which means the user can only see the value of the field, and cannot change it.
Return Function
n/a
Parameters
Name | Description | Type |
field | The name of the field. | String |
value | To make the field required, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name. This parameter is optional and the default value is empty. | String |
Example
The following example sets the customer comments field (cl.obs) to readonly, which means the user will not be able to change its value.
sdk.setReadonly(FIELDS.CL_OBS, true);
Example 2
The following example sets the field U8882_EXTCL.PIN to readonly if the user does not have administrator permissions. This field belongs to entity U8882_EXTCL (customer extension entity).
if (!sdk.User.esa) {
sdk.setReadonly(FIELDS.U8882_EXTCL_PIN, true,TABLES.U8882_EXTCL);
}
Description
Makes/unmakes a certain grid field invisible for the user.
Return Function
n/a
Parameters
Name | Description | Type |
gridEntity | The name of the grid entity. | String |
field | The name of the grid fieldt. | String |
value | To make the field hidden, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name.This parameter is optional and the default value is empty. | String |
Example
The following example sets the invoice’s line reference field (fi.ref) to invisible, which means the user will not be able to see the field.
sdk.setColumnHidden(TABLES.FI, FIELDS.FI_REF, true);
Example 2
The following example sets the invoice’s line field U8882_OBRAFT_FI. COSTTYPE invisible if the user does not have administrator permissions. This field belongs to entity U8882_OBRAFT_FI (invoice fi extension entity).
sdk.setColumnHidden(TABLES.FI, FIELDS.U8882_OBRAFT_FI_COSTTYPE, !sdk.User.esa, TABLES.U8882_OBRAFT_FI);
Example 3
The following example sets the invoice’s new grid field U8882_OBRATECH.OBS invisible. This field belongs to entity U8882_OBRATEC (new invoice grid)
sdk.setColumnHidden(TABLES.U8882_OBRATECH, FIELDS.U8882_OBRATECH_OBS, true)
Description
Makes/unmakes a certain grid field readonly, which means the user can only see the value of the field, and cannot change it.
Return Function
n/a
Parameters
Name | Description | Type |
gridEntity | The name of the grid entity. | String |
field | The name of the grid fieldt. | String |
value | To make the field hidden, set the parameter to true. Otherwise, false. | Boolean |
extensionEntity | If the field is an extension entity field, this parameter must have the extension entity name.This parameter is optional and the default value is empty. | String |
Example
The following example sets the invoice’s line reference field (fi.ref) to readonly, which means the user will not be able to change its value.
sdk.setColumnReadonly(TABLES.FI, FIELDS.FI_REF, true);
Example 2
The following example sets the invoice’s line field U8882_OBRAFT_FI.COSTTYPE to readonly if the user does not have administrator permissions. This field belongs to entity U8882_OBRAFT_FI (invoice fi extension entity).
sdk.setColumnReadonly(TABLES.FI, FIELDS.U8882_OBRAFT_FI_COSTTYPE, !sdk.User.esa, TABLES.U8882_OBRAFT_FI);
Example 3
The following example sets the invoice’s new grid field U8882_OBRATECH. OBS to readonly. This field belongs to entity U8882_OBRATEC (new invoice grid)
sdk.setColumnReadonly(TABLES.U8882_OBRATECH, FIELDS.U8882_OBRATECH_OBS, true)