3

i am trying to update workflow alert email template using tooling api. REST AND PATCH . JSON body is below

{"Metadata":{"ccEmails":["test@gmail.com"],
                        "description":"sendMassEmailsThroufhWorkFlow",
                        "protected":"false",
                        "senderType":"CurrentUser",
                        "template":"folderNAMES1/SingleEmailMassTemplate"
}}

i am getting below error

[{"message":"Cannot deserialize instance of complexvalue from VALUE_STRING value CurrentUser at [line:1, column:138]","errorCode":"JSON_PARSER_ERROR"}]

if we remove senderType parameter, then below error value will come

[{"message":"Required field is missing: senderType","errorCode":"FIELD_INTEGRITY_EXCEPTION","fields":[]}]

looks like when we add sender type paarmeter, parser is failing . but this is one the required parameter. is there any example for updating workflow email alert using tooling api ?

  • try doing a REST query on an existing workflow email alert with a ccEmails to verify proper construction of your JSON – cropredy Jan 9 '15 at 1:48
  • we have tried this approach earlier. We first made GET in rest API and then took same structure and tried making PATCH call. it did not work. – Jay Jan 9 '15 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.