Customization Manager 201 Managing Customization Manager.

61
Customization Manager 201 Managing Customization Manager

Transcript of Customization Manager 201 Managing Customization Manager.

Page 1: Customization Manager 201 Managing Customization Manager.

Customization Manager 201

Managing Customization Manager

Page 2: Customization Manager 201 Managing Customization Manager.

Tom MaliaPartnerT&T Data Solutions L.L.C.

About the Presenters

Tim MaliaPartnerT&T Data Solutions L.L.C.

Page 3: Customization Manager 201 Managing Customization Manager.

1. Take the lid off the “Black box”2. Understand where and how customizations

are stored3. Understand how customizations are applied

when a screen runs4. Leverage the knowledge from 2 & 3 to better,

more efficient and more quickly “manage” your customizations

Objectives

Page 4: Customization Manager 201 Managing Customization Manager.

This material is intend for anyone that is responsible for or involved in maintaining Dynamic SL installations (i.e. they have to: keep it running, back it up, upgrade, troubleshoot, etc.)

This material is NOT intended to teach you anything about how to write customizations. However, if you do also write customizations, you may find this information quite helpful.

Target Audience

Page 5: Customization Manager 201 Managing Customization Manager.

Section:

LEVELS

Page 6: Customization Manager 201 Managing Customization Manager.

• Customization “levels”1) Standard

• “out of the box” (just the EXE)

2) Supplemental products• “3rd party” (You can run um, you can’t write um)

3) All Users• “Doesn’t matter what user ID”

4) Group • “user’s ONE customization group”

5) One user• “A specific user ID”

6) Self /save settings on exit

Page 7: Customization Manager 201 Managing Customization Manager.

Dynamics LS “out of the box”

Why?

When to be careful?

Standard

Page 8: Customization Manager 201 Managing Customization Manager.

Q: If you can’t turn on standard mode, then how do you create these?

A: Write an “All User” customization, export it, make a minor change to the header of the customizations, then reimport it….. You’ll see details a little later.

Supplemental Products

Page 9: Customization Manager 201 Managing Customization Manager.

This one’s pretty much self explanatory….

All User

Page 10: Customization Manager 201 Managing Customization Manager.

Q: How many groups?A: “1” per user

Q: How do you write one?A: Select Group ID

Group Level

Page 11: Customization Manager 201 Managing Customization Manager.

Think about what you build on:

Group Level (continued)

A little warning:

Page 12: Customization Manager 201 Managing Customization Manager.

Q: What’s the difference between “One User” and “Self”?A1: Allows a user logged in as themselves to write customizations for another user that shouldn’t have rights to customization manager.A2: “One User” does NOT get mixed up with “Save Setting On Exit” but “Self” does.

One User Level

Page 13: Customization Manager 201 Managing Customization Manager.

Self Level

“Save settings on exit” are indistinguishable from “Self”

A little warning:

Page 14: Customization Manager 201 Managing Customization Manager.

Section:

Where & How are Customizations stored?

Page 15: Customization Manager 201 Managing Customization Manager.

System database:• CustomVBA

• “standard” for current SL versions

• Custom2• “Pre-VBA” Basic Script Language (BSL)

• Custom• OLD! – legacy from 16 bit product

version.

Where are customizations stored?

Page 16: Customization Manager 201 Managing Customization Manager.

What identifies a customizations?

• ScreenID • The executable name

• Sequence • 500 = self• 400 = One user• 350 = Group• 300 = All users• 100 = Supplemental product

• Entity ID• Specific 3rd party, group or user

Page 17: Customization Manager 201 Managing Customization Manager.

How do customizations Load?

Page 18: Customization Manager 201 Managing Customization Manager.
Page 19: Customization Manager 201 Managing Customization Manager.

A little simpler view of the queryThat gets the set of customizations to apply

Page 20: Customization Manager 201 Managing Customization Manager.
Page 21: Customization Manager 201 Managing Customization Manager.

Get the actual customization code & property settings

Page 22: Customization Manager 201 Managing Customization Manager.

1) Supplemental Products

2) All Users

3) Group (GOUPA)

4) One User (TOMMALIA)

5) Self/Save Settings on exit

Page 23: Customization Manager 201 Managing Customization Manager.

