Skip to main content
amccollum
Employee - Guide
Employee - Guide
Jan 18, 2023 3:34 PM UTC
Solved

Fact or Fiction? All rules in business rules page must be written in Visual Basic.

agoralewski_0-1674056016036.jpeg

All rules in business rules page must be written in Visual Basic..

Question Credit: Andrea Tout

Is this statement fact or fiction?

Comment your best guess below! Answers will be revealed in one week.

* This question is applicable to Platform 7.3.0 and may not be relevant to future releases

    Contributor
    Jan 18, 2023 11:40 PM UTC

    Fiction. BRs can be written in VB.NET (as opposed to VB!) and more recently C#

    2 replies

    Contributor
    Jan 18, 2023 11:40 PM UTC

    Fiction. BRs can be written in VB.NET (as opposed to VB!) and more recently C#

    OneStream Employee
    Jan 19, 2023 1:01 PM UTC

    In other words, it depends on whether it's an old OS version or not.
    This is why the database upgrade utility adds a language field to the BusinessRules table, and you get errors trying to open business rules from an older version that hasn't had the schema update tool applied to the application database.

    But just because Business Rules can have VB.Net or C# , that does not mean the same is true for Member Formula: those currently can only be VB.NET, however a member formula (in VB.NET) can run a method in a Business Rule that was built in C#.  The advantage with this (using a C# Business Rule here) is that you can define common functions in a [Static] class in C# (which you can't really do in VB.NET) , so that way your Member Formula don't need to continually create and destroy new instances of a shared BR class every time it executes.