cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

URL Link Attachment (Workflow Expression)

dwilliams
12-Amethyst

URL Link Attachment (Workflow Expression)

I would like to add a URL Link Attachment to a document using a workflow expression. Does anyone have some examples or direction I could use to accomplish this?

[URL Link Attachment.png]

Thanks for your expertise,
Dax
2 REPLIES 2

Dax,

I just got this working on a test server from a stand alone workflow.

You may want to use a try/catch block if there is the possibility that the
workflow will not have modify access to the primary business object when
this runs.

This sets any URL you want as a secondary attachment to a WTDocument that
is the primary business object in a workflow.

Al Anderson

// Check out the object
wt.folder.Folder checkedOutFolder =
wt.vc.wip.WorkInProgressHelper.service.getCheckoutFolder();
wt.vc.wip.CheckoutLink checkedoutLink =
wt.vc.wip.WorkInProgressHelper.service.checkout((wt.vc.wip.Workable)primaryBusinessObject,
checkedOutFolder ,"Checkout");
wt.content.ContentHolder holder =
(wt.content.ContentHolder)checkedoutLink.getWorkingCopy();

// Create, set, and save the urlData object.
wt.content.URLData urlData = wt.content.URLData.newURLData(holder);
urlData.setUrlLocation("
urlData.setDisplayName("Yahoo");
urlData.setDescription("This is a llink to yahoo.com.");
urlData =
wt.content.ContentServerHelper.service.updateContent(holder,urlData);
urlData =
(wt.content.URLData)wt.fc.PersistenceHelper.manager.save(urlData);

// check in the objecgt
primaryBusinessObject =
(wt.fc.WTObject)wt.vc.wip.WorkInProgressHelper.service.checkin((wt.vc.wip.Workable)holder,"Checkin");








Dax Williams <->
12/09/2010 11:34 AM
Please respond to
Dax Williams <->


To
"-" <->
cc

Subject
[solutions] - URL Link Attachment (Workflow Expression)




Caterpillar: Confidential Green Retain Until: 01/08/2011



I would like to add a URL Link Attachment to a document using a workflow
expression. Does anyone have some examples or direction I could use to
accomplish this?


Thanks for your expertise,
Dax

Attachment Links: image001.png (82 k) Site Links: View post online View
mailing list online Send new post via email Unsubscribe from this
mailing list Manage your subscription Use of this email content is
governed by the terms of service at:

Al,
Thank you! This works flawlessly. I appreciate your help.
Announcements
Top Tags