on ‎2020 Sep 01 10:06 AM
Hi all,
I want to create an UDF in FSM and make this field available in API.
I created it in Admin > Company > Custom Object > Custom Field Definitions.
See example screenshot:

However, I don't know whats wrong configured, but I dont see the UDF I created in the Activity table.
If I have a look at our Activity table I see that one UDF is visible, but I don't know why... I don't see the difference between those two.
Or do I have to assign something else after the creation of the UDF in FSM, in order to see the UDF in the activity table? (I dont see something like this described in the documentation https://docs.coresystems.net/admin/custom-objects.html)

Thanks and regards,
Deborah
Request clarification before answering.
Hi Deborah,
Probably it's a bit late and you've already figured out how to achieve the requirement.
But for anyone who will look for the same in the future.
UDF (user-defined field) is not a part of the object as such. It doesn't extend the object structure. It's more like a key-value pair. Which consists of "meta" and "value".
In Query API (or in Data API) your UDF will be visible only if there is any value assigned to it.
You can maintain the value, for example, via UI (if you include the UDF into the corresponding screen(s)) or via Business Rule or via API.
Usually, to make it easier to work with UDF via API it's better to assign "External ID" to this UDF in the "Custom Field Definition". I personally use the same as the name. So in your case, it would be eloUpdated_FSM. Otherwise, you would need to use its ID (which is that 32 characters GUID) to address it in API.
Then the call to Data API to maintain the UDF eloUpdated_FSM in the existing Activity object would look like the following:
> PATCH /api/data/v4/Activity/<YouActivtyID>?dtos=Activity.37&useExternalIds=true&forceUpdate=true
{
"udfValues": [
{
"meta": {
"externalId": "eloUpdated_FSM"
},
"value": "true"
}
]
} "udfValues" is an array. So you can pass as many UDFs as you need to maintain. After successfully maintaining it, you'll see values in Query API.
Hoping this will help either you or somebody else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I figured it out, that it is just visible if the UDF has an value. Unfortunately, in the iOS app the UDF is just visible if there is an value. So you cannot maintain the value there. Just via API or the workforce manager... The default value for the UDF via field definition in SAP ERP ECC or in the screen configuration does not work either unfortunately in our system (dont know if something is wrongly configured) ...
I don't know about the iOS app, but in the Android app if the fields don't have any value, they are not visible. But only in "display mode". When you switch to edit mode, the field will be there for you to enter the value.
Default value or default value expression only work when you're creating the object. For me, defaulting a boolean UDF in screen configuration works pretty well. Just remember that if it's a mobile screen you're configuring then in expressions you need to refer a UDF as ${udfMeta.<udfName}. For example, ${udfMeta.eloUpdated_FSM}. And for desktop screen (e.g. workforce-management), you need to adress the same field as ${<entity>.udfMeta.<udfName>}. For example, ${activity.udfMeta.eloUpdated_FSM}
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.