Page 1 of 3712345678910...20253035...Last »

Microsoft Dynamics GP 2015 not showing Service Enabled Procedures

David Meego - Click for blog homepageIt has been a while since I last posted on the blog. I have been working flat out to finalize the GP Power Tools code and documentation. All I can say is that the Microsoft Dynamics GP community will be amazed with some of the new features and will love the improvements above and beyond the Support Debugging Tool. I will be starting a “What’s New” in GP Power Tools series of posts soon.

Anyhow, the subject of today’s post is an issue in Microsoft Dynamics GP 2015 that I discovered while testing the GP Power Tools code.

The Security Task Entry window can be used to add access rights for Service Enabled Procedures in any of the product dictionaries.  Just select the Security Task ID and then select the product, Type as Service Enabled Procedures and the series.

SecurityTaskEntry2Security Task Entry working

All seems working as expected…. until you create a modified forms dictionary for that product, by going into the Modifier. You don’t have to make any changes, the existence of the forms dictionary is all that is needed. Now the Service Enabled Procedures for that product no longer show up.

SecurityTaskEntry1
Security Task Entry no longer showing Service Enabled Procedures

As I have very similar code in the new Script Explorer window in GP Power Tools, I was seeing the same behaviour. This is what sparked the investigation into what was happening.

I tested the code that reads the dictionary and it is able to see the list of global procedures in the dictionary fine, but the check to see if the script is Service Enabled with the Script_GetSystemProperty() function fails to return the any data and so no scripts can be identified as Service Enabled.

I have reported this issue to Microsoft.  In the meantime, if you need to set security to Service Enabled Procedures, temporarily rename the custom forms dictionaries and re-launch Microsoft Dynamics GP.

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: 2015, Dynamics, GP, Microsoft Tagged: Application, Exception, GP 2015

Read more here:
Microsoft Dynamics GP 2015 not showing Service Enabled Procedures

June 30, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 12

Friday Funny: Best Marriage Proposal

David Meego - Click for blog homepageThere have been some amazing marriage proposals posted via social media and YouTube over the last few years, but this has got to be one of the coolest one yet.

Maybe that’s just because it is from an Australian guy ….

Watch below to see Liam Cooper’s proposal to his long time girlfriend, Amy Smith:

Aussie guy proposes to girlfriend in packed cinema. Best wedding proposal EVER! (Direct link)

 

Here is the full music video created for the proposal:

Rude by Magic! (Cover & Music Video for Wedding Proposal!) (Direct link)

 

Here are some other movie trailer proposals (in no particular order):

Enjoy

David

PS: Now, go get a tissue and dry your eyes now.

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Fun Tagged: Friday Funny, Fun

Excerpt from:
Friday Funny: Best Marriage Proposal

June 19, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 34

Friday Funny: Game of Thrones: The Musical

David Meego - Click for blog homepageIf haven’t been hiding under a rock or burying your head in the sand for the last few years, you would have heard of that small show on HBO called Game of Thrones. Based on George R. R. Martin’s A Song of Ice and Fire book series, the show has a reputation for frequent use of nudity, violence, sex and for killing off lead characters in many varied ways.

You have enjoyed the books and TV show and now thanks to Chris Martin and his British band Coldplay, you should soon be able to enjoy Game of Thrones: The Musical.

To help raise funds for the US Red Nose Day appeal, the Musical will donate its profits to the cause. On the official Coldplay YouTube channel, videos of the work on the show and some of the songs have been published. Watch them below:

Coldplay’s Game of Thrones: The Musical (Full 12-minute version) (direct link)

 

Game of Thrones: The Musical – Peter Dinklage Teaser (direct link)

 

Game of Thrones: The Musical – Emilia Clarke Teaser (direct link)

 

Game of Thrones: The Musical – Nikolaj Coster-Waldau – Closer to Home (direct link)

 

Game of Thrones: The Musical – Red Wedding Teaser (direct link)

 

If you want to donate to Red Nose Day, use the following link:

Enjoy

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Fun Tagged: Friday Funny, Fun

View the original here:
Friday Funny: Game of Thrones: The Musical

