Web Service Create Invoice - Distibutions

I am using the web services in C# to create invoices in Great Plains
10.  I am having a problem getting the correct distributions to
display.

I have a loop that adds products to the invoice.  The loop I am
calling the following code to set the GL Accounts:
---
                salesInvoice.Lines[i].InventoryGLAccountKey = new
GLAccountNumberKey();
                salesInvoice.Lines[i].InventoryGLAccountKey.Id =
"01-000-00-000-1010-000";
                salesInvoice.Lines[i].SalesGLAccountKey = new
GLAccountNumberKey();
                salesInvoice.Lines[i].SalesGLAccountKey.Id =
"01-000-00-000-1020-000";
---
Right now the GL Account numbers are hard coded till I can get this
work, then they will be dynamically created based on some database
lookups.

I have tried changing the web service policy to auto create the
distibutions and also not to and in either case when I view the
transaction within the batch no account numbers are specified.

I also tried setting the Distibution object of the invoice with out
any luck:
--
SalesDistribution sd = new SalesDistribution();
sd.CreditAmount = new Amount();
--
In this case the AMount does have a dollar amount I can specify for
the credit.  Seems like this object is mainly availible when
retrieving an already created invoice.

Any help would be greatly appreciated.

Thanks, Jason
0
webberland (61)
12/20/2007 5:01:52 PM
greatplains 29623 articles. 5 followers. Follow

2 Replies
680 Views

Similar Articles

[PageSpeed] 21

I got it working the way I needed it to.  Even though the credit and
debits were of type Amount I could pass my MoneyAmount to the field.

SalesDistribution sd = new SalesDistribution();
MoneyAmount creditAmount= new MoneyAmount();
sd.CreditAmount =creditAmount;

On Dec 20, 9:01 am, Jason <webberl...@gmail.com> wrote:
> I am using the web services in C# to create invoices in Great Plains
> 10.  I am having a problem getting the correct distributions to
> display.
>
> I have a loop that adds products to the invoice.  The loop I am
> calling the following code to set the GL Accounts:
> ---
>                 salesInvoice.Lines[i].InventoryGLAccountKey = new
> GLAccountNumberKey();
>                 salesInvoice.Lines[i].InventoryGLAccountKey.Id =
> "01-000-00-000-1010-000";
>                 salesInvoice.Lines[i].SalesGLAccountKey = new
> GLAccountNumberKey();
>                 salesInvoice.Lines[i].SalesGLAccountKey.Id =
> "01-000-00-000-1020-000";
> ---
> Right now the GL Account numbers are hard coded till I can get this
> work, then they will be dynamically created based on some database
> lookups.
>
> I have tried changing the web service policy to auto create the
> distibutions and also not to and in either case when I view the
> transaction within the batch no account numbers are specified.

>
> I also tried setting the Distibution object of the invoice with out
> any luck:
> --
> SalesDistribution sd = new SalesDistribution();
> sd.CreditAmount = new Amount();
> --
> In this case the AMount does have a dollar amount I can specify for
> the credit.  Seems like this object is mainly availible when
> retrieving an already created invoice.
>
> Any help would be greatly appreciated.
>
> Thanks, Jason

0
webberland (61)
12/20/2007 6:06:19 PM
------=_NextPart_0001_A7163DEE
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Glad to hear you have it working now.

Thanks,
Chris Roehrich
Developer Support
Microsoft Dynamics
------=_NextPart_0001_A7163DEE
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Glad to hear you have it working now.
\par 
\par Thanks,
\par Chris Roehrich
\par Developer Support
\par Microsoft Dynamics
\par }
------=_NextPart_0001_A7163DEE--

0
croehric (7)
12/21/2007 5:00:10 PM
Reply:

Similar Artilces:

Creating Appointments from Web Pages
Hello All, I want to create an appointment in Outlook when the user clicks on a link on the web page. Can anybody please tell me about the ways and the tools that are available to this? Thanks in advance, Satyajit Bhagwat Use Outlook to create an appointment, then save it as an .ics iCalendar = file. Put the file on your web site and add a link to it.=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers ...

Saving a web page with a background sound
I am having a problem publishing my website with Publisher using the ftp server for my Comcast webspace. If I publish my website without a background sound it is fine, but as soon as I add a .wav file as a background sound through web properties in Publisher, I get an error that Pulisher can not save this file to the web. Does anyone have any suggestions. I forgot this info. I am using Publisher2000 and when I preview the web page in Publisher, the preview plays the sound. "Marland" wrote: > I am having a problem publishing my website with Publisher using the ftp > ...

Web Query Question
I'm updating sports scores in excel 2002, The first set of Columns Are the Team Names and the Final Score of the Game (These 2 columns update after each game). My other 2 columns are used for notes and other information. When ever I refresh the data, the first 2 sets of columns update, however the notes for the game stays in the same place. How do I get my other 2 columns to move down the page with the old scores. Please help, because this is driving me crazy! If I need to explain further Please dont hesitate to ask!! Thank you, Matt Thu, 20 Dec 2007 13:22:00 -0800 from So...

ESM
Hi, I created some Public folders in OL 2003 before Xmas no problems as I am the administrator for the local domains server & Exchange admin. Today I tried to create additonal folders form my LAN XP machine but continually receive the error of: Unable to create the folder. You do not have sufficient permission to perform this operation on this object. See the folder contact or your system administrator. When I look at the folder properties in OL I see the folder contact is NT USER:S-1-5-21-606747145-1682526488-682003330-1109 but I have no idea who that is...or was more likely! If I then g...

office outlook web access 8.1.375.2
The inbox view automatically truncates the 'From' and 'Subject' fields of each email to 16 or 25 characters. This makes scanning down the list of emails difficult since a good portion is not displayed. How do I as a user or as an admin, change the default settings for this truncation so more characters are displayed? > The inbox view automatically truncates the 'From' and 'Subject' fields > of each email to 16 or 25 characters. This makes scanning down the > list of emails difficult since a good portion is not displayed. How do > I as a user or ...

Can Excell create a running invoice NUMBER?
Lets say I was to create a form that will be used over and over, but everytime I fill it out and print it I need it to generate a number that changes 1 digit each time it is pulled up and printed. Example, I have a blank invoice, then I fill in the fields as needed and the invoice has a number on the top numbered 00001 so I print it and close the file. Then tomorrow I open it and do the same thing except the invoice number now is set at 00002. I am not sure if Excel can do this or not. This would be pulling a rabbit out of a hat if this can be done :cool: G. --- Message posted from http:...

Letterhead invoice form
I have scanned a company invoice form to an Excel spreadsheet. The automatic format is a picture and I have made it transparent. I'm having trouble lining it up with the grid, getting the bottom part of the form to line up with the very bottom of the spreadsheet and it won't allow me to add data to the rows or cells. I have invoices set up to print on the blank stationary which line up just fine. However, I am trying to minimize the use of my personal printer. To use one of our large copiers for printing, I need the letterhead information to print. Too many use this copier...

create folder to all users
i am searching for a way to create a folder called search and replay under the outbox folder. i do not wish to use a plublic folder. the search and replay folder will open up to a web page. i need to know if there is any way of creating this folder without going to each of the workstations. we are running exchange 2003 w/ mixed outlook versions (200,xp,2003). please offer me any ideas you might have. thank you for your help. You'll have to script a solution. Nothing native in Exchange will let you do this and deploy to existing users. Nue "murr" <martynaughton@gmail....

Web Query #5
Hello, I am using Excel 2003. Are there web pages that do not allow you to use the web query function in Excel? I have found when trying to use the Web Query, in some cases, when I click IMPORT, I do not get any results. It either comes up blank or I get a banner/message that is not on the actual page I trying to import! Thanks ...

How do I create a master set using my own design?
I don't like any of the selections for master sets. How do I design a master set using my own design? Open help, search for custom scheme. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Lainee" <Lainee@discussions.microsoft.com> wrote in message news:E6F3AC2D-107A-4709-BC37-CE91F58583B1@microsoft.com... >I don't like any of the selections for master sets. How do I design a master > set using my own design? ...

Email service for members...
We are an association (ABC.org) that offers an email service to our members that allows them to sign up for an email address that ends in the same domain as that of the staff at our headquarters. For ex, a doctor could sign up for: drJohnson@ABC.org and provide a 3rd party email of drjohnson@yahoo.com so all email sent to the @ABC.org is forwarded to the yahoo account. Currently, our ISP maintains a list of all doctors that participate in this service and filters for email sent to those email addresses and fwd's them to the 3rd party address so they never reach our Exchange server. ...

Mailbox doesn't automatically created for new AD user
Hi, We are running exchange 2003 in a windows 2003 AD environment. for the last two time when I created new users their email address and email boxes does not get created. The RUS in exchange should automatically update user email address using recipient policy. But this didn't happen even after 2 days. However, the mailboxes and email address are created after rebooting the exchange server. Has anyone came across this problem? Tom Yes, we run the same environment and found the same thing happening to us. When I went to the RUS in System Manager for Exchange, the right side of ...

Viewing Access Reports on Web page prompts download
My Issue is related to knowledge base article 921025. The solution in the article fixes our problem perfectly but the issue is that every time new windows update patches are installed (once a month) this registry key is changed back to its original state. This is causing havoc because every month we have a mob of angry users who cannot view important production information until we can reapply the work around to all the pc's in the plant! Is there a more permanent solution we can put in place? What we did was switch from snp to pdf and uploading those instead. GEFanucJP wrote: &...

