Class NSUserDefinedFieldInfoAgent
Returns information about user-defined fields, like field type, field size, field label text, default value. Does not return the actual values in the user-defined fields. The values are returned on the entity objects.
Syntax
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
Constructors
NSUserDefinedFieldInfoAgent()
Returns information about user-defined fields, like field type, field size, field label text, default value. Does not return the actual values in the user-defined fields. The values are returned on the entity objects.
Declaration
NSUserDefinedFieldInfoAgent
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
Methods
ChangeFieldType(NSUserDefinedFieldInfo,Integer,Bool)
Creates a UserDefinedFieldInfo based on a owner-entity ID
Declaration
NSUserDefinedFieldInfo ChangeFieldType(NSUserDefinedFieldInfo info, Integer fieldType, Bool isIndexed)
Parameters
Type | Name | Description |
---|---|---|
NSUserDefinedFieldInfo | info | |
Integer | fieldType | See UDefFieldType |
Bool | isIndexed | true if yes; false if no. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Examples
NSUserDefinedFieldInfoAgent agent;
NSUserDefinedFieldInfo info;
Integer fieldType;
Bool isIndexed;
NSUserDefinedFieldInfo res = agent.ChangeFieldType(info, fieldType, isIndexed);
CreateDefaultUserDefinedFieldInfo()
Sets default values into a new NSUserDefinedFieldInfo.
Declaration
NSUserDefinedFieldInfo CreateDefaultUserDefinedFieldInfo()
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Remarks
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Examples
NSUserDefinedFieldInfoAgent agent;
NSUserDefinedFieldInfo thing = agent.CreateDefaultUserDefinedFieldInfo();
thing = agent.SaveUserDefinedFieldInfo(thing);
CreateUserDefinedFieldInfo(Integer,Integer)
Creates a UserDefinedFieldInfo based on a owner-entity ID
Declaration
NSUserDefinedFieldInfo CreateUserDefinedFieldInfo(Integer ownerType, Integer fieldType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer | fieldType | See UDefFieldType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Integer fieldType;
NSUserDefinedFieldInfo res = agent.CreateUserDefinedFieldInfo(ownerType, fieldType);
DeleteUserDefinedFieldInfo(Integer)
Deletes the NSUserDefinedFieldInfo
Declaration
DeleteUserDefinedFieldInfo(Integer userDefinedFieldInfo)
Parameters
Type | Name | Description |
---|---|---|
Integer | userDefinedFieldInfo |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.DeleteUserDefinedFieldInfo(123);
DetectColumnIdChanges(Integer)
Detects columnid changes to the admin version (for determining publish warning)
Declaration
Bool DetectColumnIdChanges(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
Bool |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Bool res = agent.DetectColumnIdChanges(ownerType);
DetectUnpublishedChanges(Integer)
Detects changes to the admin version (unpublished)
Declaration
Bool DetectUnpublishedChanges(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
Bool |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Bool res = agent.DetectUnpublishedChanges(ownerType);
FigureOutListIdFromListTableIdAndUDListDefinitionId(NSUserDefinedFieldInfo)
Kind of the reverse of SetListTableIdAndUDListDefinitionIdFromSelectedListId
Declaration
Integer FigureOutListIdFromListTableIdAndUDListDefinitionId(NSUserDefinedFieldInfo info)
Parameters
Type | Name | Description |
---|---|---|
NSUserDefinedFieldInfo | info |
Returns
Type | Description |
---|---|
Integer |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
GetChangedPageOneFields(Integer,Integer)
Gets which page-one fields have changed from the current version
Declaration
Bool[] GetChangedPageOneFields(Integer ownerType, Integer userGroupId)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer | userGroupId |
Returns
Type | Description |
---|---|
Bool[] |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
GetCustomFieldInfo(String,String)
Returns information about a particular custom field (user-defined + extra) on a particular table
Declaration
NSFieldInfoBase GetCustomFieldInfo(String tableName, String fieldName)
Parameters
Type | Name | Description |
---|---|---|
String | tableName | |
String | fieldName |
Returns
Type | Description |
---|---|
NSFieldInfoBase |
Examples
NSUserDefinedFieldInfoAgent agent;
String tableName;
String fieldName;
NSFieldInfoBase res = agent.GetCustomFieldInfo(tableName, fieldName);
GetCustomFieldInfoList(String,Bool)
Returns information about all the custom fields (user-defined + extra) on a particular table
Declaration
NSFieldInfoBase[] GetCustomFieldInfoList(String tableName, Bool includeStandard)
Parameters
Type | Name | Description |
---|---|---|
String | tableName | |
Bool | includeStandard |
Returns
Type | Description |
---|---|
NSFieldInfoBase[] |
Examples
NSUserDefinedFieldInfoAgent agent;
String tableName;
Bool includeStandard;
NSFieldInfoBase[] res = agent.GetCustomFieldInfoList(tableName, includeStandard);
GetPublishedUserDefinedFieldFromFieldLabel(String,Integer)
Returns information about the given user defined field identified by the owner and the field label.
Declaration
NSUserDefinedFieldInfo GetPublishedUserDefinedFieldFromFieldLabel(String fieldLabel, Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
String | fieldLabel | |
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Remarks
Field labels are fuzzy. Leading and trailing spaces and punctuation are ignored.
Examples
NSUserDefinedFieldInfoAgent agent;
String fieldLabel;
Integer ownerType;
NSUserDefinedFieldInfo res = agent.GetPublishedUserDefinedFieldFromFieldLabel(fieldLabel, ownerType);
GetPublishedUserDefinedFieldFromProgId(String,Integer)
Return information about the given user defined field identified by the owner and the prog-id.
Declaration
NSUserDefinedFieldInfo GetPublishedUserDefinedFieldFromProgId(String progId, Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
String | progId | |
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Remarks
The prog-id is used as the key in the entity carriers.
Examples
NSUserDefinedFieldInfoAgent agent;
String progId;
Integer ownerType;
NSUserDefinedFieldInfo res = agent.GetPublishedUserDefinedFieldFromProgId(progId, ownerType);
GetPublishedUserDefinedFieldList(Integer)
Return information about all the user defined fields on a particular owner type (project, contact, person, etc).
Declaration
NSUserDefinedFieldInfo[] GetPublishedUserDefinedFieldList(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
NSUserDefinedFieldInfo[] res = agent.GetPublishedUserDefinedFieldList(ownerType);
GetPublishedUserDefinedPageOneFields(Integer,Integer)
Gets a list of page one fields for given Udef type and current user group
Declaration
NSUserDefinedFieldInfo[] GetPublishedUserDefinedPageOneFields(Integer ownerType, Integer userGroupId)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer | userGroupId |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Integer userGroupId;
NSUserDefinedFieldInfo[] res = agent.GetPublishedUserDefinedPageOneFields(ownerType, userGroupId);
GetUserDefinedFieldFromFieldLabel(String,Integer)
Return information about the given user defined field identified by the owner and the field label.
Declaration
NSUserDefinedFieldInfo GetUserDefinedFieldFromFieldLabel(String fieldLabel, Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
String | fieldLabel | |
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Remarks
Field labels are fuzzy. Leading and trailing spaces and punctuation are ignored.
This may be different than the currently published fields.Examples
NSUserDefinedFieldInfoAgent agent;
String fieldLabel;
Integer ownerType;
NSUserDefinedFieldInfo res = agent.GetUserDefinedFieldFromFieldLabel(fieldLabel, ownerType);
GetUserDefinedFieldFromIds(Integer[])
Returns an given array of user defined field identified by the IDs.
Declaration
NSUserDefinedFieldInfo[] GetUserDefinedFieldFromIds(Integer[] ids)
Parameters
Type | Name | Description |
---|---|---|
Integer[] | ids |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer[] ids;
NSUserDefinedFieldInfo[] res = agent.GetUserDefinedFieldFromIds(ids);
GetUserDefinedFieldFromProgId(String,Integer)
Returns information about the given user defined field identified by the owner and the prog-id.
Declaration
NSUserDefinedFieldInfo GetUserDefinedFieldFromProgId(String progId, Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
String | progId | |
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Remarks
The prog-id is used as the key in the entity carriers. Note this may be different than the currently published fields.
Examples
NSUserDefinedFieldInfoAgent agent;
String progId;
Integer ownerType;
NSUserDefinedFieldInfo res = agent.GetUserDefinedFieldFromProgId(progId, ownerType);
GetUserDefinedFieldFromProgIds(String[],Integer)
Return an given array user defined field identified by the owner and the prog-ids.
Declaration
NSUserDefinedFieldInfo[] GetUserDefinedFieldFromProgIds(String[] progIds, Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
String[] | progIds | |
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Remarks
The prog-id is used as the key in the entity carriers. Note this may be different than the currently published field layout.
Examples
NSUserDefinedFieldInfoAgent agent;
String[] progIds;
Integer ownerType;
NSUserDefinedFieldInfo[] res = agent.GetUserDefinedFieldFromProgIds(progIds, ownerType);
GetUserDefinedFieldInfo(Integer)
Gets an NSUserDefinedFieldInfo object.
Declaration
NSUserDefinedFieldInfo GetUserDefinedFieldInfo(Integer userDefinedFieldInfoId)
Parameters
Type | Name | Description |
---|---|---|
Integer | userDefinedFieldInfoId |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Examples
NSUserDefinedFieldInfoAgent agent;
NSUserDefinedFieldInfo thing = agent.GetUserDefinedFieldInfo(123);
GetUserDefinedFieldList(Integer)
Return information about all the user defined fields on a particular owner type (project, contact, person, etc).
Declaration
NSUserDefinedFieldInfo[] GetUserDefinedFieldList(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Remarks
Note this may be different than the currently published fields.
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
NSUserDefinedFieldInfo[] res = agent.GetUserDefinedFieldList(ownerType);
GetUserDefinedPageOneFields(Integer,Integer)
Gets a list of page one fields for given Udef type and current user group
Declaration
NSUserDefinedFieldInfo[] GetUserDefinedPageOneFields(Integer ownerType, Integer userGroupId)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer | userGroupId |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo[] |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Integer userGroupId;
NSUserDefinedFieldInfo[] res = agent.GetUserDefinedPageOneFields(ownerType, userGroupId);
IsAnyPublishEventActive()
Checks if any publish events are active
Declaration
Bool IsAnyPublishEventActive()
Returns
Type | Description |
---|---|
Bool |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
IsPublishEventActive(Integer)
Checks if the publish event is active for the given type.
Declaration
Bool IsPublishEventActive(Integer type)
Parameters
Type | Name | Description |
---|---|---|
Integer | type | See UDefType. |
Returns
Type | Description |
---|---|
Bool |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
Publish(Integer)
Publish changed Udef fields for the given owner type
Declaration
Integer Publish(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
Integer |
Examples
NSUserDefinedFieldInfoAgent agent;
Integer ownerType;
Integer res = agent.Publish(ownerType);
Revert(Integer)
Revert changed Udef fields for the given owner type. All unpublished changes will be lost
Declaration
Void Revert(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SaveUserDefinedFieldInfo(NSUserDefinedFieldInfo)
Updates the existing NSUserDefinedFieldInfo or creates a new NSUserDefinedFieldInfo if the id parameter is 0
Declaration
NSUserDefinedFieldInfo SaveUserDefinedFieldInfo(NSUserDefinedFieldInfo userDefinedFieldInfo)
Parameters
Type | Name | Description |
---|---|---|
NSUserDefinedFieldInfo | userDefinedFieldInfo | The NSUserDefinedFieldInfo to save. |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Examples
NSUserDefinedFieldInfo agent;
NSUserDefinedFieldInfo thing = agent.CreateDefaultUserDefinedFieldInfo();
thing = agent.SaveUserDefinedFieldInfo(thing);
SaveUserDefinedFieldInfos(NSUserDefinedFieldInfo[])
Saves an array of user defined fields. This will update the unpublished layout.
Declaration
Void SaveUserDefinedFieldInfos(NSUserDefinedFieldInfo[] infos)
Parameters
Type | Name | Description |
---|---|---|
NSUserDefinedFieldInfo[] | infos |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SetListTableIdAndUDListDefinitionIdFromSelectedListId(NSUserDefinedFieldInfo,Integer)
Makes stuff similar to what happens in the win client
Declaration
NSUserDefinedFieldInfo SetListTableIdAndUDListDefinitionIdFromSelectedListId(NSUserDefinedFieldInfo info, Integer selectedListId)
Parameters
Type | Name | Description |
---|---|---|
NSUserDefinedFieldInfo | info | |
Integer | selectedListId |
Returns
Type | Description |
---|---|
NSUserDefinedFieldInfo |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SetPageOneFieldGrouping(Integer,Bool)
Sets the Page One Field grouping for a specific entity
Declaration
Void SetPageOneFieldGrouping(Integer ownerType, Bool active)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Bool | active |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SetPublishStartSystemEvent(Integer)
Sets the start flag for udef publishing. Must be called before PUBLISH, or PUBLISH will fail.
Declaration
Void SetPublishStartSystemEvent(Integer ownerType)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType. |
Returns
Type | Description |
---|---|
Void |
Remarks
Start flag is removed when publish process completes.
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SetRankOnFields(Integer,Integer[])
Changes rank of user defined fields
Declaration
Void SetRankOnFields(Integer ownerType, Integer[] rankedFieldsIds)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer[] | rankedFieldsIds |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);
SetUserDefinedPageOneField(Integer,Integer,Integer,Integer)
Sets a user defined field as page one field.
Declaration
Void SetUserDefinedPageOneField(Integer ownerType, Integer udefFieldId, Integer userGroupId, Integer fieldLineNo)
Parameters
Type | Name | Description |
---|---|---|
Integer | ownerType | See UDefType |
Integer | udefFieldId | |
Integer | userGroupId | |
Integer | fieldLineNo |
Returns
Type | Description |
---|---|
Void |
Examples
NSUserDefinedFieldInfoAgent agent;
agent.callMethod(arg1, arg2);