User Defined Required Fields

I have set several field on sub window Sales User-Defined Fields Entry of 
Sales Transaction Entry as "Required". If the user remembers to click 
User-Defined, then they become required. But if the user never clicks on 
User-Defined from Sales Transaction Entry, then they can still save the new 
document without the required fields entered. Does anyone know what I can do 
to fix this asside from continual user training?
0
AllenMc (95)
2/27/2009 2:59:02 PM
greatplains 29623 articles. 5 followers. Follow

2 Replies
532 Views

Similar Articles

[PageSpeed] 37

Your answer is VBA.  

You own Modifer, so you also have VBA enabled.  You'll need to write VBA 
code to open the window (literally, push the button) then set the change flag 
to true.  The user will be prompted to save (or not) the User Defined window. 
 Depending on your business needs, this may be enough.  You can also require 
a 'save' before the window can be closed thereby causing your required fields 
to be populated before the window is closed.

Kind regards,

Leslie
-- 
Leslie Vail, CPA, MCT, MVP
MCBSP-Application for Microsoft Dynamics GP
MCBSP-Installation and Configuration for Microsoft Dynamics GP
  cell: 972-814-8550
  fax: 972-692-7472



"AllenMc" wrote:

> I have set several field on sub window Sales User-Defined Fields Entry of 
> Sales Transaction Entry as "Required". If the user remembers to click 
> User-Defined, then they become required. But if the user never clicks on 
> User-Defined from Sales Transaction Entry, then they can still save the new 
> document without the required fields entered. Does anyone know what I can do 
> to fix this asside from continual user training?
0
2/27/2009 3:09:03 PM
You're in luck.  Check out KB 873871.  It explains exactly how to do
what Leslie describes.  Those steps are below.

You should check out Mariano's free VBA workshop this week to learn
more (http://dynamicsgpblogster.blogspot.com/2009/02/this-week-free-
visual-basic-for.html).

1. With the SOP Entry window open, go to the Tools menu and select
Modify Current Window.

2. Below the SOP Entry window layout area, find the 'Save Record'
field and move it onto the live window area. In addition, set the
Visible property to TRUE.

3. Go back into Great Plains and give the User ID security to the
modified form in the Security Setup window.

4. Open the Sales Trx Entry form and then add that window to VBA.
Also, add the 'Document Number' and 'Save Record' fields from that
window to your VBA project. Once this has occured, the Modified
version of the form is no longer required and security can be removed
from the form. Once you have done this, make sure to change the
EventMode to emOriginalOnly for this window in VBA.

5. Open the 'Sales User Defined' window and add this window, the 'OK'
button, and any fields that you wish to be required to your VBA
project using the Tools menu options.

6. In the VBA Editor, add the following code to the Sales Transaction
Entry (Window):


Public NewRecord As Boolean

Private Sub DocumentNo_AfterLostFocus()
	'this will only get run if entering a new record
	'because otherwise the field is locked
	NewRecord = True
End Sub

	Private Sub SaveRecord_BeforeUserChanged(KeepFocus As Boolean,
CancelLogic As Boolean)
	'this is the script that is actually doing the save
	'if this is still a "new record" because the user defined fields
	'haven't been entered then warn the user and cancel the save

	If NewRecord = True	Then

	MsgBox "User Defined Required fields must be entered before " & _
	 "transaction can be saved."
	CancelLogic = True
	End If

End Sub

Private Sub Window_AfterModalDialog(ByVal DlgType As DialogType,
PromptString As String, Control1String As String, Control2String As
String, Control3String As String, Answer As DialogCtrl)

Select Case PromptString
	 Case "Are you sure you want to delete this record?"
	 	 'if user deletes this invoice then we don't need to make our
fields
	 	 'required anymore. Tell our code this isn't "new" anymore
	 	 If Answer = dcButton1 Then
	 	 NewRecord = False
	 	 End If
	 Case "Are you sure you want to void this record?"
	 'if user voids this invoice then we don't need to make our fields
	 'required anymore. Tell our code this isn't "new" anymore
	 If Answer = dcButton1 Then
	 	 	 NewRecord = False
	 	 End If
End Select

End Sub



7. Add the following code to the Sales User Defined Fields Entry
window:


