Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

How to change Customization VB code in SL 2015

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I'm new to SL and I'm working on a SL 2015 project which already has a number of customized screens.

In the page "Vendor Maintenance 0327000" I have a customized version. I select All Users and put the page in customized mode and then press F7 to open the VBA environment. Then I change some parts of code and I save the VB code. Then I close VBA and I press "Save changes" and then I exit from custom mode and then closing the screen.

But when I reopen Vendor maintenance and open the VB code again, all of my changes are gone! 

How can I save my changes in the current customization?

I tried to export that customization (CST file) before I close the page and then deleting related records from CustomVBA table and then import the saved customization. (all in All user mode) but it didn't work.

Would be great if somebody can help with a solution.

another question (may be not related): is it important to where (which path) saving the CST file?

Thanks,

Ali

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to change Customization VB code in SL 2015

    Hi PerumalSamy,

    Finally, I discovered what was happening. My customizations were under sequence 107 which is not a standard customization level. I change it manually to 300 (All users) and now it's working perfectly. I just don't know why we needed that sequence code instead of 300. 

    Apparently VBA environment was getting confused when it didn't find a standard customization sequence.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to change Customization VB code in SL 2015

    Hi PerumalSamy,

    Thank you for your reply, It makes it more organized for me to figure out how to do it. but still I have the issue. I mean the scenario which you provide is great for adding a brand new customization, but my issue is I want to modify some already existed customization.

    My original issue is that vendor maintenance page works ok in customized mode for Administrator, but when we use another user (for example ali) this page crash at the beginning and it pops up the error message "invalid memory array handle passed to kernel". and  do not loads any element on the form.

    When I check the sql profiler and code,  I noticed that some parts of code are a bit suspicious and I do not have access to former developers to ask them about the code.

    So I try to modify that suspicious VB code and check how the changes affects the behaviour. But regarding to do this I faced with that new issue which I described above. I can not modify the existing VB code for current customization.

    With your suggestion I start a new customization on that page and I was able to modify code and each time which close and reopen it the code is get updated which is good.

    And I guessed I can add the previous code gradually and see when it start to fail.

    But, when I manually add those code and modules from previous customization it gave me some compilation errors.

    Do you have any suggestion about how can I migrate my previous code to new customization an a proper way?

    Also I noticed When I import CST fro all users I have 18 related records in CustomVBA but when I add those code and modules and compile the project it only add 15 records to DB which I think is because it has some compilation error and can't finish them properly. Is my assumption true about it?

    Thanks,

    Ali

  • Suggested answer
    Ram Peru Profile Picture
    Ram Peru 2,830 on at
    RE: How to change Customization VB code in SL 2015

    Hello Alit,

    I have also faced similar kind of behavior when doing the customization. I think you are doing the customization in different sequence instead of ALL User sequence

    Please try the below steps to overcome this situation

    • Take the backup of all the customization related to vendor maintenance

    • Take the each sequence level (supplemental, ALL User, One Group , One User & Self) backup of vendor maintenance

    • Delete the related records for vendor Maintenance records from CustomVBA & Custom2 tables.

    o Note: please include where condition before deleting records from those tables

    • Import the ALL User level customization alone into Dynamics SL

    • Then do your changes in the customization and Save changes

    • Take the backup of CST

    • Import other customization one by one in proper sequence

    You can overcome this situation by the above steps. Hope this explains

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans