Archives

 

Sirs:

Using Visual Studio Tools for Dynamics GP, I need to know how to save custom fields on the SOP Transaction Entry form.

I am able to see the fields in the .NET environment, my question goes to how we should trap the 'save' event in GP.

In VBA, I would put code behind the SAVE button, and I would also have to trap the Modal Dialog events to see if the form was saving before a print or a navigation event.

Is there an easier way to see if someone is saving the form?

Using VS Tools for GP9, I am opening the Sales Transaction Entry window using this code:

Dynamics.Forms.SopEntry.Functions.OpenWindow.Invoke(strSopnumber, intSopType, False, "", 0)

I need to open the Sales Transaction Inquiry Zoom window (I want to display a historical sop document) I'm thinking that the code should be something like this:

Dynamics.Forms.SopInquiry.Functions.OpenWindow.Invoke(intSopType, strSopnumber, ?,?, ?, ?) but I can't find any documentation for the function. I'm looking in the SOP docs in the SDK, but not seeing any references to inquiry forms. Can you help?

Sirs:

I'm trying to get the next available Master Number or Sop Number in SOP Entry.

I can see in the SDK: SOPGLBS.doc that there are functions called Get_Number of form SOP_Entry and Get_Master_Number of form SOP_Entry that appear to do what I want, but I can't find a way to call them from VS Tools.

I was thinking that I would find them under Dynamics.Forms.SopEntry.Functions or Dynamics.Forms.SopEntry, but no luck.

sirs:

Is there a way to open a custom form as a MDI child of the GP window? In VB, we would:

dim frm as new MyFormName

frm.mdiparent = Me

frm.show

What Im doing now opens the form as a separate application.

Sirs:

I'm trying to get the hang of Visual Studio Tools for GP9, but I'm having trouble using a function:

I need to (from a custom form) navigate to specific SOP orders.

I am able to save the SOP form, and close it if I need to, but I can't navigate to a new order. Patrick (on the GP forums) suggested using Microsoft.Dexterity.Applications.DynamicsDictionary.SopEntryForm.OpenWindowFunction, but I can't figure out how to use it. I need a VB code sample, please.

Again, the task is to navigate to a specific SOP order in the SOP entry form. The form can start as either open or closed.

Thanks!

Using the code:

AddHandler Dynamics.Forms.SopEntry.SopEntry.SopNumber.Change, AddressOf Sopnumber_change

I am able to get custom VB code to run when the sopnumber changes in the SOP Transaction entry form. Almost there... I need code to run when I press a CUSTOM button in the same form. For example, I use Modifier to add a button called 'myLookup'. I need custom code to run when I press this button, and then to return data to a custom text field called 'myTextField'.

Since the Dexterity Bridge is not aware of these fields, I can't see a way to create/trap events on these fields or send data to them.

INTRODUCTION

This article describes how to register an event handler by using Microsoft Visual Basic .NET in Visual Studio Tools for Microsoft Dynamics GP. Visual Studio Tools for Microsoft Dynamics GP is available together with Microsoft Dynamics GP 9.0 Service Pack 1 (SP1).

Note You can also use Microsoft Visual C# to perform this operation. However, the syntax for Visual C# differs slightly from the syntax for Visual Basic .NET.

Sirs:

I am trying to validate the quantity field on the SOP Transaction Entry form, and cancel a change based on business logic. I am using the following code:

 

AddHandler Dynamics.Forms.SopEntry.SopEntry.LineScroll.Qty.ValidateBeforeOriginal, AddressOf oSOPTransEntDetail.qtyValidate

 

 

and the event that fires is this one:

 

Sub qtyValidate(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)

        MsgBox("This item has begun shipping. Quantity increases are not allowed.")

        e.Cancel = True

 

End Sub

 

The event fires, the message box displays, but the edit to the field does not cancel. Is there a bug in the 'validateBeforeOriginal'? Have I done something wrong?

 

Sirs:

I need to be able to set a quote as 'repeating' programatically.

 

I tried using a trigger, but that approach isn't smooth - if the user opens the 'sales document detail entry' window, it does not reflect the database condition.

 

I can't seem to access that form from code using:

Dynamics.Forms.SopDocumentDetailEntry.SopDocumentDetailEntry

--probably because the form is not open.

 

Can you suggest a smooth way to do this from code? I'd like to use VS Tools, and avoid VBA if possible.

Sirs:

I am changing the value of a field on the RM Customer Maintenance form, but the user is not being prompted to save the changes. For example:

 

Dynamics.forms.rmcustomermaintenance.rmcustomermaintenance.address3.value = "somevalue"

 

In VBA, I would code:

me.changed = true

 

I can't seem to find this in VS Tools for Dynamics GP. Can you suggest a solution? If the answer is already documented, could you point me to that?

 

Thanks!

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3