Microsoft Product Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label Dynamics GP 2010. Show all posts
Showing posts with label Dynamics GP 2010. Show all posts

Monday, 18 November 2013

How to Display Parent Company Information on SOP documents

Posted on 02:00 by Unknown
A few days aback I encountered a really interesting discussion on the Microsoft Dynamics GP Community forum where the user needed to get the parent customer information on the SOP Blank Invoice Form. I asked myself, "Well, how difficult can that be?"

The first thought around these requests is, you create a table relationship between the Sales Transaction Work (SOP_HDR_WORK) table and the RM Customer Master (RM_Customer_MSTR) table by Customer Number and you get the parent customer ID. In that train of thought you immediately realize that there's no way to alias the RM Customer Master table back into the table relationship to retrieve the parent customer ID information. [NOTE TO SELF: this would be a cool Report Writer feature, but I digress.]

Of course, a second alternative is to use VBA, but many customers and partners are wary of implementing a VBA solution, especially when they are considering upgrading to Microsoft Dynamics GP 2013 and taking advantage of the web client. VBA customizations simply do not work with the web client.

As I thought through an alternative, I quickly realized this would be a good fit for the Support Debugging Tool and it's awesome Runtime Execute feature. As it turns out, the Support Debugging Tool is capable of executing Dexterity sanScript code within the context of any dictionary, but not only that; it provides some really cool templates that save time and minimizes the amount of code an entry level developer needs to create to accomplish a solution. In turn, there are a number of Report Writer API scripts built into the Dynamics application dictionary (DYNAMICS.DIC) to allow third party developers to expose data from their tables onto an existing Microsoft Dynamics GP report without having to write a complex interface to do so.

The Solution

1. The first task at hand is to open the Runtime Execute window in the Support Debugging Tool. Once the window is open, click on the Helper button to open the Insert Helper Function window. From the drop-down list, select template for rw_TableHeaderString.

Insert Helper Function window

Below is the signature for the function as we will use it.

The rw_TableHeaderString function

function returns string sData;

in integer dict_id; {Support Debugging Tool Dictionary ID}
in string report_name; {Support Debugging Tool Script ID to call}
in string sNumber; {Parent Customer ID field we will retrieve}
in integer sType; {Not used, we will default to 0}
in integer iControl; {which piece of data to return}

We will use this function to return a string value for the selected Parent Customer ID information field to a Report Writer calculated field.

By clicking OK, the Support Debugging Tool inserts the code to get us started in the right direction.

Helper Code
Very cool! All that's left now is to add the extra bits of code to retrieve the parent customer information from the RM Customer Master. In addition, we need to make sure that this code executes in the context of the Microsoft Dynamics GP product.

Additional Code
The template function even indicates where our code should be inserted and as you can see this is easy stuff for any entry level Dex developer. All we did here was use the MBS_Number local field as the parameter value that will contain our parent customer ID (to be passed from Report Writer) to get the piece of data we are interested in based on the value that we will supply to the MBS_Control local field (again, from Report Writer). The returned table value will then be stored in the MBS_TableHeaderString local field.

The Support Debugging Tool then goes to action and call its MBS_Param_Set API function to talk back to the Report Writer API script and deliver the values retrieved to it. Isn't this awesome!

2. The second part of our solution consists of 3 parts really: a) we need to create a table relationship between the Sales Transaction Work table and the RM Customer Master table as this relationship does not exist out of the box, b) We then need to create calculated fields for the pieces of Parent Customer data we would like to retrieve, and c) We need to complete the layout and grant security to the modified report.

I will assume for this article that you are familiar with the processes of creating new table relationships in Report Writer and laying out the new calculated fields and granting security to the modified report. You can always browse the Report Writer manual accompanying your Microsoft Dynamics GP application for information of these processes, so my attention will focus solely on the calculated field.

In this example, I want to retrieve the parent customer name. For this we will create a new calculated field as follows:

a) Create a new calculated field, in this case I will call it (A) Parent Name. The result type of the calculation will be a String and the expression type is Calculated.

b) Since we are using the rw_TableHeaderString user-defined function, we will choose this accordingly:

rw_TableHeaderString

c) Now we have to setup the parameters as indicated by the function signature above. The first parameter we will add is the Support Debugging Tool's dictionary ID, 5261. We will add this as an integer constant.

Dictionary constant 5261 to call the script we wrote
d) Now we have to call the Runtime Execute script we created, GETPARENTINFO. We will add this as a string constant.

GETPARENTINFO

e) We now need to pass the parent customer number parameter, our default (not used) parameter, and the value number for the field that will be retrieved for the parent customer data, according to how we coded our script above. This is shown below.

Last 3 parameters.

The RM_Customer_MSTR.Corporate Customer Number field is retrieved from the RM Customer Master table which we created via a new table relationship and subsequently adding that table relationship to our report.

The following shows a muck-up of the report layout with the parent customer name calculated field created:

Report Layout
The report should display something like this when run in Microsoft Dynamics GP:

Invoice Layout


Final Notes

The above script could be extended to retrieve other pieces of data for our parent customer, like contact, address, city, state, zip, phone numbers, etc. In this case you will need to add more entries to the case...end case statement above and retrieve the correct table column. You can find more information on the table columns for the RM Customer Master in the Microsoft Dynamics GP software development kit (SDK).

This solution is absolutely compatible with Word Templates and the Web Client. In the case of Word Templates, you will need to export a new report definition file (XML) and import into your template fields. In the case of the Web Client, all the components above are within the confines of a Dexterity application and the Support Debugging Tool happens to be compatible with the Web Client, just as much as Report Writer is. Your modified report should render absolutely fine on the Silverlight canvas control, if printing the standard report.

