KBA-01635: Dynamics SL CST files not opening

Purpose & Scope:

Microsoft Dynamics SL customizations are not opening, and VBA Code appears with the message: Compile Error: User-defined type not defined. (See the screen shot in Additional Comments.)

Or, the screen opens and displays the message “Attempting to set text control to an invalid value.  Value violates the Mask length.”  (System Message 6938)

Procedure:

Preparation

  1. Request the individual CST files you need from Spitfire Support.
  2. Run Microsoft Dynamics as an Windows Administrator (elevated, not DSL login)
  3. In SQL Management Studio, remove any prior customizations. One way to do this indiscriminately is using the command below (which uses screen 03.250.00 as an example).
    Note: Make note of the Sequence Level of this customization.

    1. Example 1: DELETE FROM dbo.CustomVBA WHERE ScreenId = ‘0325000.
    2. Example 2:DELETE FROM dbo.CustomVBA WHERE ScreenId = ‘0325000‘ and (Entityid = ‘SPITFIRE‘ or Description like ‘sfPMS%‘)

In Microsoft Dynamics SL

  1. Run the Import Customization tool – 91.510 and import the specific CST from Spitfire (this creates a “one group” customization).
  2. Double Click on Self (in the bottom status area)
    KBA_01635_1
  3. Choose One Group.
  4. Check Exclude Event Code.
    KBA_01635_2
  5. Open the screen (perhaps AP Document Maintenance – 03.250)
  6. Press ALT+CTRL+C.
  7. Press F7 to open VBA.
  8. Choose Tools | References.
  9. Note if “Customization Module for Spitfire Software…” does not appear or is not checked.
  10. Click in list box (be careful not to check or uncheck anything).
  11. Type D.
  12. Look up the list and check “Customization Module for Spitfire Software….”
  13. Click OK.
  14. Click Save.
  15. Close VBA.
  16. Close the DSL screen.
  17. Double-click on ONE GROUP ( in the bottom status area).
  18. Uncheck Exclude Event Code.
  19. Select the Self radio button.
  20. Click OK.
  21. Test your Customization.

In SQL

You can review the customization level in the field “Sequence”

  • 100 is Supplimental
  • 300  is All User
  • 350 is One Group
  1. Run a SQL Script to change the sequence
    UPDATE dbo.CustomVBA.
    SET EntityID = ‘Spitfire’, Sequence = 350
    WHERE ScreenId = ‘0325000‘ and Description LIKE ‘SFPMS%

Additional Comments:

Note that the INI option [Customization] VBASourceCompile=Yes in C:\Program Files (x86)\Microsoft Dynamics\SL\Applications\solomon.ini as described in DSL KB 2001541 is known to cause this error with no known workaround.  Do not use this option!

The error looks like this:

KBA_01635_3


KBA-016035; Last updated: December 16, 2019 at 18:40 pm