Microsoft Product Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label Support Debugging Tool. Show all posts
Showing posts with label Support Debugging Tool. 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

Tuesday, 5 March 2013

Microsoft Dynamics Convergence is around the corner!

Posted on 15:56 by Unknown

This is it! Microsoft Dynamics Convergence 2013 New Orleans is here. If you haven't registered it's never too late. All my sessions are now scheduled and I just wanted to walk through some of them and ask for your support - this is, I want to see you there!

GENGP01 - Getting Inspired with Microsoft Dynamics GP
Tuesday, March 19th from 11:00 am - 12:00 pm
Well, I finally get my 5 minutes of fame on the big stage - a chance to present at the General Session. I will be doing something pretty neat with MVP Mark Polino over at DynamicAccounting.net, together on stage. Needless to say, it involves swords and axes, but you need to come to see it.

CSGP24 - Administering SQL Server for Microsoft Dynamics GP
Wednesday, March 20th from 11:00 am - 12:00 pm
I have been asked to pickup on a topic that garnered some attention at the past Microsoft Dynamics Convergence in Houston, and for the first time I will be dedicating a full hour to SQL Server administration for Microsoft Dynamics GP. Come learn some of the tips, tricks, and considerations I used to maintain my customers' database environments running like a Swiss clock.

CSGP30 - The Microsoft Dynamics GP Support Debugging Tool
Thursday, March 21st from 2:30 pm - 3:30 pm
Someone has to carry the Support Debugging Tool flag, correct? It's too bad that my good friend David Musgrave will not be here to introduce the upcoming build 18.

Well, this time I have a dazzling array of features to show you including some exclusive ones to appear in the upcoming build 18. Also, want to see the Support Debugging Tool on the Web Client? Come and learn what will work and what won't. I have it all for you.

CSGP32 - Microsoft Dynamics GP 2013 Web Client For Smaller Companies
(R1) Wednesday, March 20th from 2:00 pm - 3:00 pm
(R2) Thursday, March 21st from 5:30 pm - 6:30 pm    
This is my second 5 minutes of fame. The good fellows over at Microsoft have invited me to present with the dynamic duo of Kevin Racer and Daryl Anderson - twice! You know you have made it in the Microsoft world if you start to hang out with these two. Nonetheless, come see us. This session promises to be very fun, while very instructive.

Well, as you see, lot's on my plate for this upcoming event, but you know what, I LOVE IT! I love seeing every single one of you in my sessions: I love to meet first time attendees just as much as I enjoy talking to my long time followers and by now friends. If you are not attending my sessions, oh well! Just make sure you attend many of the other fun and instructional ones.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Convergence, SQL Server, Support Debugging Tool, Training, Web Client | No comments

Monday, 31 December 2012

The Dynamics GP Blogster's best articles of 2012

Posted on 10:29 by Unknown
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 resolutions that we never seem to be able to achieve and with good measure, since most of us are simply consumed with the daily grind that lifting our heads up to take a breather and see the forest from the trees seems difficult and sometimes downright impossible.

2012 however was a very good year and gave me tons of stuff to write about. In retrospect, 3 conferences, 2 virtual conferences, the release of Microsoft Dynamics GP 2013 and the Web Client are simply a subset of the activities that allowed me to write some really cool stuff that you expressed through your comments to enjoy. Without further due, here is a list of the "best articles of 2012" written on this site (in no particular order):

1. Microsoft Dynamics Convergence 2012 Houston. Convergence Houston in March of 2012 was a very cool experience and probably one that I will never forget as I was able to meet up with my good friend David Musgrave and his wife, Jennifer. I also had the opportunity to share some time with some of my customers in attendance. As always, the good part is meeting tons of people and the thrill of presenting.

2. Microsoft Dynamics GP Technical Airlift 2012. In the realm of cool, the Technical Airlift in Fargo, North Dakota was a very awesome conference, but also marked the first time I presented without my compadre, David Musgrave. The Tech Airlift also demanded tons of prep work and was built upon cooperation between Microsoft and GPUG's GPPC and featured a record number of partners in attendance. I also liked the fact that I met up with some of my fellow MVPs.

