Community
Showing results for 
Search instead for 
Do you mean 
Reply

How to bind custom fields of Opportunity table with controls on custom tab ?

Tuned Listener
Posts: 9
Country: USA

How to bind custom fields of Opportunity table with controls on custom tab ?

I have created few custom fields in ACT! Opportunity table i.e., TBL_OPPORTUNITY. Then I have added a tab named 'SalesOrder' at Opportunity view (since I am using ACT! 2010). This tab have a textbox , which should display the custom field value. But I am unable to bind it to the custom field which I have created. Please advice, how to bind the controls with the opportunity fields so as to save and retrieve field value ?

 

Thanks in advance. 

 

Sincerely,

Dinesh.
Nickel Super Contributor
Posts: 441
Country: UK

Re: How to bind custom fields of Opportunity table with controls on custom tab ?

Are you trying to do this thorugh the SDK with a custom control or through the UI.... why not just use the layout designer?

 

Tom

Tuned Listener
Posts: 9
Country: USA

Re: How to bind custom fields of Opportunity table with controls on custom tab ?

Hi Tom,

 

Yes, we are doing it through the SDK with a custom control and we won't be doing it using the layout designer.

 

Do you have any info about it ? 

 

Thank you. 

 

Sincerely,

Dinesh.

Nickel Super Contributor
Posts: 441
Country: UK

Re: How to bind custom fields of Opportunity table with controls on custom tab ?

I haven't written many custom controls but basically have a look at the samples in the sdk, these definately work so you should be able to twek them slightly to do what you want, this is what I have always done in the past.  You need to implement IMutableEntityListBoundControl instead of IContactListBoundControlfor v12.

 

Tom

Avid Listener
Posts: 44
Country: USA

Re: How to bind custom fields of Opportunity table with controls on custom tab ?

I just did this

 

 //Get the Number of Guests
                OpportunityManager instance = new OpportunityManager(this.ActApp.ActFramework);
                Guid[] Guids = new Guid[1];
                Guids[0] = this.ActApp.ApplicationState.CurrentOpportunity.ID;

                Act.Shared.Collections.SortCriteria[] usortCriteria = null;
                OpportunityList uOList = default(OpportunityList);

                uOList = instance.GetOpportunities(Guids, usortCriteria);
                Act.Framework.MutableEntities.MutableEntityFieldDescriptor uField2;

                uField2 = ACT.DBS.BEO.Classes.Act_Findfunctions.FindOppFieldDesriptor("NO_Guests", this.ActApp);
                int uDfltGuestCount = (int)uField2.GetValue(uOList[0]);

 

 

 if (this.GuestNumberTextBox.Text == null || this.GuestNumberTextBox.Text == "0" || this.GuestNumberTextBox.Text == "")
                {
                    this.GuestNumberTextBox.Text = Convert.ToString(uDfltGuestCount);
                } 

DBS