Customization Management• Why should you care about all this?

– If you’re an end user…. You really shouldn’t care– If you’re responsible for managing, backing up, upgrading,

trouble shooting a Dynamics SL install, then you may find times when this information is VERY nice to know

• When do I care about this? – NOT – during day-to-day operations while things are working– WHEN:

• Things AREN’T working• You’re upgrading a system• You’re managing a project to add new customizations to a system that

already has customizations• Etc.

Page 24: Customization Manager 201 Managing Customization Manager.

Customization Management• Do I REALLY need to know all the back end stuff?

Aren’t there features and utilities built into the product for all this?

– Ideally you will never “need” to know the “back end stuff”– Yes there are “official” tools for managing customization

data (We’ll be looking at those next)– Sometimes you may have to dig into the “back end stuff”– Other times, it will just be easier for you if you know the

“back end stuff”

Page 25: Customization Manager 201 Managing Customization Manager.

Section:

The OFFICIAL tools for managing customizations

Page 26: Customization Manager 201 Managing Customization Manager.

Official Tools/Utilities:Export Customizations (91.500.00)

Page 27: Customization Manager 201 Managing Customization Manager.

Understanding CST files:The header:

• Supplemental products:' Begin Customization Screen: 0327000 Version: 5 Sequence: 100 ->CompanyName: "Example Sup Prod" -> Description: "" ->System Administrator: FALSE Secure: 55

• All User :' Begin Customization Screen: 0327000 Version: 5 Sequence: 300 -> Description: "A New All Users Customization" System Administrator: FALSE Secure: 55

• One User :' Begin Customization Screen: 0327000 Version: 5 Sequence: 400 UserId: "TOMMALIA" -> Description: "A New One User Customization" System Administrator: FALSE Secure: 55

• The header must be all on one line in the actual file. The “->” represents a “line continuation” for demonstration purposes and would NOT be present in an actual file.

Page 28: Customization Manager 201 Managing Customization Manager.

Understanding CST files:Properties:

Begin Button ButtonHistory'' Version = 6 height = 21 left = 278'' parent = "_SSTab1_TabPage0"'' parentform = "Form1" top = 85 width = 97End

• Changes to the properties of controls are exported in “Plain Text”.

• Here is an example of a customization that simply changed the location of a button.

Page 29: Customization Manager 201 Managing Customization Manager.

Understanding CST files:Code/VBA Project:

' Begin Macro Text*** VBA PROJECT BINARY DATA FOLLOWS. DO NOT MODIFY. ***Length: 400384Compiled: 1MT,\1X*&Q&N$ /@ # /[_"0 & 'M &P $ 'P H #^____ !P " ] &P!M "Q 0 @ ( # #_________________________________________M____________________________________________________________M____________________________________________________________M____________________________________________________________M *YY 0 ." H@F\ @( (P 3@ 'L ,0 P #@ 00 Y #$ M,P R "T -P X #@ . M #$ ,0!$ #$ +0 X #@ 1 P "T , P #8 , YM #< ,P Q $( -@ Y #< ?0 M 3 $,

' End Customization

• The “Macro Text” section contains a UU Encoded Copy of the VBA project which includes any macro code.

Page 30: Customization Manager 201 Managing Customization Manager.

Official Tools/Utilities:Import Customizations (91.510.00)

Page 31: Customization Manager 201 Managing Customization Manager.

Official Tools/Utilities:Import Options

• Overwrite– Deletes current and replaces with new

• Reject customization– If a cust. For a given Screen/level/entity in

the import already exists, then the new customization will not be imported

• Merge– “Tries” to combine existing customizations to

a screen/level/entity with one being imported to the same screen/level/entity

Page 32: Customization Manager 201 Managing Customization Manager.

Section:

Source Code Control & Documentations

Page 33: Customization Manager 201 Managing Customization Manager.

Customization documentationWhat should you document?

• Why was the customization implemented• What does the customization “look like” • Export of current state of the customizations (CST file)• Plain text exports of all VBA code

– Don’t forget DH files also– NOTE! There’s a great new feature in SP1 for this!!! YA!

• SQL Data Definition Language (DDL) scripts to create any needed tables, views, procs, etc.

Page 34: Customization Manager 201 Managing Customization Manager.