3. GPUG Summit 2012 Seattle. Seattle has this aroma of coffee mixed with sea all over the city and I have to say the GPUG summit was a very charming conference, with lots of topics for the attending crowd. Seattle, Seattle...

4. Windows 8 and the Microsoft Dynamics GP Web Client Series. Okay, so I confess. I was a nuisance to the Escalation Engineering team testing the Web Client. You see, the Web Client was not supposed to even be working on Windows 8 as a compatible installation platform, but after months of annoying I had my way with this. The best part though was working with the team of Aaron Donat and Jason Lech and understanding the nuances of the deployment process of GP Web Client. Thanks guys for putting up with me and for making this happen.

5. Adding Customer Item User Defined fields to SOP Invoice. I love the Support Debugging Tool and how it can make live easier for things that seem unconceivable. How about this cool article on getting customer item user defined fields onto the SOP invoice? Well, I have to say I had tons of fun getting this to work.

6. How to add a "Cover Letter" page to a Microsoft Dynamics GP Word Template document. Life is not complete without a Word Template article. I hope to keep these coming in 2013 since Word Templates are essential to Web Client.

7. Resizing SmartList panes with the Support Debugging Tool. Now, did I say I love the Support Debugging Tool? David Musgrave leverages some obscure Dex functions to make SmartList a dream tool to use.

8. Leveraging Custom Links to track carrier shipments in Sales Order Processing. You know, I am always amazed at how underutilized GP seems to be sometimes, but my duty as a blogger and consultant is to expose these underutilized features to the community.

9. Microsoft Dynamics GP Add-In for Microsoft Word not enabling despite several attempts to install. I had a number of clients come to me with this issue. Upon doing more research, I realized it was a community wide problem and I had to do something about it.

10. Adding more comment lines to POP Purchase Orders. Building on a previous article written by David Musgrave for SOP, I thought I would show how to accomplish the same in POP - it was all worth it as the community gave praises for the solution.

101 articles throughout the year are simple quite a bit of stuff written. I just hope I can keep the good stuff coming. Happy New Year!

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Best of Series, Convergence, Events, Purchasing, Sales Order Processing, Support Debugging Tool, Technical Conference, Word Templates | No comments

Thursday, 6 December 2012

Resizing SmartList panes with the Support Debugging Tool

Posted on 07:14 by Unknown
I have a secret to tell...

At the past GPUG Summit in Seattle, I presented a session,  ITP16 Advanced Microsoft Dynamics GP Administration with the Support Debugging Tool. The session concluded with a demo of the Splitter Control feature implemented with the all too popular Support Debugging Tool. The few individuals in attendance were very impressed, since SmartList resizing had always been a royal pain in the rear for them.

If you have been following the Developing for Dynamics GP blog lately, my dear friend and partner of many presentation battles, David Musgrave has now detailed the secrets of the Splitter Control and provides the code to implement it using the Support Debugging Tool.

SmartList with the Splitter Control (shown inside the red circle)

The Splitter Control uses some cool unsupported Dexterity features so please play with this stuff in a test environment. IF you find anything cool or uncool about it, and you would like to express your feelings, please add your comment to David's article:

Update: Resizing SmartList TreeView and ListView panes using the Support Debugging Tool

Finally, there's no similar control in Silverlight for this Dexterity feature so this will not work with the Microsoft Dynamics GP 2013 Web Client.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dexterity, SmartList and SmartList Builder, Support Debugging Tool | No comments

Saturday, 15 September 2012

Microsoft Dynamics GP Technical Airlift 2012: Day 3

Posted on 15:35 by Unknown
Day 3 was really a short day, but still one packed with lots of excitement.

I arrived on campus fairly early, having not attended any sessions so far, so I decided I would go to the Microsoft Dynamics GP 2013 and Microsoft Azure session being led by Daryl Anderson.

Daryl Anderson
Daryl dove into setting up a Windows Azure account and how to potentially provision servers to support a Microsoft Dynamics GP 2013 Web Client deployment in the cloud. I found this session to be extremely informative, since it provided in depth looks at configuring web servers, session central and service servers, and the management console components, all key elements of the Web Client.

