Uploaded image for project: 'Development'
  1. Development
  2. DEV-7566

Allow setting of custom fields in REST API to work if the Setting Name instead of Setting ID is provided

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Backlog
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 07.02.02.00
    • Component/s: REST API
    • Labels:
      None

      Description

      For example, when setting a Sales Order Line custom field, it would be nice if we could just provide the following DTO on /SalesOrders/{InvoiceID} POST or PATCH operations:

      { "Lines": 
         [{ "InvoiceLineID": "18911c09e80c4ea2a2e9""CustomFieldValues": 
             [ {"SettingName": "Special Handling Instructions", "Contents": "Don't drop it."} ]
          ]}
      }

      Instead, we currently must provide the SettingID:

      { "Lines": 
       [{ "InvoiceLineID": "18911c09e80c4ea2a2e9""CustomFieldValues": 
         [ {"SettingID":"1ae102b94dc54dfc8a45", "SettingName": "Special Handling Instructions", "Contents": "Don't drop it."} ]
       }]
      }

      Note - we'd need to throw an exception if the setting is ambiguous by SettingName alone - but 99% of the time customers won't have custom fields with the same name.

      Also, we should not just do this in sales orders - we should be consistent and do this everywhere that implements IJiwaDTODeserialisable and has custom fields.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mikes@jiwa.com.au Mike Sheen
                Reporter:
                mikes@jiwa.com.au Mike Sheen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: