Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-49460

Can't send empty fields to DDLRecordService.addRecord from remote service

    Details

      Description

      When you're calling DDLRecordService.addRecord using its remote service and you include a field with empty string as value, we get following exception:

      { 
        "exception": "Missing value at character 94"
      }
      

      The request sent is (field "Text_Box3125" is the cause of the error)

      POST http://localhost:8080/api/jsonws/invoke
      
      [{"/ddlrecord/add-record": {
        "+serviceContext": "com.liferay.portal.service.ServiceContext",
              "displayIndex": "0",
              "fieldsMap":         {
                  "6_1_": false,
                  "Description": "Add your description here...",
                  "Enterprise_Edition": false,
                  "Text_Box3125": "",
                  "Title": "34543534534"
              },
              "groupId": "10181",
              "recordSetId": "13006",
              "serviceContext.scopeGroupId": "10181",
              "serviceContext.userId": "10198"
          }
      }]

      Also, if you send in the same field "." instead of "", you get a weird error

      {
        "exception": "For input string: \".\""
      }

        Attachments

          Activity

            People

            Assignee:
            jorge.ferrer Jorge Ferrer
            Reporter:
            jose.navarro José Manuel Navarro (Inactive)
            Participants of an Issue:
            Recent user:
            Eduardo Zoby
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              2 years, 44 weeks, 1 day ago

                Packages

                Version Package