DynDeveloper.com

DynDeveloper.com

Sign Up Now! Log In

Archives

 

If you use Visual Studio to enter a value in the MiscAmount field in SOP Transaction Entry, the Total and On Account fields will not recalculate. The problem is that there is code that runs behind the form and simply setting a value for Dynamics.Forms.SopEntry.SopEntry.MiscAmount.Value will not cause that code to run. What you need to do is...

This short code example shows how to sort a Telerik RadGridView in code.

This short code example shows how to change the user that is used in a Web Services call. The exmple here is for the native endpoint, but the other calls are similar.

 

This is a set of classes that handles FTP functionality

Sample code to create an item, itemSite, and itemVendor. We're using the IVItemMasterType, taUpdateCreateItemRcd, taCreateItemVendors_ItemsTaCreateItemVendors and taItemSite_ItemsTaItemSite schema

 

This code uses classes that are passed in to the routine that we're not showing; the point of posting this here is to have some boilerplate code that can quickly be copied into a new project and edited. The source of the data changes on each project, but the code is largely the same

All our eConnect code uses the common functions class

Sample code for the RMCustomerMasterType and the taUpdateCreateCustomerRcd. The data source used here is a class that is passed in to the routine. We don't document that class because that isn't the point. We're just providing boilerplate code that can be copied into projects

 All our eConnect code uses the common functions class

This is a code example for the IVCreateIVItemClassType and taCreateIVItemClass schema.

All our eConnect code uses the common functions class

I'm very fond of using Generic Lists, but the FIND code is not exactly straight forward.

This is a series of examples of how to use the FIND method for a Generic List in VB.NET. The code is a complete runnable samle.

It's largly taken from the MSDN sample code but has been simplified some to be easier to read and use.

 

This is a complete code example for creating a PO. The example uses a class as the data source; we're not going to document that because it changes every client. The point is to have a set of code that we can copy into an application and edit rapidly

All our eConnect code uses the common functions class

 

This is code sample for updating the header of a SOP document. We use the SOPTransactionType and taSopHdrIvcInsert eConnect objects.

 

I've needed a piece of code like this for some time.

Recently I was asked to write an application that would watch a directory and respond to files that were saved there. We'd need to pick them up, process them, and then move them to a 'done' folder. Standard Dyn Developer stuff.

Normally, I'd write a console application and schedule it with SQL scheduler to sweep the folder every x minutes.

At some point I became aware of the System.IO.FileSystemWatcher class. The FileSystemWatcher class 'Listens to the file system change notifications and raises events when a directory, or file in a directory, changes'. Cool, right? The example below is a complete Windows Service application that uses the FileSystemWatcher class to monitor a directory and to respond to files that are saved in that directory.

The paragraphs below are from the MSDN remarks for the FileSystemWatcher class:

Use FileSystemWatcher to watch for changes in a specified directory. You can watch for changes in files and subdirectories of the specified directory. You can create a component to watch files on a local computer, a network drive, or a remote computer.

To watch for changes in all files, set the Filter property to an empty string ("") or use wildcards ("*.*"). To watch a specific file, set the Filter property to the file name. For example, to watch for changes in the file MyDoc.txt, set the Filter property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in text files, set the Filter property to "*.txt".

There are several types of changes you can watch for in a directory or file. For example, you can watch for changes in Attributes, the LastWrite date and time, or the Size of files or directories. This is done by setting the NotifyFilter property to one of the NotifyFilters values. For more information on the type of changes you can watch, see NotifyFilters.

You can watch for renaming, deletion, or creation of files or directories. For example, to watch for renaming of text files, set the Filter property to "*.txt" and call the WaitForChanged method with a Renamed specified for its parameter.

The Windows operating system notifies your component of file changes in a buffer created by the FileSystemWatcher. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the InternalBufferSize property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use the NotifyFilter and IncludeSubdirectories properties so you can filter out unwanted change notifications.

This is a walkthrough for ASP.NET routing. The concept of routing is very interesting, it allows you to take this URL:

http://mysite.com/articles.aspx?ArticleID=HowToCodeRouting&Theme=Orange

to this:

http://mysite.com/articles/HowToCodeRouting/Orange

The overall effect is more searchable and more self explanitory to look at.

Our code example is very short, just enouth to get you up to speed and coding... quickly.

Edit 2/21/2015: the two 'Ignore' lines were added to avoid this error:

JavaScript critical error at line 4, column 1 in http://localhost:55362/WebResource.asx?... Syntax error

Cannot insert the value NULL into column 'BASEUOFM', table 'tempdb.dbo.##XXXXXXX'; column does not allow nulls. INSERT fails.

I'm getting this on an upgraded GP 2010 system when looking at the 'Items' navigation list.

I’m trying to add the Visual Studio Tools Menu addin (VSTMenus.cnk) to the GP client install of one of our Finance Director’s machine but I keep getting the error “Missing a table” when I click on the “Yes” button in the popup dialog that appears after copying the VSTMenus.cnk file to the installation directory and starting the GP client.

*** Edit 2/2/2016 Please see the main article for this issue here: http://dyndeveloper.com/ArticleView.aspx?ArticleID=567

 

I checked version of the GP client and it’s the same as my development client install (11.00.1167).

 Is this a dictionary file issue or is there some other update that needs to be installed to use this addin?

 Any help you can give with this will be greatly appreciated.  We’ve been trying to install this addin for about 2 weeks with no luck.  So far I installed the addin on the development GP Client and on Vicki Nusz’s GP client with no errors. 


 
Is it possible to integrate a classic asp website with GP using web services or eConnect?

I'm getting

The destination could not be initialized due to the folowing problem: The RPC server is unavailable

and

DOC 1 ERROR: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

When trying to run an Integration Manager integration that ran successfully before

 

 

Sql procedure error codes returned:

Error Number = 7915  Stored Procedure= taUpdateCreateItemRcd  Error Description = The input number of decimals exceeds setup for currency decimal places
Node Identifier Parameters: taUpdateCreateItemRcd
ITEMNMBR = 0000000001
Related Error Code Parameters for Node : taUpdateCreateItemRcd
STNDCOST = Note: This parameter was not passed in, no value for the parameter will be returned.
CURRCOST = 227.2050
LISTPRCE = Note: This parameter was not passed in, no value for the parameter will be returned.

<taUpdateCreateItemRcd>
  <ITEMNMBR>0000000001</ITEMNMBR>
  <ITEMDESC>Batteries, NF-22, 50 amp AGM</ITEMDESC>
  <ITMCLSCD>00001</ITMCLSCD>
  <UOMSCHDL>EA</UOMSCHDL>
  <CURRCOST>227.2050</CURRCOST>
  <LOCNCODE>Pittsburgh</LOCNCODE>
  <UseItemClass>1</UseItemClass>
</taUpdateCreateItemRcd>

I am validating the Customer Number field on the Customer Maintenance window.  I have this working just fine using the CustomerNumber.LeaveAfterOriginal event.  My issue is when a customer is added on the fly from another window such as cash Receipts.  This event does not fire, in fact none of the field events seem to fire and the form event do not have the Customer Number value yet.  I realize I could put code on the other windows to validate before they reach the Customer Maintenance form, but I would rather keep all code on the same form if possible.  Anyone have any ideas?  I started playing with trapping Procedure events, but could not find the right one.

Thank a lot,

Darren

I'm having an irritating issue when trying to write to the event log on a 2008 server. My code that works everyplace else is failing with this error:

The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.