Following Daryl's session, it was show time!

While I was setting up my machine for my session, in the same room, Kim Peterson and Jay Manly were kind enough to assist me with some setup issues I was having.

Kim Peterson and Jay Manley
Be this the time to express my congratulations to Kim and Jay for putting together all the logistics that went into making this conference one of the best Technical Airlifts I have attended in recent years. They both went above and beyond, with what I know were extremely long hours in the day (and wee hours of the night) to make this all happen.

My session, D110 Troubleshooting your Developed Solution, went on with good attendance (close to 200 people), walking through different methods and options for troubleshooting customizations developed in Microsoft Dexterity, Modifier with Visual Basic for Applications (VBA), and Visual Studio Tools for Microsoft Dynamics GP. In addition, we covered tools such as Support Debugging Tool, Microsoft SQL Server Profiler, and Process Monitor by the Microsoft Windows Sysinternals team.


Following my session, it was time for the Town Hall Metting and closing session.

Andy Hafer got on stage and congratulated patners and ISVs for a fabulous Technical Airlift, asking for a round of applause for the attendees. He then made sure Kim and Jay (shown above) got a well deserved round of applause for their efforts in putting the conference together.

Andy Hafer (DynamicCommunities.com)
A heart felt moment came when Andy introduced the Microsoft Dynamics GP development team members, who walked in the Dakota room one by one to the claps of partners and ISVs. It was awesome to see how many individuals contributed to the success of Microsoft Dynamics GP 2013 and the Web Client.

Microsoft Dynamics GP Development Team

Microsoft Dynamics GP Development Team
Following a moment of recognition, it was now time for the Town Hall Meeting panel to take the stand. It was also time for Andy to pass the baton to Bob McAdam (twitter: @4mcadam) to moderate the meeting. Bob quickly proceeded to outline some rules of engagements for all who chose to ask questions.

The panel was mainly composed of Microsoft Program and Product managers.

Kevin Racer, Brian Rooney, Theresa Nistler, Daryl Anderson, Gary Tronson, Pam Misialek and Bob McAdam
Note: the panelist with the least tenure at Microsoft has been there for 10 years - way to go Gary! The one with the most tenure, has been at Microsoft for 25 years - way to go Theresa!