May 29, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 43

Using the Support Debugging Tool to create user accessible SQL Scripts – Part 3

David Meego - Click for blog homepageThis is the third and final article in the series, make sure you look at the previous articles before this one.

The previous articles can be found at:

Today’s article adds the final step by adding a method for a user to execute the code we have written so far without requiring access to any Support Debugging Tool windows.

The Runtime Execute window and SQL Execute windows are Advanced Mode features which makes them only available to users with access to the Administrator features via the security roles AND the system password (if used) AND SQL dbo or SysAdmin privileges. You would not want this sort of access to be given to the average user, so you can use the method in this article to provide access to the scripts we have written from an existing window.

Using the Automatic Debugger Mode we can create a non-logging trigger to call our scripts when an event occurs in the system. The event used can be any of the system events supported by Dexterity, such as opening or closing a window, moving focus in to or out of a field (with or without changing to the field), or clicking on a button. You can also create your own items on the Additional menu to trigger off.

For our example, we are going to use two methods; an additional menu and re-purposing the window print button on the Customer Maintenance window.

Part 3: Exposing the script to any user

The final step is to use Automatic Debugger Mode Setup to call our previously created Runtime Execute script.

  1. Open the Support Debugging Tool main window (Microsoft Dynamics GP >> Tools >> Support Debugging Tool or Ctrl-D).
  2. Open the Support Debugging Tool Setup window (Options >> Setup Automatic Debugger Mode).
  3. Enter the Trigger ID, Trigger Description as desired for menu based trigger.
  4. Check the Start Trigger Automatically on Login, Do not activate Logging Mode and Minimize Debugger Log Entries checkboxes.
  5. Select the Trigger Type: Add Form Menu, Trigger Event: Form Level, and Trigger Attach: After Menu Selected.
  6. On the Resource tab, select Product Name: Microsoft Dynamics GP, Form Name: RM_Customer_Maintenance, Menu Entry: Check and Update Hold, Accelerator Key: U.
    Trigger1
  7. On the Script tab, set Context: Microsoft Dynamics GP and the script to:
    out boolean OUT_Condition;
    local text MBS_Text_Field;
    local integer MBS_Dictionary;
    local integer MBS_Status;
    
    OUT_Condition = false;
    
    if isopen(form RM_Customer_Maintenance) then
    	OUT_Condition = true;
    
    	call with name "MBS_Script_Load_Dex" in dictionary 5261,
    		"DEMO1", MBS_Text_Field, MBS_Dictionary;
    
    	call with name "MBS_Runtime_Execute" in dictionary 5261,
    		MBS_Text_Field, MBS_Dictionary, MBS_Status;
    	if MBS_Status <> OKAY then
    		warning MBS_Text_Field;
    	end if;
    
    end if;
    

    Trigger2

  8. You can use the Helper Button at the bottom of the window to insert Helper Functions at the current cursor location for loading and executing the Dexterity Runtime Execute script. Variables needed will be automatically added to the top of the script.
  9. No changes needed on the Actions and Options tabs
  10. Click Save.
  11. Enter the Trigger ID, Trigger Description as desired for button based trigger.
  12. Check the Start Trigger Automatically on Login, Do not activate Logging Mode and Minimize Debugger Log Entries checkboxes.
  13. Select the Trigger Type: Focus Event, Trigger Event: Field Change, and Trigger Attach: Before Original.
  14. On the Resource tab, select Product Name: Microsoft Dynamics GP, Form Name: RM_Customer_Maintenance, Window: RM_Customer_Maintenance, Field Name: WindowPrint.
    Trigger3
  15. On the Script tab, set Context: Microsoft Dynamics GP and the script to:
    in string IN_OldValue;
    in string IN_NewValue;
    out boolean OUT_Condition;
    
    local text MBS_Text_Field;
    local integer MBS_Dictionary;
    local integer MBS_Status;
    
    OUT_Condition = false;
    
    if isopen(form RM_Customer_Maintenance) then
    	OUT_Condition = true;
    
    	call with name "MBS_Script_Load_Dex" in dictionary 5261,
    		"DEMO1", MBS_Text_Field, MBS_Dictionary;
    
    	call with name "MBS_Runtime_Execute" in dictionary 5261,
    		MBS_Text_Field, MBS_Dictionary, MBS_Status;
    	if MBS_Status <> OKAY then
    		warning MBS_Text_Field;
    	end if;
    
    end if;
    

    Trigger4

  16. You can use the Helper Button at the bottom of the window to insert Helper Functions at the current cursor location for loading and executing the Dexterity Runtime Execute script. Variables needed will be automatically added to the top of the script.
  17. On the Actions tab, check the Issue Reject Script checkbox to prevent the original button script from running after our trigger code finishes.
  18. No changes needed on Options tab.
  19. Click Save.

