Community
Showing results for 
Search instead for 
Do you mean 
Reply

ActivityFieldDescriptors

Nickel Elite Contributor
Posts: 508
Country: USA

ActivityFieldDescriptors

These seem a little different that ContactFieldDescriptors.  I have gotten the field, and then the value from an activity, but am now trying to Set a new value, but I cannot figure out what the method is "wanting".  Here's what I mean:

 

Dim aField As ActivityFieldDescriptor = _

ActApp.ActFramework.Activities.GetFieldDescriptor(ActivityField.TypeId) Dim aValue As Object = aField.GetValue(activity) '<<<activity is Act.Framework.Activities.Activity MessageBox.Show("ActivityTypeID: " & aValue.ToString) aField.SetValue(activity, ?????) '<<<the set wants two Objects, and what I am trying to do

' is change the ActivityTypeID, e.g. from a "1" to a "2" activity.Update()

So, a Meeting TypeID value is 1, Call is 0, and To-Do is 2.  I'd like to change that value.  Thanks...

Richard Brust
ACT! Certified Consultant
richard@rbrDataSolutions.com
Nickel Super Contributor
Posts: 441
Country: UK

Re: ActivityFieldDescriptors

Haven't tried this with activiteis but usually for contact/company/opp fields etc you can just dome something like this....

 

activity.fields(fieldname,true) = value

activity.update

 

Tom

Nickel Elite Contributor
Posts: 508
Country: USA

Re: ActivityFieldDescriptors

Thanks, I think I did that at one time, and it does change the value for the current session (screen), but does not write back to the database.  Now, I could have done it incorrectly, so I'll try it again, but I don't remember it working...
Richard Brust
ACT! Certified Consultant
richard@rbrDataSolutions.com