For all workstations to take advantage of the Runtime Execute script, the Support Debugging Tool must be deployed with the recommended configuration - all workstations pointing to a centralized configuration file, debugger.xml.


The Support Debugging Tool never ceases to amaze me. You can find similar article to this one and more information here:

The Dynamics GP Blogster - Adding Customer Item User Defined Field to SOP Invoice
Developing for Dynamics GP - The Support Debugging Tool Portal

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Code, Dexterity, Dynamics GP 2010, Dynamics GP 2013, Report Writer, Support Debugging Tool, Web Client, Word Templates | No comments

Thursday, 29 March 2012

Microsoft Dynamics GP 2010 now compatible with Microsoft SQL Server 2012

Posted on 08:12 by Unknown

For those of you who have been wondering about Microsoft Dynamics GP 2010 compatibility with Microsoft SQL Server 2012, it's now official! You can find the hot topic article on CustomerSource and PartnerSource at:

CustomerSource - Microsoft Dynamics GP and Microsoft SQL Server 2012 Compatibility
PartnerSource - Microsoft Dynamics GP and Microsoft SQL Server 2012 Compatibility

Click on the image above to find out more about Microsoft SQL Server 2012 and to download the evaluation version. I just found something to play around with during my Spring break.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Compliance, Dynamics GP 2010, Dynamics GP 2010 R2, SQL Server | No comments

Thursday, 3 November 2011

Microsoft Dynamics GP Home Page scripting errors on Citrix XenApp

Posted on 13:31 by Unknown
For the past 2 weeks I have been working on a fairly complex installation of Microsoft Dynamics GP for a hospitality staffing company whose hardware infrastructure is hosted by a very reputable provider. My client has made all their applications available to their end users via Citrix XenApp. Xenapp is Citrix Systems' secure on-demand application delivery platform for the Citrix Presentation Server.

After completing the installation of Microsoft Dynamics GP on the Citrix Servers, the next step was exposing the application to XenApp. This by all accounts is a fairly straightforward process. I logged into XenApp, launch Microsoft Dynamics GP and everything was working fine: home page, reports, SSRS reports, Business Analyzer, Management Reporter, the whole 9 yards!

A couple days later, users began reporting home page script errors as the one shown below:


Typically, if you follow the prescribed KB article 918313 - Frequently asked questions about the home pages and area pages features in Microsoft Dynamics GP, specifically Q21 and Q31 you end up understanding the following:

1. There must be a UserData folder under the %Appdata%\Microsoft\Internet Explorer folder. Under normal circumstances, this folder will get created when the user profile is first initiated.

2. You cannot roam user profiles and in particular the user Temp folders as this causes issues with Microsoft Dynamics GP.

We went through both questions - well, we went through all the questions - and realized that the UserData folder was not created for the end-users. Remember, I was not getting this error under my domain account, but I attribute this to the fact that I was a domain admin. Effectively, we setup the UserData folders, but the problem persisted.

I then went to the Run... command utility with my Windows account and typed %Appdata% and quickly realized that Windows Explorer was taking me to \\\UserData$\Appdata\..., in effect confirming that roaming profiles was active for all users on the domain.

This seems to contradict the previous point #2 above. However, this is where all hell broke lose with the infrastructure vendor. It turns out that disabling roaming profiles on a Citrix farm may cause all kinds of unpredictable results for other applications such as Microsoft Outlook which tend to lose personalized settings when bouncing between servers in the farm - this is a load balanced environment with 4 servers.

In short, disabling roaming profiles was not an option!

However, in working with the point Citrix and Windows engineer at the infrastructure provider and running some ProcMon traces, we realized that each time the home page attempted to load a file, ProcMon would display errors stating that the file location could not be found (effectively what the error was displaying even after the UserData folder was created). Since the profiles were being roamed this was disconcerting.

Of course, the immediate thought was, "it must be a permissions issue!". We then tested this theory by opening Windows Explorer and attempting to navigate to the Roaming Profile location with a standard user account. No luck!

The engineer quickly realized that the only way this could happen was via a Global Policy setting. In doing some more research, the likely candidate emerged: Remove Run Menu From Start Menu.


Clearly, from the policy description above, UNC paths are blocked and accessing local folders like \temp is a no, no (temp is roamed off to another server, remember?). Once we disabled the policy, Microsoft Dynamics GP started working like a charm and the errors were gone!

Now, you may say, "not sure we want to enable the Run commad for end-users". In my client's particular case, this made no difference because applications are being deployed via XenApp and not accessed from a desktop, so disabling the policy won't have any effect. At the end of the day, we all went home happy, which begs the question...

Can the above KB article be revised?

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 2010, Dynamics GP 2010 R2, Installation, Management Reporter, Troubleshooting | No comments

Monday, 17 October 2011

Printing to screen and PDF file causes default printer to change to Acrobat PDF Writer

Posted on 14:59 by Unknown
A user recently reported a strange Microsoft Dynamics GP behavior when trying to print any report in to file in PDF format, while simultaneously sending the report to screen.

The PDF gets created and the report appears on the screen as it would be expected. However, when she attempts to print the report from the screen to printer, the only printer available is Adobe PDF Writer. While having the report on screen, the user checked the default printer, which remained unchanged, nonetheless the report on screen would only print to Adobe PDF Writer, bypassing the default printer.

I suspect what is happening in this case is, when the report is directed to screen and a PDF file simultaneously, the Runtime Engine changes the default printer to the Adobe PDF Writer (Adobe Distiller in some cases) printer in order to write the file in PDF format - after all, Microsoft Dynamics GP does not save files in native PDF format like say, Word or Excel. At the end of writing the file, but before outputing the report to screen, the default printer is not being re-established.

