Wednesday, February 20, 2013

Finding Duplicate GL Entries

I faced an interesting dilemma this past week, in trying to locate duplicate GL entries integrated from another system.  Obviously, GP doesn't know they are duplicates and assigned each one a unique journal entry number.  So we had to find a way to locate the duplicates, and then only remove the duplicates (not the originating entries that needed to remain).

So what to do...

--First, I started with identifying the GL20000 that would be needed to identify the duplicates
SELECT OPENYEAR, JRNENTRY, SOURCDOC, REFRENCE, DSCRIPTN, TRXDATE,ACTINDX, ORGNTSRC, CRDTAMNT,DEBITAMT, DEX_ROW_ID as DEXROW1,


--Then I used, for the first time, ROW_NUMBER and PARTITION BY to essentially assign an index number to each duplicate.  So the first record would be 1, the first duplicate would be 2, the second duplicate would be 3 for each set of identical records.  This would help me isolate all of the "1"s as the records that should remain (the original entries) and anything greater than 1 as a duplicate to remove.  The PARTITION BY function let me reset the numbering for each set of duplicate records.
ROW_NUMBER() OVER (PARTITION BY SOURCDOC, REFRENCE, DSCRIPTN, TRXDATE,ACTINDX, ORGNTSRC, CRDTAMNT,DEBITAMT ORDER BY JRNENTRY)

--Fortunately, the integration passed information in to the originating source field that we could use to isolate entries from the integration only.

FROM GL20000 GL1 WHERE ORGNTSRC LIKE 'TheIntegrationHadAUniqueValueHere%'

--Next, I joined back to the GL20000 and grouped it to find only those record with actual duplicates (COUNT(*)>1). So anything that wasn't duplicated, wasn't returned.
AND ((GL1.REFRENCE IN (SELECT GL1.REFRENCE FROM GL20000 AS TMP GROUP BY REFRENCE, DSCRIPTN,TRXDATE,ACTINDX,ORGNTSRC,CRDTAMNT,DEBITAMT HAVING COUNT (*)>1 AND REFRENCE=GL1.REFRENCE AND DSCRIPTN=GL1.DSCRIPTN AND TRXDATE=GL1.TRXDATE AND ACTINDX=GL1.ACTINDX AND ORGNTSRC=GL1.ORGNTSRC AND CRDTAMNT=GL1.CRDTAMNT AND DEBITAMT=GL1.DEBITAMT)))
So I ended up my result set of duplicated records, I was then able to eliminate the records with a row number of 1 as the original entries.  The only thing I missed, and had to identify manually was a situation where there were duplicate debits or credits within a single journal entry.  So, for example, two debits in one journal entry both for $110.  I had a handful of those, and they caused my identified duplicate entries to not balance.  Once I identified those (using a calculation in Excel to net debits and credits for each line after sorting the duplicates together), then my identified duplicates balanced debits to credits.

I know that there may be a more elegant way to accomplish this, but this worked and reconciled to the expected duplicates so I thought I would share in case someone else comes up against this.

Monday, February 18, 2013

Skype very slow on Windows 7

I've been using Skype regularly for 3-4 years now to have almost daily calls with a colleague in Australia.  While it has generally worked well, one problem I've had in the last year is that the Skype application has seemed extremely slow and unresponsive.

For instance, when I place a call on Skype, it may take 10 seconds for it to start to ring.  And then once the person picks up the call, Skype continues to ring for 10 more seconds, even though I'm talking to someone already.  Ending a call is similar--I click to hang up the call, but it takes 10 seconds to actually hang up.  And overall, the Skype application was often extremely unresponsive, taking several seconds to show any buttons or to move its windows.

I finally started Googling this issue over the weekend, and found this YouTube video offering a potential fix

The video recommends deleting all of the Skype files in the %AppData% directory.

  1. Click on Start -> Run
  2. Type %appdata% and press Enter
  3. When Windows Explorer opens, locate the Skype directory
  4. Delete the entire Skype directory

