Updating a property on a vote with a server side method.
I am trying to update a property after a user votes on the item in the workflow.
I have this as a Post Method on the workflow server side C#. The variables seem correct, but the property is not updating.
What am I missing? Thank you for your help!
Innovator inn = this.getInnovator();
Item controlledItem = this.apply("GetControlledItem");
if (controlledItem.isError()) {
return inn.newError("smc_TechInquiry_Notifications: Retrive Workflow: Unexpected error: " + controlledItem.getErrorString());
}
// get the message from requestor and reply to requestor
string messagefrom = controlledItem.getProperty("_message_from_requestor", "");
string replyTo = controlledItem.getProperty("_reply_to_requestor", "");
string history = controlledItem.getProperty("_conversation_history","");
string newconvo = history + " " + messagefrom + " " + replyTo;
controlledItem.setProperty("_conversation_history",newconvo);
return this;
Sincerely,
Conner Davis
Have you saved the changes to the controlItem object after setting the property value? According to the documentation stackoverflow.com/.../updating-an-object-property-in-c-passing-the-property-as-a-parameter of the Innovator class, you need to call the updateItem method to save changes to the database.