To automatically enable the triggers, just log in again to the company. To manually enable the triggers, from the Support Debugging Tool main window, select Turn On Automatic Debugger Mode >> Non Logging Automatic Start Only. To disable the triggers, from the Support Debugging Too main window, select Options >> Automatic Debugger Mode Status and then click Unregister >> Non Logging Triggers Only. To disable all triggers, use Unregister >> All Triggers, this is required if you want to open the Setup Automatic Debugger Mode window again.

Notes

  • Use the Automatic Debugger Mode Status window (Options >> Automatic Debugger Mode Status) to confirm that the triggers are registered and active.
  • Note that the target window must be closed and re-opened after the triggers are enabled before they will be active.
  • If re-purposing an existing button, you can use an ask() dialog to ask if you want the original purpose or the new purpose to execute. For the original purpose, exit the script with the variable OUT_Condition equal to false. For the new purpose, perform the desired actions and exit the script with the variable OUT_Condition equal to true and the action Issue Reject Script ticked.
  • If you are having problems getting the code to work, uncheck the Minimize Debugger Log Entries checkbox to get more information recorded in the Debugger__.log file.
  • It is possible to load and execute the SQL Execute scripts directly using the Dexterity trigger code and bypass Step 2 of this series using Runtime Execute, however this makes it harder to test the code as you will need to keep registering and unregistering the trigger.

Below is the Debugger Settings files with all the code for the examples in this series.

Please write feedback and comments below to let me know how you think you could use these methods in your systems.

Hope you found this series useful.

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Development, Dexterity, Dynamics, GP, Microsoft, Products, SQL Server, Support Debugging Tool Tagged: Application, Dexterity, SDT, SQL, Support Debugging Tool

Originally posted here:
Using the Support Debugging Tool to create user accessible SQL Scripts – Part 3

May 18, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 61

Using the Support Debugging Tool to create user accessible SQL Scripts – Part 2

David Meego - Click for blog homepageThis is the second article in the series, if you haven’t already, please see the previous article: Using the Support Debugging Tool to create user accessible SQL Scripts – Part 1.

Today’s article adds a simple user interface for the previously created SQL scripts using Dexterity sanScript.

Last article we created a couple of SQL queries and saved them in SQL Execute. We will now re-use those scripts in our code, adding an additional where clause based on input from the user.

This highlights a couple of very cool features of the Support Debugging Tool: The ability to execute previously saved SQL scripts from Dexterity and the ability to execute a previously saved Dexterity script (against any dictionary). Along with the helper functions that allow you to read and write to fields in any window on any form in any dictionary, it makes the Support Debugging Tool a very powerful cross dictionary, cross environment development tool.

Part 2: Create the User Interface

