"Item is branched" triggers, which use the imBranchArgsBean, should have access to the ID of the newly created branch.
Possibly related: Branching & Create from Template actions detectable by event triggers
I have just crossed that problem because I wanted a relationship field linking the branched item from the original one.
It is possible to get something like that by simply calling a post-trigger in branched (there you can get with the branchResultBean the IDs of the original and branched one)
if (branchResultBean != null)
branchingIssueID = branchResultBean.getBranchingIssue();
resultingIssueID = branchResultBean.getResultingIssue();
Then if you need to do something with one of them you can directly make a JAVA call and modify those items (example below)
var apiSession = eb.createAPISessionBean();
var commandRunner = apiSession.createAPICommandRunnerBean();
commandRunner.addOption("field", "MY_RELATIONSHIP_FIELD_NAME" + "=" + branchingIssueID);
var result = commandRunner.execute();
Packages.com.mks.api.util.ResponseUtil.printResponse(result, 1, java.lang.System.out,true);
So this does but it can have some performances issues if the document is really big and the server is slow.
I hope it helped.
Mr. Lionel Réveillère
PTC ALM Consultant
Hi Cody Carey ,
Does the solution provided by Lionel help?
Can you confirm that you are interested to get the value of resultingIssueID from imBranchArgsBean?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.