Community
Showing results for 
Search instead for 
Do you mean 
Reply

Custom Field Value

Accepted Solution Solved
Tuned Listener
Posts: 23
Country: United Kingdom
Accepted Solution

Custom Field Value

Hi,

I am attempting to extract the value from a custom field in the opportunities table using the code below which results in an error!

 

Invalid table name: TBL_OPPORTUNITY
Parameter name: table

 

the code:

Serlevel = Me.ActApplication.ApplicationState.CurrentOpportunity.Fields("TBL_OPPORTUNITY.CUST_ServiceLevel_024741501", False)

 

Can you help with the correct code.


Accepted Solutions
Solution
Accepted by topic author JoeBo
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Custom Field Value

[ Edited ]

I believe for opportunities, Serlevel needs to be a MutableEntityFieldDescriptor and you can get the field like so:

 

MutableEntityFieldDescriptor mefd = _ActApp.ActFramework.Opportunities.GetMutableEntityFieldDescriptor(StandardOpportunityField.User3);

 

Here I got a standard opportunity field but it's similar to how you'd get a custom field, also it appears you're using the real name for the field so the second parameter would be true.

Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Solution
Accepted by topic author JoeBo
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Custom Field Value

[ Edited ]

I believe for opportunities, Serlevel needs to be a MutableEntityFieldDescriptor and you can get the field like so:

 

MutableEntityFieldDescriptor mefd = _ActApp.ActFramework.Opportunities.GetMutableEntityFieldDescriptor(StandardOpportunityField.User3);

 

Here I got a standard opportunity field but it's similar to how you'd get a custom field, also it appears you're using the real name for the field so the second parameter would be true.

Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 23
Country: United Kingdom

Re: Custom Field Value

Hi Matthew,

 

Thanks for the pointers the parameter change did the trick.

 

Regards,

Joe