You are here:
InsCensusServiceStd:getFields
Use this service to retrieve field definitions and field API names for group census members and group census member plans.
Class: InsCensusServiceStd
Method: getFields
How It Works
- The service retrieves the list of
GroupCensusMember fields that are part of the fieldset passed in the input parameterfieldsetName. -
If
withPlans parameter is true, the service also retrieves the list of GroupCensusMemberPlanfields. -
The list of field definitions (field data types, field labels, field API names, and field .csv headers) is combined to form the
headers.-
If
GroupClassId is included in the retrieved list of fields, the service adds a node under the headers - GroupClassId.Name.
-
-
The list of field API names is combined to form the JSON node.
-
If
GroupClassId is included in the retrieved list of fields, the service adds a node under the fields - GroupClassId.Name.
-
Remote Options
Option |
Description |
|---|---|
|
Retrieves If the input doesn't match with existing field set, the service returns an error - "The specified field set name <fieldsetName> doesn't exist." If the user doesn't specify a value, the service uses the default field set - |
|
Retrieves If the input doesn't match with existing field set, the service returns an error - "The specified field set name <planFieldsetName> doesn't exist." If the user doesn't specify a value, the service returns all |
|
Boolean If The default value is |
Input JSON
Here's the sample input JSON:
{
"fieldsetName": "memberFields",
"withPlans": true,
"planFieldsetName": "planFields"
}Output JSON
The service returns a list of all the field API names that are part of the field set myFieldsetName in GroupCensusMember object. If withPlans parameter is true, the output also includes field API names that are part of the field set myPlanFieldsetName in GroupCensusMemberPlan object.
Headers consist of a list of field API names, field labels, field data type, and field CSV header for all the fields retrieved by the service.
The service returns an output JSON formatted as per this example:
{
"fields": [
"vlocityins__AttributeSelectedValues__c",
"AccountId",
"Gender",
"ContractGroupPlanId",
],
"headers": [
{
"fieldId": "",
"type": "StringPlusClob",
"label": "Attribute Selected Values",
"name": "vlocityins__AttributeSelectedValues__c"
},
{
"fieldId": "",
"type": "EntityId",
"label": "Account ID",
"name": "AccountId"
},
{
"fieldId": "",
"type": "DynamicEnum",
"label": "Gender",
"name": "Gender"
"options": [
{
"label": "Male",
"name": "Male"
},
{
"label": "Female",
"name": "Female"
}
],
},
{
"fieldId": "",
"type": "EntityId",
"label": "Contract Group Plan ID",
"name": "ContractGroupPlanId",
"options":[
{
"value":"a2N4P000006ygEiUAI",
"type":"Medical",
"name":"rootProd",
"childProducts": [
{
"value": "0rgDC000000000RYAQ",
"IsOptional": false,
"name": "MandatoryCoverage"
},
{
"value": "0rgDC000000000RYBQ",
"IsOptional": true,
"name": "OptionalCoverage"
}
]
},
{
"value":"a2N4P000006ygEjUAI",
"type":"Dental",
"name":"rootProd2",
"childProducts": [
{
"value": "0rgDC000000000RYCQ",
"IsOptional": false,
"name": "MandatoryCoverage"
},
{
"value": "0rgDC000000000RYDQ",
"IsOptional": true,
"name": "OptionalCoverage"
}
]
}
]
}
]
}

