Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup

Hi,
I am trying to create a GP 9 Addin using Visual Studio tools. I basically 
need to create a new form which needs the user to select a Customer. I am 
calling the 
Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup form and 
adding an event handler to get the name of the selected customer back. The 
problem is that I am not able to remove the event handler which keeps getting 
fired everytime the Customer lookup form is loaded from anywhere else in GP. 
Here's the code that I am using, Can someone please suggest whats the correct 
way of doing the lookups?
{
 Microsoft.Dexterity.Applications.DynamicsDictionary.CustomerLookupForm 
m_CustomerLookupForm =
                
Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup;

Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup.CustomerLookup.SelectButton.ClickAfterOriginal 
+= new EventHandler(SelectButton_ClickAfterOriginal);
            m_CustomerLookupForm.Open();
}
 void  SelectButton_ClickAfterOriginal(object sender, EventArgs e)
        {
            this.txtDebtorID.Text = 
m_CustomerLookupForm.CustomerLookup.CustomerNumber;
            m_CustomerLookupForm.CustomerLookup.Close();
        }
0
Ritesh (15)
5/25/2007 4:33:02 AM
greatplains 29623 articles. 6 followers. Follow

1 Replies
933 Views

Similar Articles

[PageSpeed] 44

I just wanted to add that trying to remove the event handler registered 
previously by doing:

m_CustomerLookupForm.CustomerLookup.SelectButton.ClickAfterOriginal -= new 
EventHandler(SelectButton_ClickAfterOriginal);

results in an exception: "Unsubscribing is not supported."



"Ritesh" wrote:

> Hi,
> I am trying to create a GP 9 Addin using Visual Studio tools. I basically 
> need to create a new form which needs the user to select a Customer. I am 
> calling the 
> Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup form and 
> adding an event handler to get the name of the selected customer back. The 
> problem is that I am not able to remove the event handler which keeps getting 
> fired everytime the Customer lookup form is loaded from anywhere else in GP. 
> Here's the code that I am using, Can someone please suggest whats the correct 
> way of doing the lookups?
> {
>  Microsoft.Dexterity.Applications.DynamicsDictionary.CustomerLookupForm 
> m_CustomerLookupForm =
>                 
> Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup;
> 
> Microsoft.Dexterity.Applications.Dynamics.Forms.CustomerLookup.CustomerLookup.SelectButton.ClickAfterOriginal 
> += new EventHandler(SelectButton_ClickAfterOriginal);
>             m_CustomerLookupForm.Open();
> }
>  void  SelectButton_ClickAfterOriginal(object sender, EventArgs e)
>         {
>             this.txtDebtorID.Text = 
> m_CustomerLookupForm.CustomerLookup.CustomerNumber;
>             m_CustomerLookupForm.CustomerLookup.Close();
>         }
0
Ritesh (15)
5/25/2007 4:52:02 AM
Reply:

Similar Artilces:

Form only has first entry
Hello, We have copied our 2009 database and with some small improvements are now using it as our 2010 database. When we tried out our improvements last year, they worked. Come to find out, they worked because we only tried one entry!. Now our form only shows one entry ( >* is 1 of 1), even though in the table the others are "logged". Searching this site We have found that setting the properties to the forms 'data entry' to "No" would seem to be the culprit. But this has always been set to "No". Here's the set up: 2009 DB last entry on...

Excel.Application User-define Error
In trying to solve a Access to Excel data linking problem from Microsoft's site http://support.microsoft.com/kb/904953 I am trying to run the example and it dies on Dim xlApp As Excel.ApplicationThe error message I get is "Compile error: User-defined type not defined." Is there something I need to add like a reference in order to get this to work?Mike You need to add a reference to Excel (through Tools | References while in the VB Editor). Personally, I prefer using Late Binding, since setting a reference then limits your application to only those users with the same ...

