使用Rest Api创建具有多个字段的Eloqua表单时,出现500个内部服务器错误

时间:2018-07-13 06:14:14

标签: eloqua

我需要在项目中支持Oracle Eloqua Marketing Cloud Service的形式。我正在测试其余api的表单。因此,当我使用创建端点表单创建具有单个字段的表单时,将在Eloqua CMS中创建表单。但是,当我尝试使用多个字段创建表单时,会引发500 InternalServerError。

  

端点:   REST / 2.0 / assets / form

     

请求正文:   {
     “ name”:“ ELA_Form”,      “元素”:[           {               “ type”:“ FormField”,               “ name”:“地址1”,               “ style”:“ {\” fieldSize \“:\”大\“,\” labelPosition \“:\”顶部\“}”,               “ createdFromContactFieldId”:“ 100006”,               “ dataType”:“文本”,               “ displayType”:“文字”,               “ fieldMergeId”:“ 36”,               “ htmlName”:“ address1”,               “ useGlobalSubscriptionStatus”:“ False”,               “验证”:[]           },           {               “ type”:“ FormField”,               “ name”:“地址2”,               “ style”:“ {\” fieldSize \“:\”大\“,\” labelPosition \“:\”顶部\“}”,               “ createdFromContactFieldId”:“ 100007”,               “ dataType”:“文本”,               “ displayType”:“文字”,               “ fieldMergeId”:“ 37”,               “ htmlName”:“ address2”,               “ useGlobalSubscriptionStatus”:“ False”,               “验证”:[]           }           ],     “ processingType”:“ externalEmail”   }

     

回复:   内部服务器错误   发生内部服务器错误。   已使用日志标识符121363909记录了该错误。   请将此日志标识符提供给技术支持。

我们将不胜感激!

1 个答案:

答案 0 :(得分:1)

您需要为每个字段的ID设置唯一的负整数。这是添加了示例的示例,可以成功创建表单:

POST /API/REST/2.0/assets/form
{
  "name": "ELA_Form",
  "elements": [
    {
      "type": "FormField",
      "id": "-1",
      "name": "Address 1",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100006",
      "dataType": "text",
      "displayType": "text",
      "fieldMergeId": "36",
      "htmlName": "address1",
      "useGlobalSubscriptionStatus": "False",
      "validations": [

      ]
    },
    {
      "type": "FormField",
      "id": "-2",
      "name": "Address 2",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100007",
      "dataType": "text",
      "displayType": "text",
      "fieldMergeId": "37",
      "htmlName": "address2",
      "useGlobalSubscriptionStatus": "False",
      "validations": [

      ]
    }
  ],
  "processingType": "externalEmail"
}