Customization documentationHow do you export source code?

Page 35: Customization Manager 201 Managing Customization Manager.

Customization documentationWhere should you put your documentation?

Page 36: Customization Manager 201 Managing Customization Manager.

Something to take home: a script to make project directories

select Distinct 'mkdir "' + ltrim(rtrim(CustomVBA.ScreenId)) + '-' + REPLACE(Screen.Name, ' ', '_') + '\' + case when CustomVBA.Sequence between 0 and 100 then 'SUPPROD\' + LTRIM(rtrim(CustomVBA.EntityId)) when CustomVBA.Sequence = 200 then 'LANG' when CustomVBA.Sequence = 250 then 'LOCAL' when CustomVBA.Sequence between 300 and 349 then 'ALLUSER' when CustomVBA.Sequence between 350 and 399 then 'GROUP\' + LTRIM(rtrim(CustomVBA.EntityId)) when CustomVBA.Sequence between 400 and 499 then 'ONEUSER\' + LTRIM(rtrim(CustomVBA.EntityId)) when CustomVBA.Sequence >= 500 then 'SELF\' + LTRIM(rtrim(CustomVBA.EntityId)) else CONVERT(varchar(4), CustomVBA.Sequence) end + '"' from customVBA left outer join Screen on CustomVBA.ScreenId = screen.Number

mkdir "0101000-Journal_Transactions\SELF\TOMMALIA"mkdir "0327000-Vendor_Maintenance\ALLUSER"mkdir "0327000-Vendor_Maintenance\GROUP\GROUPA"mkdir "0327000-Vendor_Maintenance\ONEUSER\TOMMALIA"mkdir "0327000-Vendor_Maintenance\SELF\SYSADMIN"mkdir "0327000-Vendor_Maintenance\SELF\TOMMALIA"mkdir "0327000-Vendor_Maintenance\SUPPROD\Example Sup Prod"mkdir "0329000-Vendor_Class_Maintenance\SELF\SYSADMIN"mkdir "0826000-Customer_Maintenance\SELF\TOMMALIA"mkdir "TMTCE00-Timecard_Entry\ALLUSER"

Page 37: Customization Manager 201 Managing Customization Manager.

Section:

Customizations During Upgrades

Page 38: Customization Manager 201 Managing Customization Manager.

Upgrade Management:Did you test ALL the customizations?

• You ran the Dynamics SL upgrade, you upgraded the database and a couple users logged into screens without error…. You’re upgrade’s a success!

• Turn the whole company loose on your shiny new Dynamics SL!

• RIGHT?

Page 39: Customization Manager 201 Managing Customization Manager.

Upgrade Management:Keeping track of customization testing results

• Most of you probably already do something like this… A simple spreadsheet to keep track of what needs t be upgraded, tested, etc….

Page 40: Customization Manager 201 Managing Customization Manager.

Upgrade Management:Keeping track of customization testing results

• A slight variation on the same query we looked at for create the “create directory” statements earlier, and you can easily generate data that you can load into Excel to keep track of your customization upgrade.

Page 41: Customization Manager 201 Managing Customization Manager.

Upgrade Management:Something to take home

Page 42: Customization Manager 201 Managing Customization Manager.

Upgrade Management:to recompile or not to recompile. That might be

the question:

• Frequently customizations need no extra attention as a result of an upgrade…. But not always

• VBA “caches” compiled customizations…. This can be a problem if the code “under” the cached customization has changed since it was compiled and cached… but you can force a recompile

• Sometimes, it’s easier to just consistently “re-do” all customizations… but not necessarily from scratch

Page 43: Customization Manager 201 Managing Customization Manager.

Upgrade Management:to recompile or not to recompile. That might be

the question:• VBA “caches” compiled customizations…. This can be a

problem in the code “under” the cached customization has changed since the cache… but you can force a recompile

[Customization]VBASourceSave=NoVBASourceCompile=Yes

• You can add an entry to the Solomon.ini file that will tell Dynamics SL that it should not rely on cached compiled code.

Page 44: Customization Manager 201 Managing Customization Manager.

Upgrade Management:to recompile or not to recompile. That might be

the question:

• Sometimes, it’s easier to just consistently “re-do” all customizations… but not necessarily from scratch

