-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExample for use
More file actions
25 lines (21 loc) · 751 Bytes
/
Example for use
File metadata and controls
25 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
This example for using BS on BC:
declaration section:
var _FieldsCaption:PropertySet; //PropertySet global for this BC. Use for data caching.
function GetFieldCaption(FieldName)
{
// return caption of specified field
if (_FieldsCaption == null)
{
_FieldsCaption = TheApplication().NewPropertySet();
TheApplication().GetService("VIF Fields Caption BS").GetFieldsCaption(
TheApplication().ActiveViewName(),
this.Name(),
_FieldsCaption)
}
return _FieldsCaption.GetProperty(FieldName);
}
function BusComp_PreWriteRecord()
{
if (this.GetFieldValue("PhoneNumber") == "")
TheApplication().RaiseErrorText("Field " + GetFieldCaption("PhoneNumber") + " is mandatory")
}