Community
Showing results for 
Search instead for 
Do you mean 
Reply

Unable to set custom Opportunity text field in Act! v21.1.187 Update 2

New Member
Posts: 2
Country: USA

Unable to set custom Opportunity text field in Act! v21.1.187 Update 2

Hello,

 

We are experiencing a strange issue where custom fields on the Opportunity are not updating.  Normal fields on the Opportunity are updating with the code shown below.  We also have tested the code on ACT 2010 and everything works there also.

 

The code gets to the SetValue and runs with no exceptions being caught.

 

Any help would be greatly appreciated.

 

Ryan

 

string customFieldName = "tbl_opportunity.cust_newoppcusttextfield_115021638";
string customFieldValue = "hi there";

Act.Framework.MutableEntities.MutableEntityFieldDescriptor[] aryFieldDescriptor = framework.Opportunities.GetMutableEntityFieldDescriptors(); 
foreach (Act.Framework.MutableEntities.MutableEntityFieldDescriptor fieldDescriptor in aryFieldDescriptor) 
{ 


	if (fieldDescriptor.Name.ToLower() == customFieldName)
	{
								   

		try
		{
			fieldDescriptor.SetValue(opp1, customFieldValue);
			opp1.Update();
				
		}
		catch (Exception ex2)
		{
			Messagebox.Show(ex2.Message)'
		}

		break;
	}

}

 

 

Highlighted
Bronze Super Contributor
Posts: 1,264
Country: USA

Re: Unable to set custom Opportunity text field in Act! v21.1.187 Update 2

Did you check the field length. If I recall Act! sometimes does not throw an error in the length is to long.

 

-- Jim Durkin

New Member
Posts: 2
Country: USA

Re: Unable to set custom Opportunity text field in Act! v21.1.187 Update 2

It turned out to be a problem with our install.  We reinstalled ACT! and now the above code works.