Private Sub OK_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As
Boolean)

	'Check to see if required fields filled in
	'if so, let sales trx entry know OK to save by
	'marking it as not "new"
	If SalesUserDefinedFieldsEntr.Required = True	Th
	SalesTransactionEntry.NewRecord = False
	End If
End Sub

Private Sub Window_BeforeOpen(OpenVisible As Boolean)

	'used VBA to make the fields required instead of modifier
	'since we're using VBA anyway
	'add any other fields necessary here
	UserDefined1.Required = True
	UserDefined2.Required = True
End Sub

0
michaelj2 (180)
3/1/2009 2:07:20 PM
Reply:

Similar Artilces:

Update Date/Time Field
I am trying to run an update query where if the Date/Time field is blank, I want it to enter today's date. Here's what I have: UPDATE Royalties SET Royalties.DatePaid = Now() WHERE (((Royalties.DatePaid)="IsNull")); I'm getting a data type mismatch, so I'm assuming that it has something to do with the "DatePaid" field being a date/time field. I'm self-taught in Access so I'm not too knowledgeable about what I could be missing to make this work. Could someone help me? Thank you so much!! WHERE IsNull([Royalties].[DatePaid]) = True You tried to...

New to User Forms
When I first found this site I was a crazy woman and just about read everthing. Thanks to all you folks who take the time to answer our qurestions. The one thing I cannot get to is a video/tutoraial on forms, the link was provided by somebody as an assist to another question. I loved the videos but was unable to complete the 3 or 4 part series and forgot to make it a favorite. Can anybody point me in the right direction or provide links to other training for starting forms? Thanks! Might have been Debra Dalgleish's site. http://www.contextures.on.ca/xlUserForm01.html Gord...

Want to change from Admin to User easily
Hi all, I usually run my PC as Administrator which I now know is dangerous, as it can let malware in and play with the system more easily. So I want to create a limited User account instead, but all my settings are under the Admin profile (eg. Quick Launch icons, file associations, and so on). Is there an easy way to migrate these to the User account, so that when I log in as User, my desktop is the same, icons are the same, etc? Thanks for any advice. a wrote: > Hi all, > > I usually run my PC as Administrator which I now know is dangerous, > as it can...

Users Shared Folders
Hi guys Can someone please put me out of my misery, and save me from spending another day or so wasting my time trying to find the answer. I just took delivery of new server with SBS 2003. Another company installed it for us. They set it up so that when you create a new user it automatically sets up a user folder in "c:\Users Shared Folders" I do not want that to happen there. I NEED it to happen in the D directory. I have read about moving existing folders etc etc. But I dont need to do that cause I have yet to set up the users, but will be shortly. All I want to...

Fetch user login information using JScript
Hi.. I am new to MS CRM. I am trying add custom HTML pages to the CRM which requires the user login information. I would like to know how to go about this and solve my problem Any help regarding this would be appreciated NN, I am not 100% sure of this but could you not just have the page use integrated authentication? Jeff Loucks 888-474-2237 MVP "NN" <NN@discussions.microsoft.com> wrote in message news:0E6BA8D5-2F2D-492B-8CB8-84284D04FF59@microsoft.com... > Hi.. > > I am new to MS CRM. I am trying add custom HTML pages to the CRM which > requires the user...

Help Require (Macro Save button )?????
Dear All, I have a form named form1 With following description. Po #. W.O # ses#. Contract #. Total Amount and Retention Amount. I want to generate a table where i can store all the above fields. I want a macro (Save button) in form so that if i click the Save button all the corresponding fields saved to Table. Please assist ? Help is deeply welcome. Attachment is for your ref. Rgds, Aligahk06 If your form is based on (bound to) the table, then the data saves automatically. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-...

Determining size of "autosized" user control
Given a user control that contains some kind of dynamic content (content I do not know the dimensions of at compilation time). This user control is then dropped into a Window, without specifying size. I am trying to determine the size of the content at runtime once it is defined. Take the following sample code: /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); MyUserControl ctrl = new MyUserControl(); ...

Users not showing up All Users
Exchange 2k3 on a SBS 2k3 box. I went in through AD Users+Computers, and created mailboxes for users. Two days later, the mailboxes still don't show up in Exchange System Admin-Recipients-All Addresses-All Users. As a matter of fact, the mailboxes aren't showing anywhere, and we're not able to send mail internally(external isn't a factor yet, as the box hasn't gone live). Strange part is, is that if I right click on All Users-Properties, then click on the Preview button under the General tab, all of the users+mailboxes show up. Is this normal? And on a second note...wha...

