Sample VB code for grids in GP

I have added a field to the grid in SOP Trx Entry.  I need help with the code 
for saving, retrieving, etc.  I know I need to reference the Line Item Seq 
Nbr (and possibly the item number) using the DUOS objects.  I don't know how 
to do it.  Does anyone have any samples to share?
0
9/28/2006 4:27:01 PM
greatplains 29623 articles. 6 followers. Follow

2 Replies
689 Views

Similar Articles

[PageSpeed] 44

If anyone knows how to code the DUOSObjectCombineID that would help a 
tremendous amount as well.  I need to combine the LNITMSEQ and the SOPNUMBE 
fields to create the unique DUOS ID.

"Dan Shepherd" wrote:

> I have added a field to the grid in SOP Trx Entry.  I need help with the code 
> for saving, retrieving, etc.  I know I need to reference the Line Item Seq 
> Nbr (and possibly the item number) using the DUOS objects.  I don't know how 
> to do it.  Does anyone have any samples to share?
0
9/28/2006 9:51:02 PM
Hi Dan

This example comes from the VBA Developer's Guide manual included with the 
Manuals when you install Great Plains.

Private Sub Save_BeforeUserChanged(KeepFocus As Boolean, _
CancelLogic As Boolean)
Dim VendorCollection As DUOSObjects
Dim VendorObject As DUOSObject
Dim ObjectID As String
'Specify a vendors collection
Set VendorCollection = DUOSObjectsGet("Vendors")
'Combine two field values to create a unique object ID
ObjectID = DUOSObjectCombineID(VendorID, ItemNumber)
'Create the object, using the combined ID
Set VendorObject = Vendors.Item(ObjectID)
'Set the object’s properties using window fields
VendorObject.Properties("Discount Quantity") = DiscountQuantity
VendorObject.Properties("Discount Percent") = DiscountPercent
End Sub

David Musgrave [MSFT]
Senior Development Consultant
Escalation Engineer - Great Plains
Microsoft Dynamics Support - Asia Pacific

Micorosoft Dynamics (formerly Microsoft Business Solutions)
http://www.microsoft.com/Dynamics

mailto:dmusgrav@online.microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"Dan Shepherd" wrote:

> If anyone knows how to code the DUOSObjectCombineID that would help a 
> tremendous amount as well.  I need to combine the LNITMSEQ and the SOPNUMBE 
> fields to create the unique DUOS ID.
> 
> "Dan Shepherd" wrote:
> 
> > I have added a field to the grid in SOP Trx Entry.  I need help with the code 
> > for saving, retrieving, etc.  I know I need to reference the Line Item Seq 
> > Nbr (and possibly the item number) using the DUOS objects.  I don't know how 
> > to do it.  Does anyone have any samples to share?
0
dmusgrav1 (1325)
10/16/2006 2:22:02 AM
Reply:

Similar Artilces:

Bug Rep: Excel 2007 .xlsm file not saving commented codes
since i've tested this agaist 2 different copies of Excel 2007 fresh install on different machines at home, i think it's clearly a bug. ok, in order to save vba codes now in excel 2007, i'd have to save files in the .xlsm format. that's cool. everything been working sweet, until... spent 4 long days busting my butt during the new year, missed all the nice parties to rush this stupid project out, and 2 hours being scream at by my boss over skype kinda ate my heart out. how can such a simple mistake be made? very very easy >:Errrrrrrr go on any sheet that has codes ...