Error: "Unable to open your default e-mail folders. The microsoft exchange server is unavailable"
Hi: I have a user on our exchange 2003 sp1 system who is receiving the above error when trying to connect to his mailbox. He is able to connect in OWA. I gave myself rights on his mailbox and set up a new profile on my machine (xp, office 2003) and connected fine. I then logged in as his account on my machine, set up a profile and tried to open outlook and received the error above. Any ideas. Not seeing this exact error on the microsoft site or google groups. ...

XML Map
Hi all, I import XML data into a worksheet, and choose a mapping name, but I have no idea how to change the path so that it is dynamic. I've been trying to find a way to set my mapping paths to dynamic, so that when I move the folder that contains the xl file and xml files, the mapping path still works. Help :) Cheers, Grant. I'm not sure you can make it 'dynamic' per se but you can write code to change. Here's a sample of changing the bound xml document. ActiveWorkbook.XmlMaps(1).DataBinding.LoadSettings ("C:\Services Proposal.xml") -- Charles...

Slow when closing a form
Environment: 1. Front-End - MS Access 2003 2. Back-End - SQL Server 2005 3. OS - Windows XP I cannot understand why it takes a 5-7 seconds to close our Invoice form. The Invoice form has several data components in it that retrieves data. The code in the "Done" button of the form perform the following: a. Me.Requery b. Check other loaded forms "IsLoaded()" c. DoCmd.Close The form has also a code in the "Close" event which only checks for loaded forms again "IsLoaded()". Thanks, Ben "Ben" <pillars4@sbcglobal.net> wr...

Making sure data is saved on closing application
Hi, I have built myself the following application from 'Teach Yourself Visual C++ in 21 Days' chapter 'Day 14 - Retrieving Data from an ODBC Database' http://serghei.net/docs/programming/c++/ty%20visualC++6%2021%20days/ch14/ch14.htm The application lets you edit and add records to a database (as well as just retreive them). The application uses recordset flags in code to make sure that data is saved if you edit one record and move to another. However, there is no code to make sure new or edited data is saved when the application is exited. After having poked about, I have...

Display/Hide a Form Control/Field Based On Another Field Value?
Hi all, I have to Combo boxes on a form. The first one I would always like users to see. The second, however, I would like hidden if the first box has certain values selected. So, if ComboBox1 has values of 1 or 2, I would like ComboBox2 to show as normal. If ComboBox1 has a value of 3, I would like ComboBox2 hidden. Is there a relatively simple way of doing this, if at all? Thanks for your help as always! --Eric You have to take care of 2 things: (1) When you move from record to record and the combo box contents changes (2) When the user changes the contents of the combo box For (1), inse...

Ads in Microsoft Money
The advertising in Microsoft Money is really getting on my nerves. I clicked on the Taxes tab in Money 07 the other day, and an ad for Jessica Alba's new movie appeared in a box on the Taxes page. I click on items that I think will be planning tools and instead, a browser pops up with content from the MSN Money website. I really don't understand why Microsoft would think they need to generate income through advertising, especially with the unrelated ads in personal finance software. This bugs me so much that I decided to blog about it, and I don't usually use my blog to vent fr...

Faulting application dynamics.exe
I am not sure what is going on but there are times when this error occurs for users in GP 7.5... "Faulting application dynamics.exe, version 7.5.0.3, faulting module mfc42.dll, version 6.0.8665.0, fault address 0x000048ab." After getting this error, GP shuts down. I have been trying to pinpoint when it does not happen in a consistent spot. It also does not happen to all users. I also can not get this error to occur on the development machine. I have researched the heck out of this on the web but have found no resolution. The only thing that I can see different is the deve...

Auto Filling fields in form
I am new at creating code and would like to have two fields populated when the record is reviewed. One is the user name and the other is the date reviewed. There is a form which contains the Member Name and ID number. I would like to add the two auto fill fields in the Parent form and have it fill in the subform fields for that particular member using a trigger of some sort. Any advice would be appreciated. Bev Access forms display data... Access tables store it. If you want to see data from a record in a table in your form, your controls in the form need to be poin...