Self-note: surprisingly, Mark Rockwell (Rockton Software) waited to be the second person to ask a question :-) Mark was very praiseful of the work performed by the entire Microsoft Dynamics GP development team and congratulated widely for him not having to draw one single line of code for his products to work with the Web Client. Also noteworthy: there was no Bill Marshall (MC2 Software) asking questions :-(

Closing remarks were conducted by Don Morton, who is a member of the Microsoft Business Solutions (MBS) leadership team and the Site Leader for the Microsoft Fargo campus.

Prior to joining Microsoft, Don was the assistant to the president and director of University Relations at North Dakota State University. He has a coaching background, serving as the head football coach at the University of Wisconsin, at the University of Tulsa and at North Dakota State University where he won four conference championships and one national championship.


It only seemed fitting that Don would explain how partners and ISVs must evolve to tackle the new challenges lying ahead and how as part of that evolution, partners should invest in their own education. His speech had many references to his personal experience as a coach which made for some interesting stories.

Don finalized his speech with a number of reminders on upcoming events (see slide in picture above).

It was time to say goodbye as sadly, the conference had come to an end.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dynamics GP 12, Support Debugging Tool, Technical Conference, Web Client | No comments

Monday, 7 May 2012

Adding Customer Item User Defined fields to SOP Invoice

Posted on 07:19 by Unknown
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. As usual with these type of requests, chances are it's been done before and/or it's probably documented in some KB article.

As it turned out, KB article 918943 outlines the steps required to add the Customer Item Number to the Sales Blank Invoice Form report:

How to add the "Customer Item Number" field to a quote, order, or invoice form in Sales Order Processing in Microsoft Dynamics GP

The KB article however, makes use of the Report Writer function rw_SOP_GetCustomerItemNumber to get around the issue. There's also an additional Report Writer function, rw_SOP_GetCustomerItemDescription which allows you to retrieve the description for the customer item. Now, that's all cool, but what about the user-defined fields?

Customer Item Maintenance

The screenshot above highlights the fields in question. As it turned out, there are no Report Writer functions to retrieve those.

In looking at possible ways to add these fields you could try 3 different things:

1. Use Modifier with VBA to retrieve the user-defined fields. While this is a viable solution, the partner was adamant about not using VBA because of lack of supportability on the Microsoft Dynamics GP 2013 Web Client.

2. Table relationships in Report Writer. After looking at the table keys on SOP_LINE_WORK (SOP10200) and sopCustomerItemXref (SOP60300), I concluded that table relationships would not work either. The problem here is that the SOP_LINE_WORK table does not contain the Customer Number field, required to be able to establish a relationship to the sopCustomerItemXref. After all, if the field existed, there would be no need for the Report Writer functions mentioned above.

3. Support  Debugging Tool. The SDT has the ability to encapsulate Dexterity code with it's Runtime Execute feature. That code can be saved to a Script ID. Furthermore, the Support Debugging Tool leverages the 6 generic Report Writer functions available in the Microsoft Dynamics GP dictionary. These functions were created to allow third party developers a way around an Alternate Report, with the ability to retrieve data from their tables.

For more information on the generic Report Writer functions, take a look at KB article 888884:

Useful functions for developers to use instead of creating alternate reports in Microsoft Dynamics GP

Given all the options and drawbacks, it was decided that Support Debugging Tool would be able to accomplish the job. Since it's a Dex application, it certainly would move forward to Microsoft Dynamics GP 2013 and Web Client, and in addition, would be able to work around the table relationships issue.


One thing I like about the Support Debugging Tool's Runtime Execute is the ability to use the Helper functions. In particular, the helper function needed is one that allows us to leverage a generic Report Writer function, the rw_TableLineString, while line items are being printed on the report - when a line item is displayed, we must display the corresponding Customer Item user defined field.

Insert Helper Function window
Since there's a template for the above function, all we need to do is click on the Ok button. As if the Support Debugging Tool wasn't already helpful, it now autogenerates some of the code needed to work with the rw_TableLineString:

Runtime Execute window with auto-generated Dexterity code

All that's left now is to add a script ID and enter the bit of code needed to retrieve the user-defined fields:

Runtime Execute script

The full version of the script can be found below:
Script ID: CUSTITMUDF
local string MBS_TableLineString;
local string MBS_Number;
local integer MBS_Type;
local currency MBS_SequenceOne;
local currency MBS_SequenceTwo;
local integer MBS_Control;
local string MBS_String;

{Declarations}
local string ItemNumber;
local string CustomerNumber;

call with name "MBS_Param_Get" in dictionary 5261, "Number", MBS_Number;
call with name "MBS_Param_Get" in dictionary 5261, "Type", MBS_String;
MBS_Type = integer(value(MBS_String));
call with name "MBS_Param_Get" in dictionary 5261, "SequenceOne", MBS_String;
MBS_SequenceOne = currency(value(MBS_String));
call with name "MBS_Param_Get" in dictionary 5261, "SequenceTwo", MBS_String;
MBS_SequenceTwo = currency(value(MBS_String));
call with name "MBS_Param_Get" in dictionary 5261, "Control", MBS_String;
MBS_Control = integer(value(MBS_String));
MBS_TableLineString = "";

{ Add your code below here }

{ Retrieve the item number in question }
clear table SOP_LINE_WORK;
set 'SOP Number' of table SOP_LINE_WORK to MBS_Number;
set 'SOP Type' of table SOP_LINE_WORK to MBS_Type;
set 'Line Item Sequence' of table SOP_LINE_WORK to MBS_SequenceOne;
set 'Component Sequence' of table SOP_LINE_WORK to MBS_SequenceTwo;

get table SOP_LINE_WORK by number 1;
if err() = OKAY then
set ItemNumber to 'Item Number' of table SOP_LINE_WORK;
end if;

{ Now, get the customer number }
clear table SOP_HDR_WORK;
set 'SOP Number' of table SOP_HDR_WORK to MBS_Number;
set 'SOP Type' of table SOP_HDR_WORK to MBS_Type;

get table SOP_HDR_WORK by number 1;
if err() = OKAY then
set CustomerNumber to 'Customer Number' of table SOP_HDR_WORK;
end if;

{Since we have the customer number and item number, we should now be able to
retrieve the customer item number
}

if not empty(ItemNumber) and not empty(CustomerNumber) then
clear table sopCustomerItemXref;
set 'Item Number' of table sopCustomerItemXref to ItemNumber;
set 'Customer Number' of table sopCustomerItemXref to CustomerNumber;

get table sopCustomerItemXref by number 1;
if err() = OKAY then
case MBS_Control
in [1] {UDF 1}
MBS_TableLineString = 'User Defined 1' of table sopCustomerItemXref;
in [2] {UDF 2}
MBS_TableLineString = 'User Defined 2' of table sopCustomerItemXref;
in [3] {UDF 3}
MBS_TableLineString = 'User Defined 3' of table sopCustomerItemXref;
in [4] {UDF 4}
MBS_TableLineString = 'User Defined 4' of table sopCustomerItemXref;
in [5] {UDF 5}
MBS_TableLineString = 'User Defined 5' of table sopCustomerItemXref;
in [6] {UDF Key 1}
MBS_TableLineString = 'User Defined Key1' of table sopCustomerItemXref;
in [7] {UDF Key 2}
MBS_TableLineString = 'User Defined Key2' of table sopCustomerItemXref;
in [8] {UDF Key 3}
MBS_TableLineString = 'User Defined Key3' of table sopCustomerItemXref;
in [9] {UDF Key 4}
MBS_TableLineString = 'User Defined Key4' of table sopCustomerItemXref;
end case;
else
MBS_TableLineString = "";
end if;
end if;

{ Add your code above here }

call with name "MBS_Param_Set" in dictionary 5261, "TableLineString", MBS_TableLineString;

Cool balloons! One aspect of the programming was, how to leverage the same function (as opposed to creating multiple scripts that would perform the same operations) to pull in different UDFs? As it turns out, there's a parameter in the rw_TableLineString function, which allows you to specify a control value which determines the position of the piece of data to be returned. This control value is an integer type. Knowing this allowed me to send in a numeric value for the UDF I wanted to retrieve and define a case...end case statement evaluating the control parameter to return the proper UDF field.



Finally, the rest is just house keeping at the Report Writer level... First, we must create two currency calculated fields: one for the Line Item Sequence and another for the Component Sequence. As it turns out, our Report Writer custom function requires two currency parameters. Below is the rw_TableLineString function signature

rw_TableLineString()
in integer dict_id; {Dictionary ID}
in string script_id; {Script ID} in string sNumber; {control field 1}
in integer sType; {control field 2}
in currency cSequenceOne; {control field 3}
in currency cSequenceTwo; {control field 4}
in integer iControl; {which piece of data to return}

Our calculated fields are shown below:

(C) Component Sequence calculated field

(C) Line Item Sequence calculated field

Finally, we need a calculated field to invoke our Report Writer function, which in turn will call our script ID created in Support Debugging Tool. In this specific case, we are going to retrieve the Customer Item user-defined field 1.

CustomerItemUDF1 Calculated Field
 
FUNCTION_SCRIPT( rw_TableLineString 5261 "CUSTITMUDF" SOP_LINE_WORK.SOP Number SOP_LINE_WORK.SOP Type (C) Line Sequence Number (C) Component Sequence 1)

We can now move our CustomerItemUDF1 calculated field onto the report layout:


After granting security to the modified report, we can print an invoice to verify the report works.

As you can see, once more we have leveraged the power of the Support Debugging Tool to deliver what would have otherwise seemed like a difficult or unattainable customization to a report. I hope this is yet another incentive to install the tools and begin taking advantage of its features.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Code, Dexterity, Inventory, Report Writer, Sales Order Processing, Support Debugging Tool | No comments

Wednesday, 18 January 2012

The Support Debugging Tool on Twitter!

Posted on 21:18 by Unknown
As you know by now - hopefully you do - Build 16 of the Support Debugging Tool (SDT) has been officially released - see Support Debugging Tool Build 16 released over at Developing for Dynamics GP for release notes and new features.

However, you may have noticed I have not posted anything about it (don't worry, I am still friends with Musgrave). The reason for the absence of posts on the new SDT build obays to a few reasons:

1. I am going to release a series of video blogs showing the new features on The Dynamics GP Blogster YouTube channel, and as you can imagine, these things take time.

2. I have been thinking of some creative ways to continue to push the SDT to the Microsoft Dynamics GP community as a whole, not just Build 16.

As it relates to the second reason/excuse/goal, and given the adoption of social media throughout the Microsoft Dynamics GP community - check out Social Media for Microsoft Dynamics Partners eBook by MVP Mark Polino and Jon Rivers (twitter: @jon_rivers) if you still don't get the social media drift - I thought it was now time for the Support Debugging Tool to have it's own Twitter hash tag. So please welcome #MSDYNGPSDT.



If you have any questions, comments, or want to relay any experiences with the Support Debugging Tool on Twitter, please use the #MSDYNGPSDT hash tag. Also, don't miss some really cool upcoming news about the tool, which will be available via Twitter.

Disclaimer: I am not allowed to say anything yet, otherwise I will be unfriended by Musgrave on Facebook and that's worse than him not talking to me in real life.

For more resources on the Support Debugging Tool visit the Support Debugging Tool Portal (http://aka.ms/SDT) over at Developing for Dynamics GP.

Until next post!

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

Thursday, 1 December 2011

Resetting GP desktop position and size with the Support Debugging Tool

Posted on 20:12 by Unknown
Just recently I worked on an issue being experienced by several Microsoft Dynamics GP users in a Citrix environment. The users would report that, when double-clicking on the Microsoft Dynamics GP application launch icon, the program would "automatically minimize".

In doing some digging, I remembered a few Dex.ini settings that control whether the Microsoft Dynamics GP desktop shows maximized upon start up and the position at which the desktop appears. So, I took my good ol' friend Notepad and edited the DEX.INI to find the following:

[General]
.
.
WindowMax=FALSE
.
WindowPosX=1605
WindowPosY=902
WindowWidth=1200
WindowHeight=625
Sample DEX.INI entries










As you can imagine, this problem can be easily replicated if you have a dual monitor and move the GP desktop off to a second monitor or by reducing the desktop size and moving the window off screen.

The fix is also pretty simple indeed. Reset the WindowMax key value to TRUE and bring the WindowPosX and WindowPosY key values back to some manageable parameter values, for example 150 and 150. End of the problem, right? Not quite.

The client then requested to put the proper controls in place to prevent this from happening in the future. In some environments where I have been, system administrators have simply decided to make the Dex.ini file read only to avoid any changes being written to the file. However, as my good friend David Musgrave over at Developing for Dynamics GP explains in his article Why making the Dex.ini file read only is evil, this is not such a good idea as it can cause a number of headaches given the dependency Microsoft Dynamics GP has on the key file.

Of course, here's where the Support Debugging Tool comes into play.

The Support Debugging Tool's Dex.ini Configuration feature allows a system administrator to manage individual key file settings at his/her discretion, with the ability to persist the key values for all Microsoft Dynamics GP clients and their respective Dex.ini file. There are 4 deployment scenarios where this can be very useful:

1. In a Server and Workstation(s) scenario, where the server and workstations each will have a copy of the Microsoft Dynamics GP client - hence, each workstation will have its own Dex.ini file.

2. In a Terminal Server or Citrix environment with a single instance of the Microsoft Dynamics GP client - hence a single Dex.ini file.

3. In a Terminal Server or Citrix environment with a single instance of the Microsoft Dynamics GP client, but multiple Dex.ini files, each stored at the user profile level.

4. In a load-balanced Terminal Server or Citrix environment where Microsoft Dynamics GP runs on each server participating in the farm - hence, each server will have its own Dex.ini file.

However, and in all cases for Dex.ini Configuration to work effectively, the Support Debugging Tool's Debugger.xml settings file must be shared (in a central location on the network) and reachable by all Microsoft Dynamics GP clients, regardless of the deployment method. To share the Debugger.xml, you must change the path to the file under the Dex.ini Settings option of the Support Debugging Tool as shown below:

Support Debugging Tool's Dex.ini Settings window

For more information on installing the Support Debugging Tool, see Installing the Support Debugging Tool for Microsoft Dynamics GP FAQ over at Developing for Dynamics GP.

You can then use the Dex.ini Configuration window to control the window size and position for all workstations as shown below:

Support Debugging Tool's Dex.ini Configuration Window

One more thing to keep in mind, is to set the Path Default Setting as indicated above to make sure all workstations inherit the same values automatically.

That's it!

Now that you know how to avoid the headache, go an install the Support Debugging Tool and come to my MSDynamicsWorld Decisions Fall 2011 session on the subject.

Until next post!

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

Wednesday, 23 November 2011

5 Support Debugging Tool features you should be using today: Decisions Fall 2011

Posted on 06:00 by Unknown
The Decisions Fall 2011 virtual conference is around the corner, with Dynamics GP Day scheduled for Tuesday, December 6 2011. Please register to participate in the conference. This is a unique, virtual conference experience. No, it's not a boring webinar and surely not the kind of place where you will be ran over by tons of people walking up in hallways and down escalators trying to get to a session room. You can do this from the comfort of your office, sofa, or even your tricked out basement office. There's no excuse - that I can think of anyways - for not participating.

This time around, I will be presenting a topic around - what else! - the Support Debugging Tool: "5 Support Debugging Tool features you should be using today with Microsoft Dynamics GP". What can I say, I love long session titles.

This session is strictly an end-user oriented presentation whose sole objective is to demistify the complexities of the Standard Mode options in the Support Debugging Tool. That's right! No complex scripts, no Dexterity triggers, no XML mambo jambo... just plain simple talk on what's available for YOU the everyday mortal who works with Microsoft Dynamics GP.

Want the advanced stuff? Meet David and I at Microsoft Convergence 2012 in Houston (more on this in another post).

The session will feature 5 simple demoes that will, once and for all, convince you of installing the tool in your environment.

I will also be a panelist at the Microsoft Dynamics GP MVP Roundtable with my compadres, Frank Hamelly, Jivtesh Singh, and Mark Polino. You get to ask us anything Microsoft Dynamics GP and have some fun in the process. Register now!

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Decisions Conference, MVPs, Support Debugging Tool | No comments

Tuesday, 18 October 2011

Decisions Fall 2011 Virtual Conference registrations now open

Posted on 17:26 by Unknown

Well folks, as I mentioned before, this year-end is going to be a bit busy on my calendar. In addition to my Las Vegas adventure with the GPUG folks, I am speaking at the MSDynamicsWorld Decisions Fall 2011 virtual conference. This time, I am adding a 30-minute, fast paced Support Debugging Tool session.

Please come join my session Five Support Debugging Tool Features You Should be Using Today with Microsoft Dynamics GP. That's it! You just need to sit in for 30 minutes and as a result you will gain a good understanding of the key end-user and administrative functions available in the tool.

Also join me in a live Microsoft Dynamics GP MVP Panel featuring my fellow MVPs, Frank Hamelly, Jivtesh Singh, and Mark Polino. Seriously, in what circus do you get to ask four clowns a question and get an intelligent response? Well, now is your chance. We promise to make this entertaining and fun in a relaxed setting.

Register now!

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Decisions Conference, Events, MVPs, Support Debugging Tool | No comments

Thursday, 28 July 2011

Automating the start and stop of Microsoft Dynamics GP logs with the Support Debugging Tool - Part 2

Posted on 04:00 by Unknown
Yesterday, we tackled the first part of this Support Debugging Tool project, showing how to implement the logging trigger portion. To recap, the application logging files (DEXSQL.LOG and Dexterity Script Log) will begin to record when the Hold checkbox on the Vendor Maintenance window is marked. However, registering the logging trigger will only occur when the Vendor Maintenance form is opened, and unregister, when the Vendor Maintenance form is closed. This will provide an effective set of actions to be recorded as opposed to logging every single action that occurs within the application.

Now that we have implemented the logging portion, we need the two non-logging triggers: the trigger that will start the logging trigger, and the one that will stop it.

The Start Trigger

We will start by setting up the non-logging trigger that will activate the VEND_HOLD_CHG logging trigger (which in turn will begin logging only when the Hold checkbox is marked). We will want to attach this trigger to the Vendor Maintenance form PRE script. We want the logging trigger to register once the Microsoft Dynamics GP code has run, hence we will startup the logging trigger after the original event. Unlike the logging trigger, this trigger start automatically upon the user launching and login into Microsoft Dynamics GP.

ST_VENDHOLD_LOG non-logging trigger - Resource tab

We will move to the Script tab and use a Helper function to assist with adding the code that will start up the logging trigger. By clicking on the Helper button, the Insert Helper Function window displays, from where we can choose the Start an Automatic Mode Trigger ID option in the drop-down list.

Insert Helper Function window
Then we can move to select the logging trigger ID, VEND_HOLD_CHG created previously.

Again, the Support Debugging Tool does most of the sanScript coding needed for this purpose by calling the built-in API procedure MBS_Trigger_Start to start up our VEND_HOLD_CHG trigger. Very convenient!

ST_VENDHOLD_LOG non-logging trigger - Script tab

Next we need to setup the non-logging trigger to disable the logging trigger.

The Stop Trigger

For this case, and instead of trying to replicate all these setups, we can take advantage of the Duplicate button of the Automatic Debugger Mode setup window to create a copy of the start up trigger.

Duplicate Button

Finally, we adjust the non-logging trigger to fire after the Vendor Maintenance form post script has executed, and change its script to call the MBS_Trigger_Stop Support Debugging Tool API function to un-register the VEND_HOLD_CHG trigger, effectively stopping all logging.

EN_VENDHOLD_LOG non-logging trigger
Now is time to turn on our non-logging triggers (which are set to start up automatically on login in into the Microsoft Dynamics GP application).

Turning on non-logging automatic start only triggers
A look the Automatic Debugger Mode status window shows our non-logging triggers waiting for the Vendor Maintenance window to open.

Automatic Debugger Mode Status window
If we open the Vendor Maintenance window we will see our trigger VEND_HOLD_CHG trigger is automatically registered (along with a secondary trigger that captures the original value of the field prior to being selected so it can be restored if needed). The Support Debugging Tool main window will change the color and prompt of the Automatic Debugger Mode button. When the Hold checkbox is marked, the logging trigger activates the logs and displays the desktop alert.


And all of this occurred without the end-user's intervention. In addition, the DEXSQL.LOG and Script Log files will only contain all events that occurred while the window was opened and records were manipulated. Once the Vendor Maintenance window was closed, the logs were suspended.

I have attached the configuration file to be imported with the Support Debugging Tool's Configuration Export/Import window. Once you import the XML file just activate the non-logging triggers as indicated above and you should be good to go.

Vendor Hold triggers - VEND_HOLD.zip

Discover the power of the Support Debugging Tool.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
Read More
Posted in Dexterity, Support Debugging Tool, Troubleshooting | No comments
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 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...
  • 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...
  • Year-to-year Inventory Margin Report using the PIVOT operator in T-SQL
    As of late I have been camping out at the SQL Developer Center's   Transact-SQL Forum  and I have to say, I have learned a great deal fr...
  • 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...
  • 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...
  • 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...
  • 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...
  • 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 ...
  • Management Reporter: Server Error in Application "MANAGEMENT REPORTER"
    Just recently, I fielded a question on an issue that was happening with a Management Reporter installation. The partner reported getting the...
  • Post through from Microsoft Dynamics GP Manufacturing
    As if Post Through wasn't hard enough to understand for the core financial and distribution modules (take a look at my previous article ...

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