{"id":664,"date":"2012-12-14T10:01:01","date_gmt":"2012-12-14T16:01:01","guid":{"rendered":"http:\/\/www.iqaccountingsolutions.com\/blog\/?p=664"},"modified":"2012-12-14T10:01:01","modified_gmt":"2012-12-14T16:01:01","slug":"fixing-the-payroll-error-exception-has-been-thrown-by-the-target-of-an-invocation","status":"publish","type":"post","link":"https:\/\/www.iqaccountingsolutions.com\/blog\/fixing-the-payroll-error-exception-has-been-thrown-by-the-target-of-an-invocation\/","title":{"rendered":"Fixing the payroll error &#8220;Exception has been thrown by the target of an invocation&#8221;"},"content":{"rendered":"<p>Here is a scenario I sometimes get calls about right after a new tax update releases.\u00a0 You go to do payroll and get an error message that goes something like &#8220;Could not find 401K EE 12 single calculation&#8221;.\u00a0 Or in version 2013 it has been updated to say &#8220;The following formula listed on the Employee record does not exist in Payroll Formulas &#8230; To correct this, select File, Payroll Formulas, User-Maintainted and add this formula.&#8221;\u00a0 But when you try to open the User-Maintained Tax Table you get an error message that says <em>&#8220;A Managed exception was caught.\u00a0 The error is &#8216;Exception has been thrown by the target of an invocation.&#8221;<\/em><\/p>\n<p>This error means that there is a problem in the user-maintained tax table.\u00a0 It may mean that the file was damaged.\u00a0 But if the error appeared after a tax update was installed there is another likely explanation.<\/p>\n<p>The User-Maintained tax table is stored in the folder with your company&#8217;s data.\u00a0 The Sage-Maintained tax table is stored in you data path.\u00a0 Both files are named <em>taxtable.dat<\/em>.\u00a0 If your data is in the folder <em>C:\\Sage\\Peachtree\\Company\\myname<\/em>, then your data path is <em>C:\\Sage\\Peachtree\\Company<\/em>.\u00a0 It&#8217;s called the data path because each company&#8217;s data folder will be stored here.\u00a0 During the installation of the tax update you are asked for your data path.\u00a0 If you direct it to C:\\Sage\\Peachtree\\Company\\myname instead of C:\\Sage\\Peachtree\\Company the taxtable.dat that was your user maintained tax table will be replaced by the taxtable.dat that was supposed to become the new Sage-Maintained tax table.<\/p>\n<p>To fix the error you need to restore a backup of the taxtable.dat that is your user-maintained tax table.\u00a0 You could restore a your whole Sage 50 company, but then you would have to re-enter everything that had been entered since that backup was made.\u00a0 Here are two ways you can restore just your user-maintained tax table.<\/p>\n<ul>\n<li>If you make backups of your data outside of Sage 50\/Peachtree, you can restore just the taxtable.dat that is in your company&#8217;s folder. If you don&#8217;t know which folder your company is in, open your company in Sage 50, go to the <em>Maintain <\/em>menu and choose\u00a0<em>Company Information<\/em>.\u00a0 The <em>Directory<\/em> field displays your company&#8217;s location.<\/li>\n<li>If you made a backup in Sage 50\/Peachtree, go to the Windows <em>Start<\/em> button and choose <em>Computer<\/em> or <em>My Computer<\/em>, depending on your version of Windows.\u00a0 Then browse to the location where you saved the backup.\u00a0 Right click on the backup file and choose <em>Rename<\/em>.\u00a0 Change the extension from .PTB to .ZIP.\u00a0 Depending on your settings in Windows, you may not see the .PTB extension.\u00a0 In that case, add a quotation mark at the beginning of the file name and\u00a0 <em>.ZIP<\/em>&#8221; (including the period and quotation mark) to the end of the file name.\u00a0 So if the file name was <em>My Company-121512<\/em> you need to make it <em>&#8220;My Company-121512.ZIP&#8221;<\/em> including the quotation marks.\u00a0 When you press <em>Enter<\/em> to save your change, the quotation marks, and possibly the <em>.ZIP<\/em> will go away.\u00a0 Now double click on the file to open it.\u00a0 It should open up just as of you had opened a folder.\u00a0 Find TAXTABLE.DAT, right click on it and choose <em>Copy<\/em>.\u00a0 Then navigate to your company&#8217;s folder and paste the file into this folder.\u00a0 When prompted, choose to replace the existing taxtable.dat file.\u00a0 If you want to be cautious, you could rename that file to taxtable.old before pasting the new file so that you can undo your changes if you need to.<\/li>\n<\/ul>\n<p>It&#8217;s also a good idea to re-install the last tax update to be sure your Sage-Maintained tax tables are properly updated.\u00a0 With Sage 50 \/Peachtree closed, go the the folder that is your data path (<em>C:\\Sage\\Peachtree\\Company<\/em> in the example above), double click on the <em>Updates<\/em> folder, find the most recent tax update and double click to install it.\u00a0 Be sure to give it the correct data location this time.<\/p>\n<p>DO NOT try restoring individual data files other than taxtable.dat.\u00a0 Most of them contain links to data in many other files, so if you don&#8217;t restore the whole company you will usually create a worse problem than you started with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Sage 50\/Peachtree the error &#8220;Exception has been thrown by the target of an invocation&#8221; means that there is a problem in the user-maintained tax table.  It may mean that the file was damaged.  But if the error appeared after a tax update was installed there is another likely explanation.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/664"}],"collection":[{"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=664"}],"version-history":[{"count":1,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/664\/revisions"}],"predecessor-version":[{"id":665,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/664\/revisions\/665"}],"wp:attachment":[{"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iqaccountingsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}