Given the number of printer related posts on the forums lately and the responses by Microsoft staff, it seems this has been identified (along with a few more issues) as part of a list of upcoming fixes - but just in case, I am writing about it today.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 10, Dynamics GP 2010, Printer Compatibility | No comments

Monday, 19 September 2011

Running Fixed Assets Depreciation causes Microsoft Dynamics GP to "hang"

Posted on 04:00 by Unknown
I just completed a full upgrade of Microsoft Dynamics GP from version 9 to version 2010 R2 for a client and they were going through their first month-end closing in the upgraded system. 3 weeks ago, after the upgrade, they reported experiencing an issue running Fixed Assets depreciation from two laptop computers, where apparently, when running depreciation the system would hang. The only option to recover would be to terminate the Dynamics.exe process from Task Manager. Nonetheless, we did not pay much attention to this at the time since the process was completed successfully from another machine, just in time to close the month of August - more on this later.

The client called back on Thursday morning, letting me know they were ready to run Fixed Assets depreciation again, and this time I offered to be onsite to see the problem first hand. So effectively this past Friday morning I drove to their location and stood behind the Sr. Accountant to see the process in action and spot any possible issues while there. The accountant proceeded to log into the company database for which he would run the depreciation, entered his September cutoff date and clicked on the Depreciate button... as luck would have it with some support cases, nothing happened and the process completed successfully. Well, after some chuckles and the typical apologies from the client, I was back in my car on the way home.

Fixed Assets - Depreciation Process Information

Halfway through, I received an email saying that as soon as I left, they logged into another company and were able to reproduce the hung up issue.

Now, I began playing all the typical troubleshooting plots in my head... the problem happens only in one company, the problem can be reproduced by all users, the problem can be reproduced on all machines. Typically, when an issue is constrained to one company, it's related to some problem with the data or the way that company is configured. Not a bad proposition since I was only dealing with some 300 assets... but I am in my car, remember? So I offered the client to look at the issue when I was back in front of my computer, since I had discarded a user or workstation being the culprits.

Back at home I VPN'd into their system, then RDP'd to the SQL Server. I had the Sr. Accountant log into GP and start the depreciation process again. In troubleshooting the issue, I could see that the depreciation process was being correctly added to the Process Monitor and that the process showed Active, but it did not seem to complete.

Process Monitor

I also ran a SQL Profiler and noticed that the same set of T-SQL instructions would appear to be processed over and over at the database level. This told me the depreciation process was in an endless loop of some kind and something was preventing it from finishing.

SQL Profiler Trace

I then offered to run the process from the server with the 'sa' user and noticed that the depreciation was stopping on a particular asset ID (by clicking on the Progress button). This was now promising, because I now had a piece of data to look at.

Fixed Assets Progress window
I queried the Asset Master table and noticed that this particular asset had an acquisition cost of zero. In looking at the Asset Book, I noticed that the Cost Basis was USD $.01 (1 penny). Not sure why this grabbed my attention, but I asked the Sr. Accountant why had they set this asset up this way and he replied that they did it only to record the asset and keep track of its location, but that it had been fully depreciated in the past.

Asset General Information
Asset Book
He also added that the process was working fine in GP 9.0

So I figured I would try something by changing the Depreciation Method to "No Depreciation". After all, if the asset had an acquisition cost of zero and a Cost Basis of 1 penny, what was there to depreciate? I ran the following statement to change the Depreciation Method to "No Depreciation":

-- Created by Mariano Gomez, MVP
-- This code is licensed under the Creative Commons
-- Attribution-NonCommercial-ShareAlike 2.5 Generic license.

-- Remove the lock for the book being depreciated
DELETE FROM FA40203;

-- Change the depreciation method
UPDATE FA00200 SET DEPRECIATIONMETHOD = 15 WHERE COSTBASIS <= .01;

I then asked the Sr. Accountant to re-run the process and this time it completed in less than 10 seconds and produced the reports he was expecting.

Since it was not enough to fix this issue, I went out to the Microsoft Dynamics GP Partner Online Technical forum and found a case where a partner reported having the same issue at her client's site. It seems Microsoft has identified and logged this as a problem report, but no concrete fix date has been given for it. So for now, the above query should do.

Also, you could end up with a cost basis of 1 penny at the end of the useful life of an asset, which would throw the system into an endless loop if you attempt to depreciate such assets once more. If you feel this is your case, the above script should also correct the problem.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 2010, Dynamics GP 2010 R2, Fixed Assets, SQL Scripting, SQL Server, Troubleshooting | No comments

Wednesday, 17 August 2011

Default Printer not 'sticking' when running Microsoft Dynamics GP in Terminal Services RemoteApp

Posted on 15:07 by Unknown
A bit of theory...

RemoteApp programs are programs that are accessed remotely through Terminal Services and appear as if they are running on the end user's local computer. Users can run RemoteApp programs side by side with their local programs. A user can minimize, maximize, and resize the program window, and can easily start multiple programs at the same time. If a user is running more than one RemoteApp program on the same terminal server, the RemoteApp programs will share the same Terminal Services session.

The following Microsoft TechNet article explains in more detail:

Terminal Services RemoteApp (TS RemoteApp)

Background

Microsoft Dynamics GP (versions 10.0 and 2010), is currently supported in a Terminal Server RemoteApp environment, but a number of my clients and forum users have reported in numerous occasions that the Default Printer settings are not 'sticking' or simply saving when loging out of the application (which also closes the RemoteApp session) and returning to it.




Print Setup window

The Solution

