Website Upgrade Incoming - we're working on a new look (and speed!) standby while we deliver the project

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Error using RA to add an activity to a member proj

2 replies [Last post]
Brian Mair
User offline. Last seen 19 years 30 weeks ago. Offline
Joined: 12 May 2005
Posts: 4
Groups: None
Hi All. Any RA experts out there? In the following code block, I succesfully add an activity to a project group, but adding to a member project fails with message:
Run Time Error ’50081"
Unknown error reported by P3 engine

’ THE CODE:
Dim session As Object, proj As Object, act As Object
Dim bRet As Boolean
Set session = CreateObject("p3session")
bRet = session.Login("MYUSER", "MYPASS", True)

’ THE FOLOWING WORKS TO CREATE A NEW ACTIVITY IN THE GROUP PROJECT
Set proj = session.OpenProject("APEX", 99)
Set act = proj.Activities.NewItem()
act.ActivityID = "X1"
act.Description = "xxxx"
act.OriginalDuration = 5
bRet = proj.Activities.Add(act)
session.CloseProject proj

’ THE FOLLOWING FAILS TO CREATE AN ACTIVITY IN THE MEMBER PROJECT
Set proj = session.OpenProject("APEX", "AUTO", 99)
Set act = proj.Activities.NewItem()
act.ActivityID = "X2"
act.Description = "xxxx"
act.OriginalDuration = 5
bRet = proj.Activities.Add(act) ’<<< THIS LINE FAILS
session.CloseProject proj

Replies

Brian Mair
User offline. Last seen 19 years 30 weeks ago. Offline
Joined: 12 May 2005
Posts: 4
Groups: None
Of course, that was exactly it. Thanks Frank for the prompt and clear response. - Brian
Frank Borcherdt
User offline. Last seen 8 years 10 weeks ago. Offline
Joined: 3 May 2001
Posts: 88
Groups: None
If you are using the APEX Project group that ships with P3 the ActivityID must have a two character prefix of AS when you add to the AUTO Project. Try using ASX2 as your ActivityID.

HTH