Link to home
Create AccountLog in
Avatar of taverny
taverny

asked on

move a field to another window with Modifier

HI Experts,

I am modifying a window in Microsoft Dynamics GP .
the window that I am modifying is the RMAEntryUpdate, in this window/form there is a button called user defined, when clicking on it 4 fields are shown to enter more detail info about the line item. I would like to have those 4 fields being display on the main window so we don't have to click the button everytime.
can someone help me on accomplishing this ?
I have modifier with VBA and extender .
Thanks
David
ASKER CERTIFIED SOLUTION
Avatar of Steve Endow
Steve Endow
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of taverny
taverny

ASKER

HI Steve,
thank you for the response. I am using GP10
I did a different approach but the same concept . yours might work better than mine if I can't fix the problem that occurs with mine.
I am working with the RMA Entry/update window. this is what I have done so far and I will describe the issue that I have after.
I created 2 fields in the "RMA entry/update detail "  which is the grid located at the bottom of the "Rma Entry/update window" , in the grid window there is a button called "User-Defined" and I am able to pull the data from those fields in my grid . so my code works fine. Now the problem is everytime I click a button located in the grid, it doesn't work right away , I need to click it twice . it seems like mike code run when the line in the gid is populated and also when I click away from the line .
if you think that my approach is not good and it is better to go directly against the database then I don't mind the approach that you told me.
below is the code that I currently have and the snapshot of the screen. ( the 2 fields that I am using are "Cust Part #" and "Requisition #" )  I also attached the snapshot of the user defined opened window and highlited.
thanks for your help.
David
Private Sub Grid_BeforeLinePopulate(RejectLine As Boolean)

RMALineUserDefinedFields.Open
StringM165.Value = RMALineUserDefinedFields.UserDefined3.Value
StringM166.Value = RMALineUserDefinedFields.UserDefined4.Value
RMALineUserDefinedFields.Close
RejectLine = False
'StringM166.Focus

End Sub

Open in new window

Capture.JPG
Hi,

Thank you for the screen shot. I have never used the RMA window, so I didn't realize that the user defined fields were at the line level.

In that case, your approach is correct, as you would want the fields in the grid, for each line, rather than on the main form.

Unfortunately, I have only done a few modifications to grids, so I am not familiar with the problem you are having of needing to click twice.  I do know that GP grids ("scrolling windows") are strange and annoying to modify.  

It sounds like you are nearly complete, but if you aren't able to resolve the clicking issue, let me know and I'll try and do a similar test to see if I can reproduce the issue and determine if there is a resolution.

Thanks,

Steve Endow
Dynamics GP Certified Trainer
Dynamics GP Certified Professional
Avatar of taverny

ASKER

Hi Steve,
well I am still having the issue , what I tried to do is to add in my code a move focus on a different field to see if this will solve the issue on the double click , but it seems to get cut in a loop that will crach Dynamics.
Do you think you can try to recreate the issue on your computer to troubleshoot mine.
Thanks
David
Hi David,

I have a few projects due, but I will try and do a test on Friday evening.

Steve
Avatar of taverny

ASKER

sounds good,
thanks
Avatar of taverny

ASKER

HI Steve,
I actually did it the way that you mentioned originally with the database directly and it works very well.
Thanks for your help

I have quite a few other questions that I opened , I am sure you can help on those as well here is the link if you are interrested:
https://www.experts-exchange.com/questions/26772902/How-to-Change-the-color-of-a-Field-In-dynamics.html