Works fine in PUB and WEB Preview
Hello all - I apologize for my neophyteness in advance. Everything works fine in PUB. When I look at the web preview it looks fine. When I publish it to disk IE'ing from the HTML works fine. When I place it on the web the links for subsequent pages in the guidance bar on the left side (the pre-canned feature in PUB) do not link. They go to a blank page. I have placed all files in exactly the same folders on the web as they are on disk after publishing. You can see it at: geocities.com/ucstrandview THanks in advance for the help. MP Publisher - Uploading Articles on publishing ...

having a problem creating a histogram with an in between range
excel's standard graphs do not allow me to do an in between range for a histogram. Is there any way I can make each bar a range instead of a number with no spaces between bars? here's a drawing of what I'm looking for: http://img140.imageshack.us/img140/2511/histogramzi0.jpg ...

Web Browsing on my Ameritrade
Really like the Money 2007 interface, tightly integrating the browser is a great way to integrate all the other online accounts and services. I've set up all my financial browser links and don't even bother opening the browser when I'm checking potential investments. Direct access to my bank server is so much better than the old download method. Ahead of its time IMHO. Couple of observations/ questions If anyone know someone connected with the software, I'd like to pass along a suggestion to see easier access to web favorites. Right now its a 3 click process to access ...

Writing to one trace file from Web Service
Presumably a trivial question... I want to write trace information from a web service to a log file using the Trace Class. Is this possible without closing and opening the Trace in every single web method? Code: public Webservice() System.IO.FileStream ts = new System.IO.FileStream(traceFile,System.IO.FileMode.Append); Trace.Listeners.Remove (Trace.Listeners[0]); Trace.Listeners.Add(new TextWriterTraceListener(ts)); Trace.WriteLine("Constructor " + System.DateTime.Now.ToString()); Trace.Close(); [WebMethod] public WebMethod () { System.IO.FileStream ts = ...

Report Web Access
Hi, I need make a report to check the users of my network that access the Outlook Web Access from outside. Do you know how i can do this? Thanks Alvaro You can use a web log analyser on the logs generated by IIS on the OWA server. Regards Paul "Alvaro" <anonymous@discussions.microsoft.com> wrote in message news:08fb01c3db68$3b4bc910$a601280a@phx.gbl... > Hi, > > I need make a report to check the users of my network that > access the Outlook Web Access from outside. Do you know > how i can do this? > Thanks > > Alvaro "Alvaro" <ano...

Problems with Outlook Web Access in Exchange 2003
Has anyone noticed any issues with OWA in 2003? I have had a few users where if they go into their regular Outlook, they see tons of mail from various senders in their inbox. However, when they go into their Outlook Web Access, they do not see all of that mail in their inbox. They may only see mail going to certain groups they are members of. I also have users in which if they open a new email in OWA, as soon as they close it, it disappears from their inbox. And it doesn't show up in their Deleted folder. In both cases, I can export their mailbox as a pst, delete and recreate their a...

List of free web site design, web site backgrounds, web site layouts resources
List of free web site design, web site backgrounds, web site layouts resources http://www.geocities.com/freefreemyspace/ ...

activeX component can't create object: 'crmaddin.uiutil'
I loaded a CRM 1.2 server on Windows 2003 Server and then I loaded the Outlook Client piece on Win XP SP2 and Outlook 2003. I get this error whenever I click on a contact. activeX component can't create object: 'crmaddin.uiutil' Thanks in advance for any help. Bryan ...

urgent: how do i shut down report services?
urgent: how do i shut down report services? I do not want people to open reports as it is killing the systems performance. You can go on the CRM server and open up the services manager and stop the Crystal APS service. (Start > Administrative Tools > Services) This will also stop the other Crystal services. -- Matt Wittemann http://icu-mscrm.blogspot.com "ntcrsk" wrote: > urgent: how do i shut down report services? I do not want people to open > reports as it is killing the systems performance. ...

service pack 4
has anyone has had this error script '[49]() of form SOP_Entry' no found. after the service pack 4a installation.....in the latin american version thanks! ...

worksheet 250 creates Duplicate Items at store
Hi, We have a HQ and several stores connecting to it. All items are created from HQ and sent to store for receiving. In some instances when a 250 is sent twice to the store the item is duplicated at the store level. All information is exactly the same. On the flip side, when you create an item at the store level with the same sku it gives an error "Itemlookup code already exists". Why doesnt this happen with the polling and prevent the duplicate sku. Thanks for your help Mano 250 worksheet does not (should not) duplicate your Item Data, unless same item had been created...

Opening PPSX files from Web Pages
Anyone else having problems where PPSX files are opening in edit mode with Office 2007? And yes, I've edited IE to make sure it's opening correctly. I've seen others with the same problem, but no fix. Does anyone know of a fix to this? In article <496A37F7-72E6-4774-994F-8816C5E69871@microsoft.com>, Jjsmits9 wrote: > Anyone else having problems where PPSX files are opening in edit mode with > Office 2007? And yes, I've edited IE to make sure it's opening correctly. > > I've seen others with the same problem, but no fix. Does anyone...