Help Needed with ObjLinkProvider

D

dcasp3r

I'm not having much luck getting the AddLink method of ObjLinkProvider.

My goal is to automate the linking of Tasks with Issues (for Project Server
2003 Web Access)

If I understand the docs correctly -- ObjLinkProvider is what I should be
using, right?

Here's how I'm attempting to use ObjLinkProvider:

linkProv.CreateConnection(0);
linkProv.AddProjectObject(ProjectID);
obj1ID = linkProv.GetTaskObjectID(ProjectID, TaskID);
obj2ID = linkProv.GetSTSObjectID(4, ProjectID, IssueID,
"{9A35E0E2-29A8-4E05-B8F5-19A756836FFA}");
linkProv.AddLink(obj1ID, obj2ID, ProjectID);
linkProv.ClearConnection(0);

Everything *seems* to execute successfully (though unfortunately the AddLink
method has a void return type -- so I have no way of knowing if the method
was successful or not (just curious, why no return type?), so in the absence
of any exceptions being thrown, I'll assume that the call was successfull.

However, the Tasks and the Links do NOT get linked :-(

Adding to the potential confusion are the fact that there are two sets of
object IDs (the Project IDs and the SharePoint IDs) -- the documentation is
very sparse about which I should be using where -- could someone clarify
which I should be using here and how? A working example of using
ObjLinkProvider to link and Issue and a Task would be *greatly* appreciated!

Thanks,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top