Codeunit WSB Custom Fields Management
Provides functions used for setting up Custom Fields.
Properties
Methods
wgFncCheckRestoreCustomCheckboxField
Restores (if needed) the value of custom field of type Boolean
Parameters
Type |
Name |
Description |
Boolean |
vFieldValue |
The reference to the field value |
Boolean |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCheckRestoreCustomCodeField
Restores (if needed) the value of custom field of type Code20
Parameters
Type |
Name |
Description |
Code[20] |
vFieldValue |
The reference to the field value |
Code[20] |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCheckRestoreCustomDateField
Restores (if needed) the value of custom field of type Date
Parameters
Type |
Name |
Description |
Date |
vFieldValue |
The reference to the field value |
Date |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCheckRestoreCustomDecimalField
Restores (if needed) the value of custom field of type Decimal
Parameters
Type |
Name |
Description |
Decimal |
vFieldValue |
The reference to the field value |
Decimal |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCheckRestoreCustomNumberField
Restores (if needed) the value of custom field of type Integer
Parameters
Type |
Name |
Description |
Integer |
vFieldValue |
The reference to the field value |
Integer |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCheckRestoreCustomTextField
Restores (if needed) the value of custom field of type Text250
Parameters
Type |
Name |
Description |
Text[250] |
vFieldValue |
The reference to the field value |
Text[250] |
pOldValue |
Value of the field before it was changed |
Enum "WSB_CFEntity" |
pEntity |
Entity of the changed field |
Integer |
pFieldNo |
Number of custom field |
wgFncCopyCustomFieldsFromRecRefToJob
Copies custom fields from RecordRef to Job record.
Parameters
Type |
Name |
Description |
Record "Job" |
vRecJob |
Target Job record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
Copies custom fields from RecordRef to Purchase Header record.
Parameters
Type |
Name |
Description |
Record "Purchase Header" |
vRecPurchHeader |
Target Purchase Header record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
wgFncCopyCustomFieldsFromRecRefToPurchLine
Copies custom fields from RecordRef to Purchase Line record.
Parameters
Type |
Name |
Description |
Record "Purchase Line" |
vRecPurchLine |
Target Purchase Line record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
Copies custom fields from RecordRef to Sales Header record.
Parameters
Type |
Name |
Description |
Record "Sales Header" |
vRecSalesHeader |
Target Sales Header record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
wgFncCopyCustomFieldsFromRecRefToSalesLine
Copies custom fields from RecordRef to Sales Line record.
Parameters
Type |
Name |
Description |
Record "Sales Line" |
vRecSalesLine |
Target Sales Line record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
wgFncIsCopyToProductionBOMLineDefined
Checks if an entity is defined for copying to a Production BOM Line.
Parameters
Type |
Name |
Description |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
Returns
Type |
Description |
Boolean |
Specifies if copy to production bom line is defined for the entity in the pEntity parameter. |
wgFncCopyCustomFieldsFromRecRefToProductionBOMLine
Copies custom fields from RecordRef to Production BOM Line record.
Parameters
Type |
Name |
Description |
Record "Production BOM Line" |
vRecProductionBOMLine |
Target Production BOM Line record. |
Enum "WSB_CFEntity" |
pEntity |
Identifies entity where data is copied from |
RecordRef |
pFromRecRef |
Source record with the data |
Returns
Type |
Description |
Boolean |
Specifies if any fields were copied to the target record |
GetCustomFieldCaptionByExpressionCode
Returns caption of the custom field in the given language using caption expression.
Parameters
Type |
Name |
Description |
Integer |
pLanguageId |
Identifier of the language |
Text |
pCaptionExpr |
Expression with the entity and field number delimited by comma |
Text[1024] |
vCaption |
Field caption |
wgFncGetCustomFieldCaptionByFieldNo
Returns caption of the custom field in the given language using field number.
Parameters
Type |
Name |
Description |
Integer |
pLanguageId |
Identifier of the language. |
Enum "WSB_CFEntity" |
pEntity |
Entity of the field. |
Enum "WSB_CFDataType" |
pType |
Datatype of the field. |
Integer |
pFieldNum |
Field number according to Custom Field Definition |
Returns
Type |
Description |
Text[50] |
Field caption. |
GetCustomFieldNoByFieldDefinition
Returns field number of the custom field in a table.
Parameters
Type |
Name |
Description |
Record "WSB Custom Field Definition" |
pRecCustomFieldDef |
Custom Field Definition record with the specification of the custom field. |
Returns
Type |
Description |
Integer |
Field number in table. |
Determines whether custom fields were changed in contact record and if related customer or vendor should be updated.
Parameters
Type |
Name |
Description |
Record "Contact" |
vRecCont |
Modified contact record. |
Record "Contact" |
vxRecCont |
Contact record before modification. |
Returns
Type |
Description |
Boolean |
Return value of type Boolean. |
IsCustomerCustomFieldChanged
Determines whether custom fields were changed in customer record and if related contact should be updated.
Parameters
Type |
Name |
Description |
Record "Customer" |
vRecCust |
Modified customer record. |
Record "Customer" |
vxRecCust |
Customer record before modification. |
Returns
Type |
Description |
Boolean |
Return value of type Boolean. |
wgFncIsCustomFieldsDefinedForEntity
Determines whether custom fields configured for given table.
Parameters
Type |
Name |
Description |
Enum "WSB_CFEntity" |
pEntity |
Entity table. |
Returns
Type |
Description |
Boolean |
Return value of type Boolean. |
IsVendorCustomFieldChanged
Determines whether custom fields were changed in vendor record and if related contact should be updated.
Parameters
Type |
Name |
Description |
Record "Vendor" |
vRecVend |
Modified vendor record. |
Record "Vendor" |
vxRecVend |
Vendor record before modification. |
Returns
Type |
Description |
Boolean |
Return value of type Boolean. |
wgFncSetCustomFieldsVisibility
Determines if custom fields of certain datatype should be visible on a page.
Parameters
Type |
Name |
Description |
Enum "WSB_CFEntity" |
pEntity |
Entity table. |
Enum "WSB_CFDataType" |
pFieldType |
Field data type. |
Boolean |
vCustomField1Visible |
Visibility of the first custom field. |
Boolean |
vCustomField2Visible |
Visibility of second custom field. |
Boolean |
vCustomField3Visible |
Visibility of third custom field. |
Boolean |
vCustomField4Visible |
Visibility of fourth custom field. |
Boolean |
vCustomField5Visible |
Visibility of fifth custom field. |