Dynamics SL VBA Unbound Fields

When adding an unbound field to a Dynamics SL form for a VBA screen customization it’s pretty common to see System Message 5005, “Unable to locate field … in table b…. Error in property of control Form1.x….” Fill in the field name, table name and control name where the ellipsis appear above. Most customized controls in a VBA customization only have two numbers in the fieldname property, so it’s easy to follow suit for the unbound control. That’s the problem.... Continue reading →

Converting Dynamics SL BSL to VBA

Dynamics SL 2018 doesn’t support BSL screen customizations any more. These must be converted to VBA. Contact third-party vendors to obtain updated scripts when appropriate. Here are steps to convert All User, One Group, and Self customizations. Do this in non-production databases, of course. The first step is to export the BSL components from the old environment using “Export Customizations (91.500.00)”. Select all the BSL customizations at the levels above and save the “CST” file. You can edit it with... Continue reading →

Editing Dynamics SL CST Files with VS Code

I often edit Dynamics SL (DSL below) customization files using a text editor. I find this especially helpful when working on customizations with levels between 100 and 299, or when the CST file contains several customizations. I export the customization(s), edit, then import back. I’ve started using VS Code for this recently. It’s easy to configure it. First, add the “VSCode VBA” extension. Click View > Extensions and type VBA in the Search Extension box. Click “VSCode VBA”, then the... Continue reading →

Microsoft Dynamics SL 2018 Project Template for Visual Studio 2019

UPDATE (2023-03-14): You CANNOT use the Visual Studio 2022 Windows Forms designer with the Dynamics SL 2018 CU9 SDK or prior versions at this time. The solution is to use Visual Studio 2019 or earlier versions. The reason is that VS 2022 is a 64-bit application and the Windows Forms designer requires 64-bit controls. The Dynamics SL SDK controls are 32-bit controls. You cannot add them to the toolbox and the designer will show nothing but an error message if... Continue reading →

Dynamics SL and Extended Events

I’ve been using Profiler to explore Dynamics SL’s database calls for years. Recently, I learned about Extended Events, which is Microsoft’s replacement for Profiler. They’ve done an excellent and, for me, compelling job of replacing Profiler. I’ll abbreviate Extended Events as XEvent(s) or XE below. If you download SSMS 17 from the Microsoft web site, you’ll see something called XEvent Profiler at the bottom of Object Explorer. There are two pre-configured sessions to watch live events. No need to launch... Continue reading →

Using the Microsoft Dynamics SL 2018 SDK with Visual Studio 2017

UPDATE: Dynamics SL 2018, CU3 (and later CUs) include an msi named “SDKSetupVS2017.msi” that is the official SDK when working with Visual Studio 2017 and 2019. This post remains helpful if you have a prior CU installed and cannot install the latest CU for some reason… Solomon Cloud Solutions published a very similarly named post back in 2016. The post works for our purposes with a few modifications and one caveat. The bolded lines from that post are included in... Continue reading →

December, 2017, Dynamics SL Web App Tips

It’s been a busy year, and a long time since I blogged. Here’s one for a fairly small audience. 😉 When installing the December, 2017, hotfix for the Dynamics SL Web Apps I saw the message: “There was an issue registering the CRUFLADG.DLL. Attempt to register the file manually using regasm.exe from the Framework 64 folder.” The message is misleading. It’s is a 32 bit assembly. Use the 32 bit version of regasm.exe to register it. Launch a command prompt... Continue reading →

Dynamics SL Custom Table Permissions for PV Lookups

I created a PV Lookup (showing Possible Values) for a custom table for a Microsoft Dynamics SL 2015, CU 1, SDK application. Immediately after pressing F3 I got a TargetInvocationException in Visual Studio. The Visual Studio Output window listed an unhandled exception in the Microsoft.Dynamics.SL.Controls assembly at SetSqlDataSource. Digging into the Call Stack showed the exception came from the CTLBPVSql method in the swimapi.dll. A SQL Trace showed a statement that ran correctly using my credentials, but Dynamics SL runs it as the... Continue reading →

Setting the DSLMaskedText Mask with SetProps

If you’re still reading, you’re probably a Dynamics SL programmer, scratching your head. I had a requirement today that I guess I’ve never had before: set the Mask property dynamically at runtime based on values in a definition table. The table contained the mask character and length. Of course, you need to use the SL SDK method SetProps. I created the string with the new mask, in this case “UUUUU” (five characters long). The original mask had 15 characters. According to the... Continue reading →

Finding the View in Web Apps

You can often accomplish customer requirements, such as hiding textboxes or other controls, in the Dynamics SL Web Apps by editing Views. Often, but not always, you can identify the view you need to edit by looking at the final segment of the URL in your browser’s address bar. Before going further, I should note that you can sometimes hide fields without any programming by using the Administration Access Rights web app. This app lets you select a user or group, then the... Continue reading →