03-31-2011 04:08 AM
I'm a beginner at this but here we go.
I am trying to update an ACT field (Stage) using the ACT Framework in C#.NET.
Here is the code:
MutableEntityFieldDescriptor oppStage = framework.Opportunities.GetFieldDescriptor(OpportunityHelper.FindOpportunityFieldByDisplayName(ref framework,"Stage"),true);
oppStage.SetValue(opp, "Reseller Engaged");
at this point I get the exception - "Value cannot be null.\r\nParameter name: format"
Can anyone help?
03-31-2011 08:27 AM
Since stage is a public property of an opportunity, we don't need to get the field descriptor for it to set the value, this is how I did it:
Opportunity o = ActApp.ApplicationState.CurrentOpportunity;
StageManager sMgr = new StageManager(ActApp.ActFramework);
Stage stages = sMgr.GetStages("Initial Communication");
o.Stage = stages;