The next step is to use Runtime Execute to create a simple user interface using system dialogs and the SQL scripts saved previously.

  1. Open the Support Debugging Tool main window (Microsoft Dynamics GP >> Tools >> Support Debugging Tool or Ctrl-D).
  2. Open the Runtime Execute window (Options >> Runtime Execute).
  3. Enter the Script ID, Script Name and script for the code to execute.
    local string l_string;
    local text MBS_Text_Field;
    local integer MBS_Status;
    
    if not getstring("Customer ID begins with:", false, l_string) then
    	abort script;
    end if;
    
    call with name "MBS_Script_Load_SQL" in dictionary 5261,
    	"DEMO1", MBS_Text_Field;
    
    if not empty(l_string) then
    	MBS_Text_Field = MBS_Text_Field + "and CUSTNMBR like " + SQL_FormatStrings(l_string+"%");
    end if;
    
    clear MBS_Text_Field;
    MBS_Text_Field = MBS_Text_Field + "select * from table" + char (13);
    call with name "MBS_SQL_Check_Exists" in dictionary 5261,
    	MBS_Text_Field, true Return Data, false Show Names, MBS_Status;
    case MBS_Status
    	in [OKAY]
    		warning MBS_Text_Field;
    	in [MISSING]
    		warning MBS_Text_Field;
    		abort script;
    	else
    		warning MBS_Text_Field;
    		abort script;
    end case;
    
    if ask("Do you want to clear Hold flags?", "Yes", "No", "") <> ASKBUTTON1 then
    	abort script;
    end if;
    
    call with name "MBS_Script_Load_SQL" in dictionary 5261,
    	"DEMO2", MBS_Text_Field;
    
    if not empty(l_string) then
    	MBS_Text_Field = MBS_Text_Field + "and CUSTNMBR like " + SQL_FormatStrings(l_string+"%");
    end if;
    
    clear MBS_Text_Field;
    MBS_Text_Field = MBS_Text_Field + "select * from table" + char (13);
    call with name "MBS_SQL_Check_Exists" in dictionary 5261,
    	MBS_Text_Field, true Return Data, false Show Names, MBS_Status;
    case MBS_Status
    	in [OKAY]
    		warning MBS_Text_Field;
    	in [MISSING]
    		warning MBS_Text_Field;
    	else
    		warning MBS_Text_Field;
    		abort script;
    end case;
    
    warning "Completed.";
    

    RuntimeScript

  4. You can use the Helper Button at the bottom of the window to insert Helper Functions at the current cursor location for loading and executing the SQL script. Variables needed will be automatically added to the top of the script.
    Helper1
    Helper2
  5. Use the Execute Button to test your script and ensure it works as desired.
  6. Click Save.

The script uses the getstring() function to obtain an input from the user. It then loads the display SQL script previously stored and adds an additional expression to the where clause based on the user input. The script then executes the SQL query and displays the returned data.

If data has been displayed then the ask() function is used to display a dialog asking if the user wishes to clear the Hold flags. If the response is Yes, the previously stored update SQL script is loaded, has its where clause adjusted and is executed. Finally, the warning command is used to tell the user the update has been completed.

Notes

  • You can change the dictionary context that the Dexterity sanScript code is executed against. Use Microsoft Dynamics GP unless you specifically need to access resources in another dictionary.
  • You can use Dexterity system dialogs such as getstring(), ask(), getfile(), savefile() error, and warning to provide a user interface.
  • You can also use Helper Functions to read values from any window in any dictionary.
  • Using Helper Functions to load and execute either SQL or Dexterity scripts allows for code re-use.
  • SQL scripts loaded via the Helper Functions can be modified prior to execution via a Helper Function. Note: Remember to delete or comment out the lines added which create a simple query when using the Execute SQL Select Statement Helper Function
  • There are also Helper Functions to Set, Get and Delete Parameters which can be used to pass information between the main script and called Dexterity scripts.
  • Runtime Execute).

Stay tuned for the final part of the puzzle.

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Development, Dexterity, Dynamics, GP, Microsoft, Products, SQL Server, Support Debugging Tool Tagged: Application, Dexterity, SDT, SQL, Support Debugging Tool

More:
Using the Support Debugging Tool to create user accessible SQL Scripts – Part 2

May 13, 2015 · WinthropDC · No Comments
Tags: , , , , , , ,  · Posted in: Blogs I Follow Total Views: 69

Using the Support Debugging Tool to create user accessible SQL Scripts – Part 1

David Meego - Click for blog homepageIt has been a while since I have posted a technical article on the blog. This is because I am spending almost all my time working on bringing some existing and new products to market.

I am still working on the rebranded and improved release of the Support Debugging Tool. There will be a number of improvements in its features and navigation, more on that soon.