Clearing yes/no fields
I have a yes/no field that I tag if I want to send a bill to various people. After I have sent the bill I want to clear the field so I can use the field at a later time. Is there a way to do this? Do an update query and set the fields to No or 0 (zero). Make a copy of the database or table first just in case things go wrong. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Dan" wrote: > I have a yes/no field that I tag if I want to send a bill to various people. > After I have sent the bill I ...

user breakpoint
I use malloc in a thread,before the thread quit,I use free,cause pop up "user breakpoint called from code at 0x77f7f570" error. Debug output: HEAP[DownTradetrek.exe]: Heap block at 0037B1C8 modified at 0037DA00 past requested size of 2830 I don't know what happen.Thank for your help. "msg_du" <dch1237@msn.com> wrote in message news:uzRWBIO7DHA.1804@TK2MSFTNGP12.phx.gbl... > I use malloc in a thread,before the thread quit,I use free,cause pop up > "user breakpoint called from code at 0x77f7f570" error. > > Debug output: > HEAP[DownTrad...

User shows up 17x under logons under Mailbox
We have an office where all the users are displaying from 12-17 times under logons while everyone else displays only 3 or 4 times. What does this indicate? Does this indicate connections, being dropped then reconnected? TIA Are they running PDA synchronization software? -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "Greg" <Greg@discussions.microsoft.com> wrote in message news:F194F160-CC25-4068-A213-1D13FE73DD8E@microsoft.com... > We have an office where all the users are displaying from 12-17 times > under > logons w...

Need User Name and Password
Hello Everyone, I am reinstalling RMS 1.3 in a customer that their server crashed and need to reinstall everything from scratch... I do not remember the default user name and password for RMS 1.3.; I remember that is a number 1 or 2 (I think) but do not remember the password! Thanks for your Help in Advance Rommel J Jimenez try Password or password if that doesn't work, look it up with the sql statement: select * from cashier "Rommel J. Jimenez" wrote: > Hello Everyone, > > I am reinstalling RMS 1.3 in a customer that their server crashed and need > to r...

Best method to allow two users to make edits to the same Excel File
I am trying to determine what is the best method to allow two users to simultaneously make edits to the same Excel file. It is VERY rare that we will ever be typing in the same Cell as the other person, but we both need to work out of the same workbook at the same time. We are working in two separate locations, by the way. Is using Dropbox along with "Tools > Share Workbook" the way to go? Or should I use Google Docs? Or possibly Sharepoint? Or Excel 2010 Web Aps? The main question I am trying to answer is "what actually works" and is generally hassle free. Thanks fo...

Moving Pivot Chart Fields on a chart sheet
Does anyone know how I would move a field after my pivot chart is created? The value button is right in the way of my pie chart and the program is not allowing me to move it out of the way of the % w/leader lines. Thanks You can hide the field buttons: On the pivot toolbar, choose PivotChart>Hide Pivot Chart Field buttons sherobot wrote: > Does anyone know how I would move a field after my pivot chart is created? > The value button is right in the way of my pie chart and the program is not > allowing me to move it out of the way of the % w/leader lines. > > Thanks &...

Random Users Calendars not viewable
We recently moved our Exchange 2003 server to another machine. Since doing so, we have random users whose calendar will only apear as \\\\\\ when we try to invite them to a meeting. I have tried to replicate the Schedule+ Free Busy folder but this has not worked either. Any suggestions? On Tue, 12 Sep 2006 04:32:01 -0700, Kevin <Kevin@discussions.microsoft.com> wrote: >We recently moved our Exchange 2003 server to another machine. Since doing >so, we have random users whose calendar will only apear as \\\\\\ when we >try to invite them to a meeting. I have tried to...

Manager grayed out on user setup
After adding a user, I want to change the manager (which is blank at the moment) but the manager field is grayed out, as a result, I can't change this field. Any suggestions? On the users detail form, go to the Actions menu. There will be an option there to change the manager. Matt Parks MVP - Microsoft CRM ---------------------------------------- ---------------------------------------- On Thu, 13 Jan 2005 07:37:07 -0800, idtpes <idtpes@discussions.microsoft.com> wrote: After adding a user, I want to change the manager (which is blank at the moment) but the manager field ...