User form problem
I have made a userform, which works great. However i have a problem. I would like the userform to only load up when the template file i opened. I do not want it to load when saved workbook copies of th template are opened. The system I am creating is an invoice system, and thus the loading o the userform is only necessary upon opening the template, not any othe files. Is this possible to do? Any help would be appreciated. Thanks. Z -- Message posted from http://www.ExcelForum.com Hi Zairn You can check the Len of the Thisworkbook.path in the Macro. A template have no path Sub test() I...

Does Microsoft CRM 3.0 extend the Active Directory schema?
Q. Does Microsoft CRM 3.0 extend the Active Directory schema? No, the AD schema is not extended. It simply creates an add'l Organization Unit and some security groups under that OU. No changes that can't be simply undone... "Rifat Yavuz" <Rifat Yavuz@discussions.microsoft.com> wrote in message news:B5E9FBF3-D8B5-4735-AC87-494AA2B81599@microsoft.com... > Q. Does Microsoft CRM 3.0 extend the Active Directory schema? thanks Chris Rifat Yavuz "Chris Resch" wrote: > No, the AD schema is not extended. It simply creates an add'l Organization...

Sizing a form in Access 2007
I've been working with Access for the past decade, and recently upgraded to 2007. I've created several forms but can't figure out how to make them the size I want in display view. In older versions all I needed to do was pull in the left side and bottom of the form and minimize to the size I wanted. 2007 doesn't appear to have this ability. I was able to get the display size I wanted by setting the form to popup and modal, but this keeps the form on top. I tried pulling the form under the ribbon. This allows reports opened with the form to display, but I can...

Return the name of the object I click on in a form
Hi, How do I go about returning the name of an object on a form. For example if I set the "On Click" event procedure on a rectangle object to return: MsgBox Me.Name I get the form name. What I want to do is click on the object and be abe to reference it's properties such as Tag to run other code based in these values. As always any assistance is greatly appreciated. Regards, John Dumay For the name of the control try Screen.ActiveControl.Name For the control itself use Screen.ActiveControl -- AG Email: discussATadhdataDOTcom "John Dumay" <JohnDumay@dis...

Data from Form to Subform to Table
I have a main form for material inspection, and another form for the inpsection results, and tables for each that store the data. For example, you have to enter the PO# and P/N on the main form, as well as some other info, then you click to open up the inspection results form in datasheet view. The inpsection results form shows the PO# and P/N that you entered on the main form, but it wont store the info in the table for the inspection results. Can someone please help me figure out how to get the info to store in the inspection results table as well as the material inspection tab...

How to write figures in words form?
If I want to write 120 in words form (One Hundred twenty), how I can do it in EXCEL. Try at http://www.xldynamic.com/source/xld.xlFAQ0004.html. Amjad Wrote: > If I want to write 120 in words form (One Hundred twenty), how I can do > it in > EXCEL. -- Bryan Hessey ------------------------------------------------------------------------ Bryan Hessey's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=21059 View this thread: http://www.excelforum.com/showthread.php?threadid=400011 Try: http://www.meadinkent.co.uk/xlnumberstext.htm Amjad Wrote: ...

Microsoft Office 2000 Premium and Excel 2000
I have XP OS, and Microsoft Office 2000, not MS Office 2000 PREMIMIUM. However, I continue to receive a prompt to install the "PREMIUM" disc. Do you know of any place I can go to download "PREMIUM" without having to pay for the whole program as a new program? Actually, if I can download just the "PREMIUM" features for free or near free, I would do that. More immediate is the EXCEL problem. I have about 35 documents and spreadsheets in my Excel program. I just returned from a trip and hadn't had access to my computer for several weeks. All of my ...

The Microsoft Community is a public forum where you can ask quest
The Microsoft Community is a public forum where you can ask quest Actually it is only a web based interface to the microsoft public newsgroups. Dessi Purnama Putra wrote: > The Microsoft Community is a public forum where you can ask quest Wow, you almost finished a sentence. "Dessi Purnama Putra" <Dessi Purnama Putra@discussions.microsoft.com> wrote in message news:17EFCDB1-9675-4413-BC27-6EC94D840DC6@microsoft.com... : The Microsoft Community is a public forum where you can ask quest ...