I followed the instructions, relaunched Skype, logged in, and based on the one call I've made so far, it seems to be working much better.  No lags, no odd behaviors, and starting and stopping the call was smooth and snappy.

I was very much dreading the recent announcement that MS was transitioning MS Live Messenger to Skype, but if this quick fix worked, I won't mind using Skype any more.

UPDATE:  I used Skype several times today and it worked perfectly--incredibly responsive.  Such an improvement!


Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified IT Professional in Los Angeles.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

http://www.precipioservices.com

Monday, February 11, 2013

Cool Tool for Fixing 1099s

Sometimes when you search for a fix, just hoping that there is a simple way to fix an issue, you find it.  I came across this today, not realizing it was part of the Professional Services Toolkit.  Super cool in my book, it fixes transactions that were recorded before a vendor was marked as 1099.

http://support.microsoft.com/kb/857377

Check it out :)  Happy Monday!

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a supervising consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.





Tuesday, February 5, 2013

Generating a 941 for 2012, Really?

Do you really have to reapply the 2012 tax tables in order to run a 941 for 2012 in Dynamics GP...say it ain't so.  Anyone out there with clever ideas, please share!

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a supervising consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.


Correcting FICA Underwithholding

Why does the government mess with us so?  Especially in the month of January, where we are already running around trying to get 1099s and W2s out the door.  As it goes, anytime there is a change in either FICA rate, inevitably somebody doesn't apply the tax update before they run payrolls in the new year.  And then FICA is incorrect for some/all/a few employees. 

Earlier this week, I received the first of a series of calls from clients who had no applied the update before running payrolls in 2013.  So FICA/S was withheld at 4.2% instead of the new (old) rate of 6.2%.  Looking for an elegant solution (involving the least amount of work), I went looking for other opinions and found the following community conversation...

http://community.dynamics.com/product/gp/f/32/p/97832/185280.aspx

Quite a few different approaches are tossed out there by a variety of well-qualified contributors :)  But, I have found the following process (gleaned from the discussion) to work best for most situations.

  1. Determine the amount of social security to be added to each employee
  2. Transactions>>Payroll>>Manual Checks
    1. Enter a Beginning Balance type transaction for each employee, taking care to make sure all dates are in the appropriate month
    2. Click Transactions
    3. Enter a FICA Social Security transaction type (for employee underwithholding)
    4. Enter the additional tax amount to be added to their FICA social security
    5. Leave taxable wages as zero, since the wages were already counted towards FICA wages
  3. If you wanted to, you could then record a second transaction for each employee on the same manual check
    1. Federal Tax transaction type
    2. Enter a NEGATIVE tax amount equal to the FICA/S adjustment entered above
    3. Leave taxable wages was zero, since the wages were already counted towards Federal wages
    4. This would effectively move a portion of their Fed withholding to FICA/S so there would not be an additional cost to the employer and/or no need to collect additional from the employee
Now, in some scenarios, you might be concerned that a) the person didn't have enough in federal tax to cover the underwithheld amount and b) they may terminate before you can recover it.  In that case, you could set up a transaction-required deduction (NOT tax sheltered).  You can use that to recover the underwithheld FICA/S and then use the same process as above to move the amount to FICA/S from the Deduction (rather than from Federal Tax).

Feel free to share your questions and comments :)

Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a supervising consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.

Monday, February 4, 2013

Dynamics GP security conundrum

Today I was helping a customer install Post Master Enterprise for Dynamics GP in a development environment for testing.  It should have been a simple process, taking maybe 15 minutes--but after an hour, we had to stop and reassess.

The Post Master Enterprise installation requires the 'sa' SQL Server login, or an equivalent login, which allows it to create SQL tables and stored procedures.   The IT admin at the customer site wasn't sure if he had the correct sa password, so we attempted to login to Dynamics GP first.  He entered the sa username, then tried to paste in the long password.  But the password would not paste.

If you've ever had a problem pasting a value into a GP field, you probably know that a very common reason is that the value you are pasting is longer than the GP field length.  So when the password didn't paste, I was puzzled.  I had never checked the max password length for GP--turns out it is 15 characters. 