• Sometimes it’s easiest to just bight the bullet and “redo” all customizations by importing modified CST files that have the macro section removed.

• Then manually import or copy and past the VBA code back into the projects.

• *Note: there’s a really good chance that with the ability to export vba code as plain text that comes with version 2011 SP1, this will no longer be necessary.

Page 45: Customization Manager 201 Managing Customization Manager.

Section:

Where angles fear to tread…

UNOFFICIAL managemenet tools

Page 46: Customization Manager 201 Managing Customization Manager.

Adv. Management:The UNofficial way

Proceed at you own risk!What follows is not officially supported by Microsoft.T&T, Microsoft & SLUG are not responsible if you screw up your system doing this stuff!

(But I’ve been doing it for years and so far so good)

Page 47: Customization Manager 201 Managing Customization Manager.

Adv. Management:Quick & Dirty Backups

All customizations are stored in the Custom tables in the system database…. So....

Select CustomId ,Description ,EntityId ,RecordIndex ,ScreenId ,Sequence ,Version ,PropDataINTO MyCustomVBA_BackupFrom CustomVBA

Here’s a REALLY simple way to create a “quick & Dirty” backup of all or part of your customizations to a new table so you could “restore” them back later if you need to.

See prior warning message!

Page 48: Customization Manager 201 Managing Customization Manager.

Adv. Management:Restore Q&D Backup

Restoring a “Quick & Dirty” backup of your CustomVBA table is basically just the reverse of creating one.

See prior warning message!

Page 49: Customization Manager 201 Managing Customization Manager.

Temporarily remove one or more customizationsOnce you know what uniquely identifies a customization and how they load, now it should befairly obvious, how easy it could be temporarily “remove” a customization or a group of customizations:

See prior warning message!

Page 50: Customization Manager 201 Managing Customization Manager.

Adv. Management:“One User” Templates

Group customizations are a handy addition, but do have limitations (i.e. only one group per user). Sometimes it would be nice to be able to “copy” customizations written for one user to another user. (Note: the “official” way to do this is, export, change the header line, reimport)

See prior warning message!

Page 51: Customization Manager 201 Managing Customization Manager.

Section:

Supplemental Products Customizations development techniques

Page 52: Customization Manager 201 Managing Customization Manager.

Editing/Testing Supplemental products• You can not start customize mode

while in supplemental products level.

• The easiest thing is to “move” them to all users

• But you still have to test to make sure other levels will be compatible with the changes.

• An easy way to do this is to “move” the whole stack of customizations “up” one level

See prior warning message!

Page 53: Customization Manager 201 Managing Customization Manager.

Shift One User to Self and switch to Dev User• The first step is to move

the one user customizations to “self” and switch the user ID to a “Development User”. This will be the user ID that you log in with to do your development and testing

See prior warning message!

Page 54: Customization Manager 201 Managing Customization Manager.

Shift Group to One User and switch to Dev User• Next step is to move the

group customizations to “one user” and switch the user ID to a “Development User”.

See prior warning message!

Page 55: Customization Manager 201 Managing Customization Manager.

Shift All User to Group

• Next step is to move the All Users customizations to “Group” level.

See prior warning message!

Page 56: Customization Manager 201 Managing Customization Manager.

Shift All User to Group

• Next step is to move the Supplemental products customizations to “All Users” level.

See prior warning message!

Page 57: Customization Manager 201 Managing Customization Manager.

Shift Supplemental Prod. To All User

• Next step is to move the Supplemental products customizations to “All Users” level.

See prior warning message!

Page 58: Customization Manager 201 Managing Customization Manager.

Editing/Testing Supplemental products• When you’re done with all

this, you effectively have the exact same set of customizations just with everything shift “up” so there’s nothing in the “Supplemental Products” section. So you’re free to customize and test any level by just changing the customization level.

See prior warning message!

Page 59: Customization Manager 201 Managing Customization Manager.

Move everything up to customize Move everything back when done

Page 60: Customization Manager 201 Managing Customization Manager.

Questions?

Page 61: Customization Manager 201 Managing Customization Manager.

Wrap up• THANK YOU!!!• Please fill out your evaluation forms for session:

Customization Manager 201• Speaker Contact information:

Tom MaliaT&T Data Solutions [email protected](410) 939-8382