Custom fields can be set on Message Types using the Aurora UI, or via either one of the create mutations or update mutations, which are listed in the sections below:
Message Create Aurora UI
The Message Editor Form will display any custom fields that have been configured to be createable via the UI:
To configure a field so that it will show up on the Message Editor Form when a new Message is created, the field must be configured in the following way:
- The createable field must be set to either YES or REQUIRED.
- The access > write field must be set to either PUBLIC or PRIVATE (if you only want the user to be able to set it, then set to PRIVATE. If you want anyone to be able to set it, set to PUBLIC).
- The standard configuration for user profiles fields that anyone should be able to see is PUBLIC for (anyone can see the field) read and PRIVATE for write (only the user can change the field).
- The valueDefinition > valueType field must be either BOOLEAN, DATETIME, FLOAT, INT, LONG, or STRING (LIST_FLOAT, LIST_INT, or LIST_STRING are not supported currently for setting via the UI).
- The valueDefinition > createEntityFormField must be set to a valid form control.
- The field name must be added to the
customFieldNames
field in the .entity.json file for the EntityType of the Message you are creating. For example, if you are creating a new Forum Topic, then the field name would need to be added to thecustomFieldNames
field in the forum_topic.entity.json file.
Message Create Mutations
The following Create Mutations support including custom fields.
createForumTopic
The createForumTopic
mutation creates a forum topic. In our example, we will create a forum topic with custom fields.
{
"createInput": {
"board": {
"id": "board:ForumBoard-7"
},
"subject": "Forum Topic -7 post with some custom fields",
"customFields": [
{
"name": "v2testString",
"value": "New testString value66"
},
{
"name": "v2testInt",
"value": "190"
},
{
"name": "v2testIntList",
"value": "1,2,3,4,5,6,7,866"
},
{
"name": "v2testFloat",
"value": "2.566"
},
{
"name": "v2testFloatList",
"value": "0.5,1.0,1.5,2.0,2.5,3.066"
},
{
"name": "v2testLong",
"value": "2695137"
},
{
"name": "streamingService",
"value": "Streaming Service new value"
},
{
"name": "lastWatchDate",
"value": null
}
]
}
}
createBlogArticle
The createBlogArticle
mutation creates a blog article. In our example, we will create a blog article with custom fields.
{
"createInput": {
"board": {
"id": "board:blog-102"
},
"subject": "Testing a GQL message post with some custom fields",
"customFields": [
{
"name": "v2testString",
"value": "New testString value66"
},
{
"name": "v2testInt",
"value": "190"
},
{
"name": "v2testIntList",
"value": "1,2,3,4,5,6,7,866"
},
{
"name": "v2testFloat",
"value": "2.566"
},
{
"name": "v2testFloatList",
"value": "0.5,1.0,1.5,2.0,2.5,3.066"
},
{
"name": "v2testLong",
"value": "2695137"
},
{
"name": "streamingService",
"value": "Streaming Service new value"
},
{
"name": "lastWatchDate",
"value": null
}
]
}
}
createTkbArticle
The createTKbArticle
mutation creates a new TKB article. In our example, we will create a new TKB article with custom fields.
{
"createInput": {
"board": {
"id": "board:tkb-110"
},
"subject": "Testing a GQL TKB Article post with some custom fields",
"customFields": [
{
"name": "v2testString",
"value": "New testString value66"
},
{
"name": "v2testInt",
"value": "190"
},
{
"name": "v2testIntList",
"value": "1,2,3,4,5,6,7,866"
},
{
"name": "v2testFloat",
"value": "2.566"
},
{
"name": "v2testFloatList",
"value": "0.5,1.0,1.5,2.0,2.5,3.066"
},
{
"name": "v2testLong",
"value": "2695137"
},
{
"name": "streamingService",
"value": "Streaming Service new value"
},
{
"name": "lastWatchDate",
"value": null
}
]
}
}
createForumReply
You can create a new Forum Reply using the createForumReply
mutation. In our example below, we will do this using custom fields.
{
"createInput": {
"parentId": "message:144487",
"body": "<p>forum topic reply</p>",
"subject": "Re: Test Forum",
"attachments": {
"items": []
},
"customFields": [
{
"name": "v2testString",
"value": "New testString value66"
},
{
"name": "v2testInt",
"value": "190"
},
{
"name": "v2testIntList",
"value": "1,2,3,4,5,6,7,866"
},
{
"name": "v2testFloat",
"value": "2.566"
},
{
"name": "v2testFloatList",
"value": "0.5,1.0,1.5,2.0,2.5,3.066"
},
{
"name": "v2testLong",
"value": "2695137"
},
{
"name": "streamingService",
"value": "Streaming Service new value"
},
{
"name": "lastWatchDate",
"value": null
}
]
}
}
createBlogArticleComment
In this example, we will create a Blog Article Comment using custom fields with a createBlogArticleComment
mutation.
{
"id": "message:144689",
"createInput": {
"parentId": "message:144689",
"body": "<p>Reply</p>",
"subject": "Re: Custom Fields Blog",
"attachments": {
"items": []
},
"customFields": [
{
"name": "v2testString",
"value": "New testString value updates"
},
{
"name": "v2testInt",
"value": "190"
},
{
"name": "v2testIntList",
"value": "1,2,3,4,5,6,7,866"
},
{
"name": "v2testFloat",
"value": "2.566"
},
{
"name": "v2testFloatList",
"value": "0.5,1.0,1.5,2.0,2.5,3.066"
},
{
"name": "v2testLong",
"value": "2695137"
},
{
"name": "streamingService",
"value": "Streaming Service new value updated"
},
{
"name": "lastWatchDate",
"value": "2011-12-03T10:15:30+01:00"
}
]
}
}
createIdeaComment
In this example, we will create a new Idea comment using the createIdeaComment
mutation.
{
"id": "message:9163",
"createInput": {
"parentId": "message:9163",
"body": "<p>Comment-1</p>",
"subject": "Re: New Custom Fields Idea",
"attachments": {
"items": []
},
"customFields": [
{
"name": "testString",
"value": "test string"
},
{
"name": "testAnalyzedString",
"value": "test analyzed string"
},
{
"name": "testStringList",
"value": "test,string,list"
},
{
"name": "testInt",
"value": 123
},
{
"name": "testIntList",
"value": "1,2,3,4,5"
},
{
"name": "testFloat",
"value": 12.6
},
{
"name": "testFloatList",
"value": "1.0,2.0,3.0"
},
{
"name": "testLong",
"value": 1234
}
]
}
}
createOccasionReply
In this example, we will create a new Occasion Reply using the createOccasionReply
mutation.
{
"id": "message:4082",
"createInput": {
"parentId": "message:4082",
"body": "<p>Occasion Comment</p>",
"subject": "Re: Custom Fields Occasion",
"attachments": {
"items": []
},
"customFields": [
{
"name": "testString",
"value": "test string"
},
{
"name": "testAnalyzedString",
"value": "test analyzed string"
},
{
"name": "testStringList",
"value": "test,string,list"
},
{
"name": "testInt",
"value": 123
},
{
"name": "testIntList",
"value": "1,2,3,4,5"
},
{
"name": "testFloat",
"value": 12.6
},
{
"name": "testFloatList",
"value": "1.0,2.0,3.0"
},
{
"name": "testLong",
"value": 1234
}
]
}
}
createTkbArticleComment
In this example, we will create a new TKB Article Comment using the createTkbArticleComment
mutation.
{
"id":
ATLAS
Comments