Community
Showing results for 
Search instead for 
Do you mean 
Reply

Change Activity type to opened activity dialogue from lookup

New Member
Posts: 1
Country: India

Change Activity type to opened activity dialogue from lookup

 

My ACT Version is : Act! Premium (Web) Version 16.0.291.0, Hot Fix 2

 

Database is on my local machine

 

OS : WIndows server 2008 R2

 

 

           I am opening activity dialogue box from look up button, in-built given.

On that i want to change activity type, it should open with type of "To-do".

I have written below code.

But, i am getting object reference not set to instance of an object.

    Dim Guids(0) As Guid       
        Guids(0) = activity.MasterActivityId       
        Dim al As ActivityList = Me.ACTUI.ActFramework.

Activities.GetActivityInstancesByActivityId(Guids)
               
         
       
        Dim aType1 As ActivityType
        aType1 = Me.ACTFwk.Activities.GetActivityType("To-do")
       
       
        ' Set Claim name and activity type for new created activity
        For Each a As Activity In al                   
            a.Regarding = GetValue("Claim Name")
            a.Type = Me.ACTFwk.Activities.GetActivityType("To-do")       
            a.Update()           
        Next


I can update regarding field but when i write a.type field gives error.

Please guide me.

Moderator
Posts: 722
Country: USA

Re: Change Activity type to opened activity dialogue from lookup

I would recommend taking a look at http://kb.swiftpage.com/app/answers/detail/a_id/24350

Elise O'Pry
Swiftpage
Visit our knowledgebase at http://kb.act.com