Puzzled by this, I began doing some digging and found out that the default printer "problem" is actually not a problem, but rather the way RemoteApp decides how the session disconnection will occur. Playing along with the disconnection, there was a new Terminal Server group policy setting that was introduced to control time limits for disconnection and there lies the dirty little secret.

If you are experiencing the issue I described above, please take a look at the following article by the Remote Desktop Services (Terminal Services) Team Blog:

Terminal Services RemoteApp™ Session Termination Logic
http://blogs.msdn.com/b/rds/archive/2007/09/28/terminal-services-remoteapp-session-termination-logic.aspx

The article unveils the steps required to change this behavior and make your Microsoft Dynamics GP printer 'stick'.

Also, if you are using Named Printers with Microsoft Dynamics GP in a Terminal Services RemoteApp environment, take a look at the following articles over at Developing for Dynamics GP:

Using Named Printers with Terminal Server
http://blogs.msdn.com/b/developingfordynamicsgp/archive/2008/08/15/using-named-printers-with-terminal-server.aspx

Named Printers application default printer selections not "sticking"
http://blogs.msdn.com/b/developingfordynamicsgp/archive/2011/06/24/named-printers-application-default-printer-selections-not-quot-sticking-quot.aspx

Troubleshooting Named Printers Issues
http://blogs.msdn.com/b/developingfordynamicsgp/archive/2011/05/26/troubleshooting-named-printers-issues.aspx

Please let me know with your comments if any of the above recommendations by the Remote Desktop Services team worked for you.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 2010, Dynamics GP 2010 R2, Installation, Named Printers, Printer Compatibility, RemoteApp, Troubleshooting | No comments

Monday, 8 August 2011

SQL: Assigning Microsoft Dynamics GP Users to SSRS Database Roles

Posted on 11:25 by Unknown
As I begin to wrap up a Microsoft Dynamics GP 2010 R2 production upgrade from Microsoft Dynamics GP 9.0, I ran into a small issue at my client. After deploying the new SSRS reports, and as users were getting ready to try them out, we realized that some 15 logins needed to be assigned to a number of the 24 default database security roles created for the SSRS reports.