OFFSET problems in dynamic range
Hi, I'm having the strangest problem with the OFFSET function. I have 5 dynamic ranges in my worksheet. Aimline =OFFSET('Weekly ORF'!$F$4,1,0,COUNTA('Weekly ORF'$F:$F)-1,1) Sessions =OFFSET ('Weekly ORF'!$D$4,1,0,COUNTA('Weekly ORF'$E:$E)-1,1) WCPM =OFFSET ('Weekly ORF'!$G$4,1,0,COUNTA('Weekly ORF'$G:$G)-1,1) Date =OFFSET ('Weekly ORF'!Aimline,0,-1) Date2 =OFFSET ('Weekly ORF'!WCPM,0,-1) The problem is that the two names for Date and Date2 keep reverting to =OFFSET ('Excel Template.xls'!Aimline,0,-1) and =OFFSET (&#...

'Microsoft Visual C++ Runtime Library Runtime Error! 2nd Request
I just upgraded my Dell PII 400 from W2000 SP4 to WXP SP1. I was having a lot of problems with Outlook XP crashing multiple times while in use, which was 1 reason for the upgrade, as Outlook is current, with all available updates having been applied. Under XP, when I start Outlook, 9 out of 10 times I get a message box entitled: 'Microsoft Visual C++ Runtime Library' with the text: 'Runtime Error! Program: C:\PROGRA~1\MICROS~2\Office10\OUTLOOK.EXE abnormal program termination.' When I click OK, Outlook closes. The next time, it starts OK, but has to scan the Personal f...

Main form causing multiple errors
History: I have created a database for my company to track all incidents, equipment issues, and more. The database has been in use for over a year and has been working quite well. It is a split database with the back end located on a network hard drive and the front end updated through autofeupdate. The database is setup for a multiuser environment. I have integrated functions to send email messages and create reports daily. Recently, I have added six list boxes to the main form. Each listbox displays information on current records. For instance, one listbox shows all the open equipment ticket...

Microsoft Exchange Server Information Store
Hi, We're launching MS Outlook 2003 from a Java application. We've got it to work, but occasionally we get an error that boils down to the following- Microsoft Exchange Server Information Store - UNKNOWN_ERROR(80010106). Our application creates a new outlook email, with an attachment, a customized subject and message body, and launches a new mail window so that the user can edit or review the message before sending it. At this point, we do not have access to a java stack trace for further details, will get them soon. What exactly causes this error, and how can we work around it? I ...

Outlook is trying to retrieve data from the Microsoft Exchange Ser
Hi I keep getting a msg saying "Outlook is trying to retrieve data from the Microsoft Exchange" everytime i try and send a mail... the mail then gets stuck in my outbox. I still receive all email and this only happends over one particular broadband connection??? If i use dial up it works and if i go to some other broadband connection it works... any ideas? _VERITAS_ wrote: > Hi > I keep getting a msg saying "Outlook is trying to retrieve data from > the Microsoft Exchange" everytime i try and send a mail... the mail > then gets stuck in my outbox. I s...

Last Form to have Focus error
I have an app where the user wants to copy the current record (2 tables) and create a new record. Since there is a ton of available data I pop up a screen that allows them to select what parts of the record they want. Works pretty well (cannot seem to get the calling form to go to the new record). This copy form can be called from two different forms. So I was trying to use the following so I would know which form called it as to make some decisions. In the same database I am using this code when calling my own type of message box (ex 1) and it works great. I use it to change the b...

Case Form
Hi, What is the best way to capture both the Account and Contact on the Case form. We need to capture both when creating a case. Assuming you want to see the Parent Account, you have the "customer' lookup field and you can add the 'responsible contact' field to the form which will create a lookup to a contact. "Donna Edwards" wrote: > Hi, > > What is the best way to capture both the Account and Contact on the Case > form. We need to capture both when creating a case. Thanks Chad, greatly appreciated!! I overlooked that field. Donna "...