Using A Macro/VBA code to re-set formulas
Hi can any one help me with a Macro/VBA code to re-set formulas in pre-defined set of cells i.e. in my case C14:C40 At present I have a copy of the Formulas in another part of th worksheet and when I want to reset the worksheet (as the user can ove right the formulas as the formula is based on either the sum of anothe two cells or the users input) I use a Macro to copy and paste (special the formulas. What I require is a Macro/VBA Code which already has the formula store in the actual Macro/VBA code i.e. so they are not stored as copy in m worksheet Ay help would be greatly appreciated T...

Best grid for data...
I have to use a grid to display data. The data is not from a database and hence I cannot use data bound grids. Now, there are so many grids that Iam totally confused which one to use. For now, I just have to display information and sort the rows in ascending/descending order when the user clicks on the column header. This can be achieved even by MS Flex grid. But Iam looking for a grid that is flexible and extensible in case there are new requirements like editing cell data. Can somebody help me find a good grid? Ofcourse Iam looking for freeware. thanks for your patience. T...

Problem with VB.NET and Assembler x64
Hi, I have a 32-bit software that functioned well, but after upgrading my hardware, I wanted to transform this software in his 64-bit version. It all works except for the parameters passing to an Assembler dll that I wrote (even this is ported to 64-bit) Here is the code: VB: Private Declare Sub SUBLONG5 Lib "Codes64" (ByRef i1 As Long, ByVal cm As Long, ByRef c1 As Long, ByRef y1 As Long, ByRef p As Long, ByVal cmm As Long, ByRef c As Long) .... 'All parameters are long-type Call SUBLONG5(i1(j1m), cm, c1, y1, p(mi), cmm, c(mi)) .... Assembler: SUBLONG5 FR...

slow code
i've made a code that searches one optional column for duplicates and deletes 2-6 cells in the same row as a duplicate data is found. I'm using this code a lot and my problem is that it can take very long time for the code to run, it can take 1 hour or more if i'm searching like 15000 rows. I'm going to the last cell in my row and uses the countif command to determine if there are duplicates, if not then i go to the cell above and run an new countif. is there a faster way to do this? jocke ------------------------------------------------ ~~ Message posted from http://www...

Dynamics GP 9.0
When you install Dynamics GP 9.0 from the CD, in the Insallation Type window you will see Server Option or Client Option. The first option should technically say "Server & Client", not just Server. Needless to say, when you Install Server, it installs Client as well. Thanks Girish ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft...

Splitting code to modules ... HOW ?
I have build several Excel VBA applictions, but many of them use som same code and functions. I like to put the code into ONE base module. How must I create the module, export it ? And how to refer to it in al the programs I like to use the base module ?? Roel -- Message posted from http://www.ExcelForum.com Roel If the macros are in several workbooks copy them into the same book and save this as Personal.xls The personal workbook may not be visible when you start Excel but the macros will be available to all workbooks. Alteratively, save the macro as an addin e.g. "myFile.xla&...

Colour code from different servers
-- I collect mail from 2 different servers and I was wondering if it is possible to have them show in the IN BOX in different colours. I know I can select different senders by colour but I want to show all senders that came from each server. Can anybody help Pete A "Pete A" <PeteA@discussions.microsoft.com> wrote in message news:EB77DCA6-A07E-47E9-AD04-62C8B6BC1193@microsoft.com... > > -- I collect mail from 2 different servers and I was wondering if it is > possible to have them show in the IN BOX in different colours. I know I > can > select different se...

how do i change or make this macro??? pictures and code included
i need to either make this from scratch or change it to suit my needs. Firstly a link to the template it is from http://www.exinfm.com/excel%20files/FY2000WhatIf.xls the code is Sub projection() Dim revgrowth As Single, costpercent As Single, smgrowth As Single devgrowth As Single, gagrowth As Single Dim intincome As Integer, noncontitems As Integer, otherexps A Integer Dim taxrate As Single, avgshares As Integer 'dialog box gets displayed With DialogSheets("dialog3") If .Show = False Then Exit Sub End If revgrowth = .EditBoxes(1).Text costpercent = .EditBoxes(2).Text smgrow...

Hiding and Unhiding Forms In Code
This is what I am trying to do. I hide a form and opened another form using a button: Me.Visible=False DoCmd.Open "Select Report Type", acNormal Now I want to unhide the form again using a button on the second form, I tried: If Forms![Inscope Site Summary].IsVisible=False Then Forms![Inscope Site Summary].Visible=true End If But this didn't work. I am stuck. Any help will be greatly appreciated. Thank you. Here is an example of using the IsVisible property (straight from your friendly Access help file); If Me!CategoryID.IsVisible Then Me!Line0.Visible = Tr...

GP locks up when trying to exit the application
Why does GP lock up when user attempts to exit the application? Any help to correct this issue would be appreciated. David, A customer of ours had a problem where the Great Plains application would not close completely on exiting. It turned out that the workstation had spyware installed which was preventing Great Plains from closing completely. Kevin Rood Corporate Software Consultants www.corpsoftware.com krood_no_spam@corp_nospam_software.com (813) 752-0755 (Main Office) (remove "_no_spam" and "_nospam_" to send direct e-mail) davidh wrote: > Why does GP l...

Extracting invoice data from GP 9 using a SQL query (ODBC)
I'm working to extract invoice detail information from a client's GP 9 MSSQL database, with the goal of being able to mock up their invoices in external systems. Just to keep things interesting, they aren't using GP to it's maximum ability - quotes are generated from another software package, and when converted to a sale, minimal data is entered into GP and processed (such as shipping address, job name, job number, PO number, and occasionally a line it of what appears to be free-form text. I have hard copies of several invoices, various web resources, and access to t...

GP 10 fails to store menu toolbar locations
GP version 10.00.1237 Standard The menu/toolbar fails to keep the menu options and buttons in the location I put them in and then lock the toolbars. Sometimes they work, but other times if I work on other programs while GP is starting up after selecting my company to work in when I return to GP the menu is all rearranged, but is still locked. I searched and there was one question directly relating to this and another that references locking the "toolbar", but neither really address the issue or offer a solution. Does anybody from Microsoft have a solution to this problem or...

Adding to a list of codes
Hi In Excel 2003 I have a spreadsheet listing a large number of cost centres. Each month I am given a list of the cost centres and expenditure against them, which I want to use a look up to populate in to a master spreadsheet. However, during the month new cost centres could have been created. What I would like to be able to do is run a macro against the monthly return and compare the codes contained in it to the codes already listed in the master sheet. If there are any new codes not already in the master sheet I would want them added to the existing list so that the mast...

Outlook error codes
I would appreciate any help! Outlook 2007 refuses to startup, error messsage: catastrophic failure (0x8000FFFF) and the following: C:\Users\Matt\AppData\Local\Microsoft\Outlook\ Outlook.pst is not a personal folders file. error code now being displayed: 0x80040119 (is this a registry problem?) the above was the default folder and as such contains a large amount of my inaccessible data Have been unable to activate (or even locate) inbox repair tool (Scanpst.exe), which I understand was installed with Outlook have neutralized spyware uninstalled and reinstalled Outlook 2007, to no ...

bar code help, adding asterix to reference
Hi, A simple one im sure, cell b4 contains a number, i want cell c4 to display the same number with an asterix (asterisk?) at either side for my bar code font? ="*",B4,"*" What's the correct way to enter this? Many thanks as ever, Rick ="*"&A1&"*" seems to work after some trial and error, could there arise a problem doing it this way? Thanks, Rick "R D S" <ricknewsgroup@members.v21.co.uk> wrote in message news:352cf1F4gusjfU1@individual.net... > Hi, > A simple one im sure, cell b4 contains a number, i want cell c4...

Field Service Installation Failed in GP 8 with Arabic Collation
Hi All, I unable to install the databse schema to any of the database due to field service does not install on Arabic Collation. Anybody has solution. Regards Akber ...

which code for the SpellLang in English ?
Hi, I created an Excel file (XP/XL:2000) which is using the check spelling with the code : Range(Cells(19, 2), Cells(50, 9)).CheckSpelling SpellLang:=1033 I would like to know the valid number version for the SpellLang, according to the US language The number 1033 is actually valid for the french language of north America .... Fran�ois I just ran a test using English and the Macro recording feature. It spit this out: ActiveCell.FormulaR1C1 = "spelling something wronge" Range("J6").Select Cells.CheckSpelling SpellLang:=1033 It would appear that 103...

Sample Data #2
Team When will the sample data files be made available http://go.microsoft.com/fwlink/?LinkId=100866 as indicated in the IG on page 2-24 Pete Hi Pete, Hopefully there's some sample data the of of Jan or early Feb. I know that MS are working on it. Darren Liu, Microsoft CRM MVP Crowe http://www.crowecrm.com On Jan 13, 6:53=A0pm, "Peter Hale" <p0...@hotmail.com> wrote: > Team > > When will the sample data files be made available > > http://go.microsoft.com/fwlink/?LinkId=3D100866 > > as indicated in the IG on page 2-24 > > Pete Not too ...

Cannot see sample data
Hello, I've followed the exact instalation procedures of the sample data (creat AD users, run install wizard). The installation seems to be successful. I logged in under the sample data user, but could not see any data. The "announcements" section contains 4 articles, which mean it was added during the install using the wizard. What am I doing wrong? It's been so long since I have to install CRM 3.0 again, but I remember there is another step to configure so the users can see the sample data. Please advise. Thanks for your help. -- Regards, Andy Go to Settings ...

How list inventory item codes so that they will be sorted correctl
...

compiling unix code
dear group, i'm trying to compile code with visual C++ (visual studio 2003 dotnet). the code compiles fine on unix; would like for it to compile on vc++. first question: first, is there a gettimeofday() function on windows? i was under the impression that gettimeofday() is part of the POSIX specification and MS windows is a POSIX compliant operating system. shouldn't the function exist for vc++? second question: here's the top of my code: #define N 10 // Dimension of the matrices #define ITERATIONS 500 // Times to perform multiplication. #incl...

How to enter codes in excel and have corresponding payment sum ?
I would like to learn how to make an excel spreadsheet that I could enter codes and have the corresponding payouts sum up. I work as an installer for a cable company and each job I do consists of codes for work done ( i.e. code 250 -Ran 1 outlet= $8.25, code 251- ran 2 outlets= 16.5 etc..). I would like to be able to enter these codes at the end of the day and see how much I made that day. Is this possible? I know very little about Excel, but do have alot of computer savy. Please help :) The starting point would be for you to build up a table of codes, description and price, something ...

Microsoft Dynamics GP should print invoices on the basis actual.
In Great Plains there is a defect which should be resolved soon. That defect is that the sales analysis report and Aged trail balance report are based on the customer master field not on the basis of actual invoices. For example if there was one customer and there are different sales persons providing to the same customer. There is no way you can get the correct figures of sales or aged trial balance on the report on the basis of sales persons. So what would like to see is correct data in future database. ---------------- This post is a suggestion for Microsoft, and Microsoft respo...

ERROR saving Grid as XML
SCENARIO ======================================= I have a Grid and I want to save the values on an XML. Let me say that I am NOT using DataSet to load valus on my grid. PROBLEM ======================================= When I am saving a Grid to XML I get the following exception: "Token StartElement in state Epilog would result in an invalid XML document" SOURCE CODE ======================================= myXmlTextWriter = new XmlTextWriter (aFileName, null); myXmlTextWriter.Formatting = Formatting.Indented; myXmlTextWriter.WriteStartDocument(); myXmlTextWriter.WriteStartElem...