Skip to content

Error using RA to add an activity to a member proj

Brian MairMember for 21 years 5 months
Created
2
1
0
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

2 replies

Oldest first
  1. 0
    Frank Borcherdt ·
    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
  2. 0
    Brian Mair ·
    Of course, that was exactly it. Thanks Frank for the prompt and clear response. - Brian

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?