Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics SL (Archived)

Exclude Even Code not working as expected in SL2015

Posted on by 130

I have succefully installed HF 34551SY for SL2015 that was fixing the issue of OnCancel, OnDelete, OnFinish, OnInsert and OnUpdate in customization VBA. Before this fix, my custom screens using any of these procedures could load and display. After the HF, custom screens with  OnCancel, OnDelete, OnFinish, OnInsert and OnUpdate now crash.

In SL2011, the procedure is

Private Sub Update1_OnUpdate(Level As Integer, InsertFlg As Integer, retval As Integer) and it compiled without an issue. In 2015, after the HF, the procedure now is

Private Sub Update1_OnUpdate(ByVal Level As Integer, ByVal InsertFlg As Integer, retval As Integer).

The difference being the key word 'ByVal' before Level and InsertFlg. 

So if I import the customization in 2015, it comes without the key words 'ByVal' and the screen crashes(aka stopped responding). To resolve this I thought I would use the Éxclude EventCode option when selecting the customization level so that I can manually correct the code. But selecting this option still processes the code and the screen still crashes and closes without loading and displaying the screen. I am not able to correct these errors in the custom code because the screen wont load!!.

Any ideas or work around on this is much appreciated.

Thanks

Edwin
 
 

*This post is locked for comments

  • Edwin Ondako Profile Picture
    Edwin Ondako 130 on at
    RE: Exclude Even Code not working as expected in SL2015

    Thanks Cindy for the suggestion. I used the suggested work around and it sorted me out.

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Exclude Even Code not working as expected in SL2015

    Try exporting the VBA code using Customization, Export, and check the box to export the VBA as text.  You can then modify the code and import it.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans