cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved]Update custom fields during workflow progression.

tchenm1
Champ in-the-making
Champ in-the-making
Hi!

I created a content model type that created custom meta-data fields added to a folder detail form. I would like to update those fields during a workflow progression. Is that possible? If so, please forward me the link to the information or a sample bpmn that accomplishes a similar task.

Thanks!

Mike Tchen
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
You want to update folder-details?
you want to update the meta-data of the content associated with the workflow right?
please elaborate.

tchenm1
Champ in-the-making
Champ in-the-making
Thanks for the response. Yes, I want to update the meta-data associated to a folder based on the workflow. I did not update this thread recently, but the below is how I am accomplishing that. Feel free to give your input. Much appreciated, Mike T

var document = bpm_package.children[0];
var parentFolder = document.parentAssocs["cm:contains"][0];
var person = people.getPerson('Bautista');
parentFolder.properties["sop:sourceSubmitted"] = new Date();
parentFolder.save();
parentFolder.properties["sop:sourceSubComment"] = task.getVariable("bpm_comment");
parentFolder.save();
parentFolder.createAssociation(person, "sop:sourceSubPerson");
parentFolder.save();

mitpatoliya
Star Collaborator
Star Collaborator
So, is this script working?
You need to run this as with admin credential if you are placing it in the processdefinition file right?