When the IT admin counted the characters in the sa password he had documented, it was longer than 15 characters.  Hmmmm.  That is pretty strange.

Since we wanted to login to GP as 'sa' to setup a new GP user, the IT admin reset the sa password on the development SQL Server, making sure to keep it 15 characters.  With that done, he launched GP and logged in as 'sa'.

GP eventually loaded, but the annoying "you do not have permission to open this window" message appeared several times.  We then sat and waited for the menus to display.  The Reports menu appeared, but nothing else.  When he clicked on the Dynamics menu, there were very few options.  We were unable to access any of the Setup menus when logged in as 'sa'.

Not good.

So then I asked if he knew the DYNSA password.  Unfortunately, the dev server had been setup by a former employee, so he didn't know the DYNSA password.  And unfortunately, the DYNSA password cannot be changed from SQL Server Management Studio--it must be changed within GP.

So...the sa login doesn't have any permissions in GP.  And we can't login as DYNSA.  Quite a conundrum.  Without sa permissions in GP, without the DYNSA password, and without knowing any other GP passwords for the dev environment, there wasn't much we go do to get into GP, let alone modify user access for testing with Post Master.

That's when I stopped the process and scheduled a second call--things just weren't going well.

After weighing some options, I figure that the easiest initial approach will be to try and modify the GP security records in the DYNAMICS database to try and restore Power User access to the 'sa' login.

I'll start by checking the security roles assigned to the sa login:

SELECT * FROM DYNAMICS..SY10500 WHERE USERID = 'sa'

And out of curiosity, I'll want to see if any users are assigned to Power User:

SELECT * FROM DYNAMICS..SY10500 WHERE SECURITYROLEID = 'POWERUSER'

And then I'll try and insert a record into SY10500 to try and assign the Power User role to the 'sa' login.

INSERT INTO DYNAMICS..SY10500 (USERID, CMPANYID, SECURITYROLEID) VALUES ('sa', -1, 'POWERUSER')

This, in theory, should allow us to login to the Fabrikam company with 'sa' as a Power User.

From there, I'll have to see what other surprises await us.

The client could also restore the DYNAMICS database to the dev environment--and we may just do that to refresh the environment while solving the security issue.  But I haven't yet seen their production environment, so I don't know if there are any oddities there as well.


Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified IT Professional in Los Angeles.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

http://www.precipioservices.com


Wednesday, January 23, 2013

OS X vs. Windows

In 2011, I wrote about my initial impressions of a Macbook Air that I had purchased.  At that time, I only wanted the sleek hardware for a new Windows laptop, and I never considered running OS X.  After all, I am a Dynamics GP consultant, a Dynamics GP developer, and my entire world, and that of my clients, is based on Windows applications.

Well, after getting the Macbook Air, I've been coveting the Mac Mini.  I have had relatively bulky mid-tower style PCs as my desktop workstation for almost 20 years, so the incredibly small form factor of the Mac Mini was very appealing.

Over the last year, I've also wondered what it would be like to try and use OS X.  Since I now do all of my development on virtual servers, I no longer install SQL Server, Dynamics GP, or my development tools on my workstation--I do all of my GP related work using Remote Desktop.  MS Office, Firefox, and Remote Desktop probably represent 95% of my work on my desktop computer.  And with multi-platform and "cloud" apps like SugarSync, Carbonite, RoboForm, GoToMeeting, SnagIt, Skype, Evernote, and Spotify, I figured that nearly all of my applications would be available on OS X, just like many of them are available on iPhone and Android phones.

With the release of the updated 2012 Mac Mini, which FINALLY included USB 3 ports, I went ahead and ordered a Mini.  The USB 3 ports were critical for me, since I planned on having an external drive for storing many gigabytes of photos and videos, as well as for full system backups.

I had several days of dizzying disorientation and frustration at first, but after a few thousand Google searches to learn how to use OS X, I eventually became moderately proficient.  After about 2 weeks of part time use, I was able to do almost everything I needed to on OS X with relatively few compromises, and could still interface with the Windows-centric world of Microsoft Dynamics GP consulting and software development.