Lotus user to Outlook user Attachments missing
Hi everyone, I have a strange problem that hopefully someone can help with or maybe point me in the right direction. Infrastructure info: All our clients are running Office 2007 SP2 and we have Exchange 2007 SP1 as our backend. We have a client that has Lotus Notes and sends us many emails per day and almost always they have attachments but usually PDF's, JPG's and DOC's. We have just discovered that they occasionally send us scanned docs in MDI format. The problem is that it appears as though when the client running Lotus attached an MDI file and sends the ema...

Link table field format puzzle
I have one issue that doesn't make sense. Maybe some expert could help. I have one table in MS SQL (2005), there are two fields. GrossCost Numeric(15,2) NetCost Numeric(15,2) When I did an ODBC link table inside MS Access XP, the format of the two fields are different. For example, GrossCost will show 16.00 and NetCost will show 16 I open the link table in design view and find out the GrossCost's [format] property are set to 'Fixed' while the NetCost's [format] property are blank. Why Access treat the two fields differently if they have exact the same f...

Returning a label rather than a number in pivot table field
I am new to pivot tables and have managed to create a few that show the desired data. However, I would like the value returned to be the name of a company rather than a number. Is this possible? For example, I have company types in the column (e.g. small & big) and geographic location in rows (e.g. Europe & North America). The data shown in the pivot table is minimum, maximum and average. However, I would like the company name instead of the minimum value. I know that I can right-click and show details, but that is all the data, not just for the particular cell. ...

Required Cell
In any given row, if the cell in column A of that row has a value entered, I want it required that a user choose something from a dropdown menu in column D. How can I do this in Excel? Tue, 19 Feb 2008 15:53:00 -0800 from Bryan <Bryan@discussions.microsoft.com>: > In any given row, if the cell in column A of that row has a value > entered, I want it required that a user choose something from a > dropdown menu in column D. How can I do this in Excel? You'll have to write a VBA macro, I think for the Worksheet_Change or Worksheet_Open event depending on what you mean by...

Cannot see full email address in From field
If a message is forwarded, I cannot see the email address from the original sender(s) or those CC'd. They show a displayed name. Is this a setting on my client or is it done on the sender's client? BTW, this happens on Outlook 2000 and 2003. Thanks, Francis ...

Increase field size
One of the fields we would like to be extended is Description field from payables Transactions window (Trans - Purchasing - Trans. Entry) How can we increase the fieldsize to take more characters. Rick Rick, You cannot modify field sizes on Dynamics table. Your best option in this case would be to use the document note. If you don't want to use a note here is a high level overview of what you would need to do. You would need to create a new table that contains the same keys as the Payables Transaction table. Your new table would contain any additional fields that you want to ma...

users sending messages to themselves
Hello all, I'm running a Exchange 2000 server w SP3 on W2K box w SP4. I have some users who have this old habit of sending a copy of out going message to themselves when they compose a new message by cc or bcc or even To field. I ask them not to do but they are still doing it. Is there a way (may be a script or rule or anything in Exchange or third party software) to stop this. I was told by someone that there is nothing of that nature but I'm still not convinced. There's gotta be a way. Thanks Raj Bambrah Why not let them do whatever they damn well please? Raj Bambrah wro...

IMF and remote users.
I need a bit of hand holding on this. We are about to start hosting our own email. There are branch offices that will pick up their email with POP3 from our server running SBS 2003. I want to filter for spam, but also want all the users to have the ability to review emails caught by the filter. If I use the IMF filter, am I correct in assuming that the remote office users will never see those emails in that they will have been moved out of their inbox to the spam folder? Is there a built-in method of tagging, not moving emails identified as spam on a RBL? Thank you. - Are you going to use ...

Preventing a user from seing other users opportunities
Hi, I have a case in which 2 CRM users (A) & (B) shouldn't see each other's opportunities and this is indeed the case. However, when a user (A) creates an opportunity for which the account is owned by user (B), user (B) is then able to see this user (A) opportunity. I understand that this might be logical business wise, however, is there any way to prevent user (B) from seing these opportunities of user (A) even though he is the owner of the opportunity account ?? Thanks in advance I don't believe this is possible but I could be wrong. Darren Liu, Microsoft CRM MVP...