For now, I wanted to post a really clever method of using the Support Debugging Tool to provide additional functionality to end users.

At the reIMAGINE 2014 conference in Fargo last November, Mariano Gomez and I demoed a method of creating a user accessible SQL script. The series covered in the next few posts will take you through the steps to create your own scripts on your system.

The Scenario

I will use the same scenario as we demonstrated at the conference. This will help explain the techniques involved so you can create your own examples.

For our example, we will use queries to check for customers that are marked as on Hold and update customers on Hold to remove the Hold flag.

The end result we want is a user accessible menu entry which can be used to display any customers on Hold which meet a user entered “Begins with” value and then have the option to clear the Hold flag.

Note: The series assumes that the Support Debugging Tool is installed using the Recommended Configuration (shared setup file location) and that you have Advanced Mode features enabled and available to you.

Part 1: Create the SQL Queries

The first step is to use SQL Execute to create and save the SQL queries needed to display and update the data.

  1. Open the Support Debugging Tool main window (Microsoft Dynamics GP >> Tools >> Support Debugging Tool or Ctrl-D).
  2. Open the SQL Execute window (Options >> SQL Execute).
  3. Enter the Script ID, Script Name and script for your display query:
    select Customer Number from RM_Customer_MSTR where Hold <> 0

    SQLScript1

  4. Click Save.
  5. Enter the Script ID, Script Name and script for your update query:
    update RM_Customer_MSTR set Hold = 0 where Hold <> 0

    SQLScript2

  6. Click Save.

Notes

  • You can use Dexterity Technical Names in your queries if they are surrounded by braces  and SQL Execute will convert them to physical table and column names before execution for you.
  • If you want more than 20 rows returned for the display query, you can change or remove the limit.
  • If you want the query execute against the System database or a specific company database, you can change the Execute Query context drop down list.
  • If you wish to be able dynamically change the query ensure that you can make your changes by adding code at the beginning or end of the script. This can be achieved by setting a variable at the beginning of the script or by adding where clause to the end.
  • You can use more descriptive Script ID and Script Names for your scripts.

More to come on the next post.

David

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Dexterity, Dynamics, GP, Microsoft, Products, SQL Server, Support Debugging Tool Tagged: Application, Dexterity, SDT, SQL, Support Debugging Tool

Read More:
Using the Support Debugging Tool to create user accessible SQL Scripts – Part 1

May 11, 2015 · WinthropDC · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 59

Friday Funny: Can you understand Strayan?

David Meego - Click for blog homepageWhile I was originally born in London, England (yep, I’m a Pom*), everyone knows that I come from Australia. My family emigrated to Perth when I was 13 and I have had the operation to naturalise me as an Australian.

Probably due to my English background and the fact that accents in Perth are not strong, I don’t have a strong Australian accent (Not like Paul Hogan’s Crocodile Dundee character – watch trailer or Steve Irwin real character – watch trailer). However, I do use some different words and sometimes use Australian slang or abbreviations.

Today, I came across some videos on YouTube by Queensland filmmaker Kieran Murray who has travelled the world and introduced the inhabitants of other nations (primarily USA) to Australian slang. The confusion he creates is very funny.

G’Day Mate! How You Going? (direct link)

 

G’day Mate: The Sequel (direct link)

 

Aussie Slang (direct link)

 

There are a number of sites online where you can look up Australian slang (sometimes called the Strine* vernacular):

 

So a challenge for you ….

What does the following sentence from the end of one of the videos above mean?

“This arvo I’m gonna go down to the servo get a packet of durries and maybe some grog.”

Post your answers in the comments.

David

* Pom = Actually POHM which stands for Prisoner of His/Her Majesty and harks back to Australia’s beginnings as a British penal colony.

* Strine = Say “Australian” quickly as a single syllable with your back teeth lightly clenched together… you don’t want to let the flies get in.

This article was originally posted on http://www.winthropdc.com/blog.

Filed under: Fun Tagged: Friday Funny, Fun

See the original article here:
Friday Funny: Can you understand Strayan?

April 24, 2015 · WinthropDC · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 55