I'm now fairly comfortable with OS X, and confident that if I had to use Macs exclusively, I could certainly do so.  However, after a few weeks of using OS X, I have decided that for me and my particular work, Windows is significantly more efficient for me to use on a day to day basis.

First, some of the things I appreciated:

1. OS X on Apple hardware can be shockingly fast.   When booting up and resuming from sleep, OS X left my Windows PC in the dust.  And responsiveness and application performance were excellent.  Obviously Apple has a massive advantage here, since it designs the hardware and the OS and doesn't have to deal with the Tower of Babel of hardware that Windows and PCs face.  But the end result is significant.

2. The Time Machine backup utility is like magic.  If you have ever tried to manage Windows system backups, you probably know that most Windows backup software simply sucks.  You may find a backup solution that works, but it isn't pretty, and you often don't really know whether a restore will work when you need it, since it's such a hassle to test system restores.  Time Machine, by contrast, has one primary option:  On or Off.  You choose a destination disk, then click the On switch, and it just does its magic.

3. The application architecture is beautifully simple (or at least it appears to be beautifully simple).  Need to install that utility?  Just drag it to the Application folder.  Some applications used an installer, but the application install and uninstall process was incredibly elegant compared to the hornet nest of Windows MSI installs, DLL files, registry entries, byzantine Windows and application directories, and crazy disk consumption. 

4. Spotlight rocks.  Years ago there was a wave of desktop search tools for Windows.  Some worked okay, some were horrible.  I purchased X1 Desktop Search for Windows, which is very powerful and met my needs.  But it was an add on and has its quirks.  Well, Spotlight appears to be a near perfect desktop search tool.  It's extremely fast, very accurate, and eliminates many tedious tasks that are typically performed in Windows, such as navigating around in Windows Explorer. 

5. Boot Camp and Windows VM software make running Windows on a Mac a breeze.  Boot Camp makes it shockingly easy to install Windows directly on the Mac.  Just tell it how much space you want for your Windows partition, then click a few times, and presto, the machine restarts and begins the Windows installation process from a USB drive.  And although I haven't tried it, it seems that Parallels for Mac, which lets you run a Windows virtual machine within OS X, works very well also.



While I appreciated those aspects of OS X, there were a few key things didn't work well for me in OS X.