User Mappings (some information blurred to protect the client's identity)

This would be a bit cumbersome giving the share number of clicks required to accomplish this feat. In addition, we had just setup Microsoft Dynamics GP security, and given that the SSRS database roles were similar to those in GP, something needed to be done to automate the assignment of these roles based on Microsoft Dynamics GP security roles.

As a result, I created the following script:

-- Created by Mariano Gomez, MVP

-- This code is licensed under the Creative Commons

-- Attribution-NonCommercial-ShareAlike 2.5 Generic license.

use DYNAMICS;

go



DECLARE @userid varchar(50), @companyid varchar(5), @securityroleid varchar(200), @ssrsRole varchar(200);

DECLARE @sqlStmt varchar(255);



DECLARE c_reportsecurity CURSOR FOR

SELECT a.USERID, b.INTERID, a.SECURITYROLEID FROM SY10500 a

LEFT OUTER JOIN SY01500 b ON (A.CMPANYID = b.CMPANYID)

WHERE a.USERID not in ('sa', 'DYNSA', 'LESSONUSER1', 'LESSONUSER2') and a.SECURITYROLEID NOT LIKE ('MBS%')

ORDER BY a.USERID;



OPEN c_reportsecurity;

FETCH NEXT FROM c_reportsecurity INTO @userid, @companyid, @securityroleid;



WHILE @@FETCH_STATUS = 0

BEGIN

SELECT @ssrsrole =

CASE

WHEN @securityroleid = 'ACCOUNTING MANAGER* ' THEN 'rpt_accounting manager'

WHEN @securityroleid = 'AP CLERK* ' THEN 'rpt_accounts payable coordinator'

WHEN @securityroleid = 'AR CLERK* ' THEN 'rpt_accounts receivable coordinator'

WHEN @securityroleid = 'BOOKKEEPER* ' THEN 'rpt_bookkeeper'

WHEN @securityroleid = 'CA AGENT* ' THEN ''

WHEN @securityroleid = 'CA MANAGER* ' THEN ''

WHEN @securityroleid = 'CA STAKEHOLDER* ' THEN ''

WHEN @securityroleid = 'CERTIFIED ACCOUNTANT* ' THEN 'rpt_certified accountant'

WHEN @securityroleid = 'CL AGENT* ' THEN ''

WHEN @securityroleid = 'CL DISPATCHER* ' THEN 'rpt_dispatcher'

WHEN @securityroleid = 'CL MANAGER* ' THEN ''

WHEN @securityroleid = 'CL STAKEHOLDER* ' THEN ''

WHEN @securityroleid = 'CUSTOMER SERVICE REP* ' THEN 'rpt_customer service rep'

WHEN @securityroleid = 'DP MANAGER* ' THEN ''

WHEN @securityroleid = 'DP STAKEHOLDER* ' THEN ''

WHEN @securityroleid = 'DP TECHNICIAN* ' THEN ''

WHEN @securityroleid = 'FA MANAGER* ' THEN 'rpt_accounting manager'

WHEN @securityroleid = 'FA STAKEHOLDER* ' THEN 'rpt_certified accountant'

WHEN @securityroleid = 'IT OPERATIONS MANAGER* ' THEN ''

WHEN @securityroleid = 'MBS DEBUGGER ADMIN ' THEN ''

WHEN @securityroleid = 'MBS DEBUGGER USER ' THEN ''

WHEN @securityroleid = 'OPERATIONS MANAGER* ' THEN 'rpt_operations manager'

WHEN @securityroleid = 'ORDER PROCESSOR* ' THEN 'rpt_order processor'

WHEN @securityroleid = 'PAYROLL CLERK* ' THEN 'rpt_payroll'

WHEN @securityroleid = 'PM AGENT* ' THEN ''

WHEN @securityroleid = 'PM MANAGER* ' THEN ''

WHEN @securityroleid = 'PM STAKEHOLDER* ' THEN ''

WHEN @securityroleid = 'POWERUSER ' THEN 'rpt_power user'

WHEN @securityroleid = 'PURCHASING AGENT* ' THEN 'rpt_purchasing agent'

WHEN @securityroleid = 'PURCHASING MANAGER* ' THEN 'rpt_purchasing manager'

WHEN @securityroleid = 'RT AGENT* ' THEN ''

WHEN @securityroleid = 'RT MANAGER* ' THEN ''

WHEN @securityroleid = 'RT STAKEHOLDER* ' THEN ''

WHEN @securityroleid = 'SHIPPING AND RECEIVING* ' THEN 'rpt_shipping and receiving'

WHEN @securityroleid = 'WAREHOUSE MANAGER* ' THEN 'rpt_warehouse manager'

WHEN @securityroleid = 'WENNSOFT SMS CONTRACTS* ' THEN ''

WHEN @securityroleid = 'WENNSOFT SMS DISPATCHER* ' THEN ''

WHEN @securityroleid = 'WENNSOFT SMS POWER USER* ' THEN ''

WHEN @securityroleid = 'WENNSOFT SMS SETUP* ' THEN ''

WHEN @securityroleid = 'WSJC ACCOUNTANT* ' THEN ''

WHEN @securityroleid = 'WSJC ACCOUNTING MANAGER* ' THEN ''

WHEN @securityroleid = 'WSJC ADMIN* ' THEN ''

WHEN @securityroleid = 'WSJC BILLING CLERK* ' THEN ''

WHEN @securityroleid = 'WSJC POWERUSER* ' THEN ''

WHEN @securityroleid = 'WSJC PROJECT MANAGER* ' THEN ''

WHEN @securityroleid = 'WSTT PAYROLL CLERK* ' THEN ''

WHEN @securityroleid = 'WSTT POWERUSER* ' THEN ''

END



IF (@ssrsRole <> '')

BEGIN

SET @sqlStmt = 'USE ' + rtrim(@companyid) + '; EXEC sp_addrolemember ' + QUOTENAME(@ssrsRole, '''') + ',' + QUOTENAME(rtrim(@userid), '''');

EXEC(@sqlStmt);

END

FETCH NEXT FROM c_reportsecurity INTO @userid, @companyid, @securityroleid;

END



CLOSE c_reportsecurity;

DEALLOCATE c_reportsecurity;


The script looks at the Security Assignment User Role table (SY10500) and retrieves the physical company database from the Company Master table (SY01500), then assign an SSRS database security role to each of the Microsoft Dynamics GP default roles. If a role does not exist, you can choose to leave the assignment blank.

The script then proceeds to evaluate the database security role obtained, then creates a SQL string that can be executed. The SQL string uses the sp_addrolemember system stored procedure to add the corresponding SQL login to the role. A cursor is used to loop through each user, company, and security role combination to obtain and assign the proper SSRS database role.

You can choose to add custom security roles or roles for third party applications that deploy their own SSRS reports to the above script.

This definitely helped saving some time... phew!

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Code, Dynamics GP 2010, Dynamics GP 2010 R2, Installation, Security, SQL Reporting Services, SQL Scripting | No comments

Thursday, 30 June 2011

Support Debugging Tool Build 15 now released

Posted on 14:11 by Unknown
These are exciting times... the Support Debugging Tool Build 15 has been released! If you attended our session, CSGP014-R2 Administering Microsoft Dynamics GP Like a Pro with the Support Debugging Tool during Convergence Atlanta 2011, you may recall that the features David Musgrave (author of the Support Debugging Tool) and I presented were all part of the Build 15 beta release at the time. Since then, the Support Debugging Tool has been propped up with a number of enhancements and bug fixes that make the wait while worth.


Support Debugging Tool Build 15 - UI Facelift


Take a look at David Musgrave's release article, Support Debugging Tool Build 15 released, for a complete list of fixes, enhancements, performance improvements, usability and  features included in the new build.

Build 15 is only available for Microsoft Dynamics GP 10.0, Microsoft Dynamics GP 2010, and Microsoft Dynamics GP 2010 R2. You can download Build 15 at:

Support Debugging Tool for Microsoft Dynamics GP 10.0 Secure Link
Support Debugging Tool for Microsoft Dynamics GP 2010 (v11.0) Secure Link

Also, I will be writing in the coming days on some of the features I personally suggested and that are now a part of the Support Debugging Tool.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 2010, Dynamics GP 2010 R2, Support Debugging Tool, Troubleshooting | No comments

Tuesday, 14 December 2010

SmartList Builder "Display as a negative value based on field" option not working as expected

Posted on 15:41 by Unknown
Just recently on a newsgroup forum, a partner brought up an issue affecting SmartList Builder. The partner had just recently upgraded the client from version 9 and was testing the Smartlists the customer had built prior to the upgrade to ensure they were still working as expected. In the partner's own words:

"It was working when we were on GP9, but now we're on GP2010 SP1 none of my fields set up with Negative Values are showing up with Negative Values. When I run the smartlist from the old GP9 server, amounts are showing negative amounts for Return documents. But when we run the smartlist on GP2010, the amounts are now positive amounts, and when I check the Set Field Options window, they are still set up to "Display as negative based on field" when SOP Type = Return."
In order to verify this I launched GP 2010 and recreated the SmartList mentioned above by the partner, setting the field option for the Document Amount to display a negative value based on a SOP Type of Return:

Set Field Options window
After saving the SmartList Builder option, I launched SmartList and had it build the newly created option. Once I checked the entry I had just created, effectively Returns were no displaying as negative.


BUG: Returns document amounts not displayed as negative
This bug seems to be confined to Microsoft Dynamics GP 2010 RTM (Build 11.00.1247) and Microsoft Dynamics GP 2010 SP1 (Build 11.00.1524). I could not replicate this issue for version 10.0 SP5 (10.00.1579) or earlier.

As a workaround, you can create a SmartList Builder calculated field to change the sign of the amount being displayed based on the SOP Type, as follows:

Add Calculated Field
NOTE: You can perform a similar CASE statement for any other SmartList you have created based on the field(s) criteria you are using to render the value a negative value.

This problem has been reported to Microsoft and a bug report is being written up to address the issue as of the publishing date of this article. For more information, contact Microsoft Dynamics GP Support.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Dynamics GP 2010, From the Newsgroups, SmartList and SmartList Builder, Troubleshooting | No comments

Monday, 6 December 2010

Enabling a Report Writer document as a Word Template

Posted on 18:16 by Unknown
Ok, this is directly or indirectly a Report Writer subject, but nonetheless a topic related to Report Writer. In this example, I take the General Posting Journal transaction document and enable it under Word Templates. However, this example will not develop the Word Template itself, but rather show how easy it is to make the journal document template enabled.

The steps are very simple and in fact, with a little bit of creativity, a developer could potentially write code that quickly enables critical reports.

To enable an existing Microsoft Dynamics GP report:

1. Register a trigger against the IsTemplateEnabledReport() function of the syReportLookup form. Template enabled reports can be selected in the Reports lookup window.

Startup
{ Created by Mariano Gomez, MVP
This code is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 Generic license.
}
local integer l_result;

pragma (disable warning LiteralStringUsed);

l_result = Trigger_RegisterFunction(function IsTemplateEnabledReport of form syReportLookup, TRIGGER_AFTER_ORIGINAL, function glPostingJournalReport);
if l_result <> SY_NOERR then
warning "Trigger registration for General Posting Journal report failed.";
end if;

pragma (enable warning LiteralStringUsed);

Note: You will need to save the Startup script first (CTRL+S), and compile the dictionary when the trigger processing function is implemented.

2. Now that we have our Startup script and the trigger registered, we can implement the trigger processing function. In this case, I have labeled this function glPostingJournalReport().

glPostingJournalReport()
{ Created by Mariano Gomez, MVP
This code is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 Generic license.
}
function returns boolean result;

in 'Product ID' nProdID;
in Resid nResID;

if nProdID = DYNAMICS then

{It's our report. Indicate that it is template enabled.}
case nResID
in [resourceid(report 'General Posting Journal')]
result = true;
end case;
end if;

Note: In the above code I am using the dictionary constant DYNAMICS for the product ID as our report belongs to the core dictionary. Also, rather than hardcoding the resource Id for the report, I am using SanScript's resourceid() function to obtain the resource Id for the report.

3. Open Dexterity Utilities to extract and autochunk your dictionary into a final product. The following are the settings I used for this particular project:


Auto-Chunk and Product Information windows
4. Drop your chunk file in the Dynamics GP folder and make sure that you can see your trigger in action in the Reports lookup window under Report Template Maintenance.


Reports Lookup window

Now that we have won half the battle, I will show in my follow up post, how to actually implement the template and make it all work together.

Downloads:

Extracted dictionary - Click here
Chunk file - Click here

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Dexterity, Dynamics GP 2010, Report Writer, Word Templates | No comments

Friday, 26 November 2010

Add-In Initialization Error when launching Microsoft Dynamics GP 2010

Posted on 10:52 by Unknown
Lately, many users have reported getting the error depicted below after launching Microsoft Dynamics GP 10 with Service Pack 5 or Microsoft Dynamics GP 2010 with Service Pack 1:



Add-In Initialization Error
The error references the Microsoft.Dynamics.GP.OnlineServices.dll assembly file as the root cause of the problem. This assembly was shipped with Microsoft Dynamics GP 10 SP5 and is a part of the Dynamics Online Services application.

The error typically indicates that the add-in assembly is loaded, however, it most likely indicates that the Dexterity portion of the application, dictionary DO6499.dic, isn't loaded in the path found in the DYNAMICS.SET file -- which should have also generated a dictionary load error prior to receiving the above message -- or isn't loaded at all.

To fix this error:

1. Run a repair or update on the Microsoft Dynamics GP client under the Windows Control Panel. This will reinstall the Dynamics Online Services application dictionary and the assembly.

NOTE: You will not see this application in a list of selections as it appears to be a "default" application and it will reinstall itself.


However if you not interested in repairing the application and rather completely get rid of the Dynamics Online Services feature, then follow these steps:

1. Under the Microsoft Dynamics\GP folder, locate and delete the DO6499.dic dictionary file.

2. Remove all references of this product from the application launch file, DYNAMICS.SET.

6499
Dynamics Online Services
:C:Program Files/Microsoft Dynamics/GP/DO6499.DIC
:C:Program Files/Microsoft Dynamics/GP/Data/DO6499F.DIC
:C:Program Files/Microsoft Dynamics/GP/Data/DO6499R.DIC

NOTE: Don't forget to decrease the number of products by 1 in the DYNAMICS.SET file. Usually, this is the first entry in the launch file.

3. Locate the AddIns folder and delete the Microsoft.Dynamics.GP.OnlineServices.dll assembly file
4. Also remove the Application.DynamicsOnlineServices.dll from the GP installation folder

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Dynamics GP 2010, Online Services, Troubleshooting | No comments

Tuesday, 23 November 2010

Disabling Multiple Ledgers functionality in Microsoft Dynamics GP 2010...after the fact

Posted on 17:25 by Unknown
Let's face it! Like many things in life, configuration decisions are revisited even after going live (rightfully so!) with your system. What was viewed and considered a requirement a few months aback and worked during User Acceptance Testing turns out to be something the business no longer needs today, due to changes in direction, or changes in business conditions.

Just recently, I came across a request for disabling the new reporting ledgers functionality in Microsoft Dynamics GP 2010. While this implementation was not live, this issue was clearly affecting the consulting teams ability to move forward.

The following script should disable the reporting ledgers function:

-- Created by Mariano Gomez, MVP
-- This code is licensed under the Creative Commons
-- Attribution-NonCommercial-ShareAlike 2.5 Generic license.

UPDATE GL40000 SET Allow_Reporting_Ledgers = 0, UseLedgersForAcctBalance = 0;
DELETE FROM GL40001;

Once the script is executed, go back to the General Ledger Setup window. You will notice that a BASE ledger is created by default, but also notice that the Allow flag is unchecked.


General Ledger Setup
Click the Ok button to continue.

Now, if you open the GL Transaction Entry screen, you will notice that the Ledger ID field is no longer present.

Transaction Entry
Hope you found this post useful.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Code, Compliance, Dynamics GP 2010, General Ledger, SQL Scripting | No comments

Monday, 25 October 2010

Microsoft Dynamics GP 2010 map buttons not drilling down to the street level

Posted on 14:25 by Unknown
If you use the map buttons in Microsoft Dynamics GP 2010, you may have noted that clicking on a map button next to an address Id opens up Bing Maps at the country view level.


Microsoft Dynamics GP 2010 and Bing Maps country view

This has been identified as a bug with Microsoft Dynamics GP 2010 -- RTM and Service Pack 1 are affected. The bug is currently written up and hopefully in the queue for a fix.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Bing Maps Enterprise, Dynamics GP 2010, Troubleshooting | No comments

Friday, 1 October 2010

Microsoft Dynamics GP 2010 Word Templates summary

Posted on 12:00 by Unknown
Microsoft Dynamics GP 2010 Word Templates offer new presentation capabilities to the traditional customer/vendor facing Report Writer reports. This week was just a superficial scratch of the myriads of things that are possible to achieve. Like with everything else, I am sure there are limitations, but it will take some time to discover what those are. Nonetheless, I will continue exploring this topic and bring to you my findings

Articles Covered

How to add a "Terms and Conditions" page to a Microsoft Dynamics GP Word Template document
Debugging Microsoft Dynamics GP 2010 Word Templates
How to resize logo in Microsoft Dynamics GP Word Templates
The Open XML SDK 2.0 for Microsoft Office

Acknowledgements

I have to thank Microsoft's Rob Wagner for his invaluable support and guidance throughout the week. Rob also provided the cool code and pointed to the online resources available on the Open XML subject.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Dynamics GP 2010, Microsoft Office, Word Templates | No comments

Thursday, 30 September 2010

How to resize logo in Microsoft Dynamics GP Word Templates

Posted on 14:32 by Unknown
Getting used to the new Word Templates functionality can be a bit challenging at times. One of those challenges came in the form or a simple question: "How to resize the logo on the template?". One thing to keep in mind is that most objects on a Microsoft Dynamics GP Word Template document live inside of content controls. With that said, here are the steps to achieve this, taking the SOP Blank Invoice Form Template* as an example:

1. Under Report Template Maintenance, select the SOP Blank Invoice Form template from the More Reports list.

2. Click the New button to create a new template. For this example, we will create the template based on the existing template and we will call it SOP Blank Invoice Form Icon. Click Ok to continue.



3. Highlight the newly created template, then click the Modify button to open Microsoft Word.



4. Click on the Picture content control to add a logo image.



Note: This image must also exist in the Image library under Template Configuration.

5. Select the logo, right-click, and chose Remove Content Control.



6. Highlight the image and resize accordingly. The following is a sample of the resized image with some extra text to go along:



NOTE: The logo is part of the Header section of the document.

7. Save the modified template to a different directory where it can be imported from later on, for example, My Documents. Close Microsoft Word.


8. Back to Report Template Maintenance, click the Add Template button and select the newly modified template from the My Documents folder. Replace the existing one when prompted.

9. Click the Assign button, then mark the company you want to assign the template to. Then, click on Set as Default to make the new template the default template for the company. Click Save to continue. Click Save to continue.


10. Back to the Report Template Maintenance window, highlight the original template and click the Assign button and choose Company. Unmark the company and choose Save.


NOTE: This will ensure that the copied version of the original template prints always.

11. To test, select a SOP invoice and print.


Hope you found these steps simple to follow and that you are enjoying the new Word Templates feature in Microsoft Dynamics GP 2010.

Until next post!

MG.-
Mariano Gomez, MVP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Read More
Posted in Dynamics GP 2010, Microsoft Office, Reporting, Sales Order Processing, Word Templates | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • The Dynamics GP Blogster's best articles of 2012
    It's that time of the year again! Time to say goodbye to the outgoing year, 2012, and receive the new one, 2013, making all sort of reso...
  • What's new in Microsoft Dexterity 11.0
    The excitement around Microsoft Dynamics GP 2010 could not be any higher. Traffic on my site has doubled since I began releasing informatio...
  • Vote for your 2012 GPUG All Star
    The time has come again to vote for the next year's GPUG All Star awards. Surprisingly, I have been nominated to this award along with f...
  • How to add a "Cover Letter" page to a Microsoft Dynamics GP Word Template document
    I wrote an article almost a year ago showing a simple technique to add a  Terms and Conditions page to a Microsoft Dynamics GP Word Templat...
  • "Unable to access SnapIn config data Store" accessing Web Management Console
    For quite some time I had been running into this error when attempting to access the Microsoft Dynamics GP 2013 Web Management Console appl...
  • Running Windows 8.x Business Analyzer app on a laptop with SQL Reporting Services
    If you are a consultant, chances are you run your Microsoft Dynamics GP application demo environment on a laptop along with Microsoft SQL Se...
  • Adding more comment lines to POP Purchase Orders
    Just recently, I was asked by a customer to address an issue with their line item comments truncating at 4 lines. In essence, the customer w...
  • Extender Auto Open and Auto Close options not working in GP 2010
    Just recently, I came across an issue reported by a partner on Extender Auto Open and Auto Close options not working. Extender Auto Open a...
  • New Article on MSDynamicsWorld: Do's and Don'ts of Microsoft Dynamics GP Forums
    Many of you know me as an avid forum contributor - I can usually be found on the Microsoft Dynamics GP Partner Online Technical Community ...
  • Adding Customer Item User Defined fields to SOP Invoice
    Just recently I ran across a request to add the Customer Item user defined fields to the Sales Blank Invoice Form report in Report Writer. A...

Categories

  • Ad Campaigns
  • ADO
  • Adobe Acrobat
  • Analytical Accounting
  • Architecture
  • Around the Blogosphere
  • Article
  • Azure
  • Bank Reconciliation
  • Best of 2009
  • Best of Series
  • Best Practices
  • Bing Maps Enterprise
  • Books
  • Business Alerts
  • Business Analyzer
  • C#
  • Code
  • COM
  • Community
  • Compliance
  • Connect
  • Continuum
  • Convergence
  • Corporate Performance Management
  • CRM
  • Database Maintenance Utility
  • Decisions Conference
  • DEX.INI
  • DEXSQL
  • Dexterity
  • Discussions
  • Drill-Down Builder
  • Dynamics GP 10
  • Dynamics GP 11
  • Dynamics GP 12
  • Dynamics GP 2010
  • Dynamics GP 2010 R2
  • Dynamics GP 2013
  • eConnect
  • EFT
  • Electronic Banking
  • Encumbrance
  • Events
  • Extender
  • Field Services
  • Fixed Assets
  • Forecaster
  • From the Newsgroups
  • FRx
  • Functionality
  • General Ledger
  • GPUG
  • Home Page
  • Human Resources
  • Humor
  • IMHO
  • Installation
  • Integration
  • Integration Manager
  • Internet Explorer
  • Inventory
  • Kinnect
  • Maintenance
  • Management Reporter
  • Manufacturing
  • Menus for Visual Studio Tools
  • Microsoft Office
  • Modifier
  • Multicurrency Management
  • Multitenancy
  • MVP Summit
  • MVPs
  • Named Printers
  • Navigation Pane
  • Notes
  • ODBC
  • Office Web Components
  • OLE Container
  • Online Services
  • OpenXML
  • Partner Connections
  • Payables Management
  • Payroll
  • Performance
  • PO Commitments
  • Printer Compatibility
  • Product Feedback
  • Project Accounting
  • Purchasing
  • Receivables Management
  • RemoteApp
  • Report Writer
  • Reporting
  • Roadmap
  • SafePay
  • Sales Order Processing
  • Season Greetings
  • Security
  • Service Call Management
  • SharePoint
  • SmartList and SmartList Builder
  • SQL Reporting Services
  • SQL Scripting
  • SQL Server
  • Support Debugging Tool
  • Tax Updates
  • Technical Conference
  • The Partner Event
  • The Technology Corner
  • Training
  • Translation
  • Troubleshooting
  • Upgrades
  • VAT
  • VB.NET
  • VBA
  • VBScript
  • Visual Studio 2008
  • Visual Studio Tools
  • Web Client
  • Web Services
  • Windows 7
  • Windows 8
  • Word Templates
  • XBox
  • XBRL

Blog Archive

  • ▼  2013 (68)
    • ▼  December (2)
      • Visual Studio Tools for Microsoft Dynamics GP 2013...
      • Web Client Wednesday: Microsoft Dynamics GP on Azure
    • ►  November (8)
    • ►  October (5)
    • ►  September (5)
    • ►  August (3)
    • ►  July (8)
    • ►  June (5)
    • ►  May (5)
    • ►  April (2)
    • ►  March (11)
    • ►  February (6)
    • ►  January (8)
  • ►  2012 (101)
    • ►  December (8)
    • ►  November (6)
    • ►  October (15)
    • ►  September (16)
    • ►  August (9)
    • ►  July (4)
    • ►  June (4)
    • ►  May (6)
    • ►  April (4)
    • ►  March (11)
    • ►  February (4)
    • ►  January (14)
  • ►  2011 (158)
    • ►  December (7)
    • ►  November (17)
    • ►  October (7)
    • ►  September (8)
    • ►  August (8)
    • ►  July (12)
    • ►  June (12)
    • ►  May (13)
    • ►  April (23)
    • ►  March (21)
    • ►  February (10)
    • ►  January (20)
  • ►  2010 (168)
    • ►  December (15)
    • ►  November (11)
    • ►  October (12)
    • ►  September (24)
    • ►  August (13)
    • ►  July (12)
    • ►  June (8)
    • ►  May (17)
    • ►  April (14)
    • ►  March (9)
    • ►  February (16)
    • ►  January (17)
  • ►  2009 (5)
    • ►  December (5)
Powered by Blogger.

About Me

Unknown
View my complete profile