1. SMB file sharing doesn't work.  I use such shares a lot to transfer files between my virtual servers and my workstation, so I setup file sharing on the Mini and it appeared to work great.  It only took a few clicks and I was able to access the Mac shares from my Windows machines.  Well, a few days later, I tried to actually use the Mac shares, and it didn't work. Windows said that my password wasn't correct, but it definitely was correct.  After a few hours of searching, I found that apparently SMB was broken in OS X 10.7.  It works when first setup, but then it simply stops working.  You have to turn off sharing, then turn it back on to restart the SMB service, and then it will work again for a while, but will eventually stop working again.  On the server version of OS X, this restart can be done via script, so server admins were scheduling a task to constantly restart the SMB service.  But on the desktop OS X, I was unable to find a way to automate this workaround.  There is a third party Windows networking product by Thursby Software called DAVE that looked very promising, but within 30 minutes of testing it, I ran into a glaring bug--you can see the Mac shares from a Windows machine, but you can't copy or paste any files on the Mac share.  Thursby let me know this is a bug they are working to fix, but the fact that neither Apple nor an add-on app can get Windows networking to work reliably was not a good sign.  (There are other workarounds like installing Samba, but there are drawbacks that I wasn't willing to deal with).

2. The keyboard is a second class citizen in OS X.  When I use Windows, I try and use the keyboard as much as possible, and the mouse as little as possible.  For instance, I can press ALT+E, S, V in Excel a whole lot faster than I can use a mouse to try and use the Paste Special command.  I am constantly using CTRL+C, X, V, Z, Y, A, S, F, among others.  I regularly use F2, F3, F4, F5 in typical Windows apps, and CTRL+Home, End, Up, Down, Left, Right, and Page Up, Page Down all get a workout on a daily basis.  Although there are some equivalents for these shortcuts in OS X, I found that the placement of the Command key makes it much more awkward to use for many of the shortcuts, and many of the shortcuts involved things like Shift+Command+(key), which felt like Keyboard Twister compared to Windows.  Over time, I saw that although there were many keyboard shortcuts, many seemed like afterthoughts.  Many were bizarre two-handed contortions that defeated the purpose of keyboard shortcut.  I also assessed that many things on the Mac were simply assumed to be tasks that would be performed by the mouse.  While the mouse worked fine, it was just much slower for many tasks.  OS X did have a great utility to add keyboard shortcuts and remap shortcuts, but that led to a lot of non-standard custom shortcuts that would then interfere with other shortcuts in some applications.

3.  The vaunted Mac does have bugs, quirks, and issues.  Before using the Mac Mini and OS X, I had the perception that Macs worked perfectly, or nearly so.  I now believe that Macs have just as many issues as Windows PCs, but just in different areas and perhaps in less critical areas.  The Apple forums are filled with all sorts of problems, so it didn't take me long to realize that my perception of Macs was not well grounded, and I ran into my own issues to prove the point.  In my case, there were a few such issues that prevented me from continuing to use OS X.  First, I learned that OS X doesn't seem to fully support Wake On LAN, at least not anymore.  A WOL packet does seem to partially wake a sleeping Mac Mini, but it does not wake it fully, or does not wake the video card or displays.  This means that if I enable sleep on the Mini, I can't send the WOL packet and connect remotely like I can with my Windows workstation.  There might be some other solution, but I gave up looking.  More critically, I found that when the Mini has been sleeping for a while, after it wakes, I am unable to login.  I either see a black screen or the screen saver, and pressing the keyboard or using the mouse does nothing.  I have to press the power button to try and get it to sleep and wake again (which occasionally works), or I have to hard reset the machine by holding the power button for several seconds.  I found an Apple forum post that indicated that others had this issue, but it isn't clear if it is due to HDMI connections, monitor input selection, some other hardware factor, or an OS X bug.  Regardless, with my monitors, I was having to hard reset the Mini every morning just to login, which is something I definitely don't have to do with my Windows 7 workstation.  I suspect that Macbooks and iMacs probably don't have this issue, so it may be unique to the Mac Mini.

4.  Font sizes are the deal killer.  Even if everything worked perfectly with OS X and the three issues I've listed above were fully resolved, the one thing that appears to be unresolvable is the difference in font sizes between Mac and Windows.  For technical reasons that are at the edge of my knowledge, a 14pt font on the Mac will look more like a 10pt font on Windows.  A 10pt font on Windows will look more like a 7pt font on the Mac.  Basically, all fonts end up being about 25-30% smaller on a Mac than they are on Windows.  This means that if a client sends me a Word document in 10pt Arial, it's virtually unreadable on the Mac.  I have to zoom to 130%-140% to make the document look like it does it Windows.  If I save that document and send it back to a client, it opens at 130% on Windows and looks comically massive, and they then have to zoom out to read the document normally.  This is a major problem for me, since it either constantly inconveniences me, or I end up inconveniencing my clients who all use Windows.  For this issue, I don't believe there is any workaround.  Due to the way fonts are rendered and sized in OS X and Windows, there is simply no way to make a Mac render fonts the same way that Windows does.  This was the LAST thing that I would have expected to cause me to give up OS X.  I thought it would be the user interface, or some critical app that wasn't available on OS X.  Nope, it turned out to be fonts.


There are plenty of other pros and cons, and there are dozens of other requirements and considerations that I didn't cover, but those were just some of the prominent items that come to mind.  For other roles, other purposes, other requirements, and other environments, OS X can probably be a great solution if you don't mind spending a lot more money on the hardware.

So, now that I've learned a little bit about OS X, I'm going to install a large SSD in the Mac Mini, install Windows 7, and get back to work.  With that, I'll have the hardware of the Mini, with the Windows OS that works best for me.

Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified IT Professional in Los Angeles.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

http://www.precipioservices.com