03-15-2024 11:07 AM
Hi,
I have a Spreadsheet BR that creates a tableview and I want a certain dashboard extender function to be triggered when they submit the data from the tableview(spreadsheet)
I think this is the way to go but probably because of the namespace, I cannot do this definition. See the screenshot at the bottom.
_______________________
Any help is appreciated
Solved! Go to Solution.
03-15-2024 03:50 PM - edited 03-17-2024 10:10 AM
Here's how I do it:
Create a public class in your Dashboard extender with a/some public methods:
Note the namespace, class name, and method name(s) you want to use elsewhere
In your spreadsheet rule's Properties, add a reference to your dashboard extender's namespace, quirky, just the part after the last dot:
Now you can code to the class and its methods in your spreadsheet rule. Import the full namespace of the extender rule, and then reference the class by its name. Instantiate it to use its methods:
03-15-2024 11:20 AM
Intellisense will never pick up any custom Business Rules, it's one of the very few places where it cannot help.
Just type in the namespace you need, making sure you added it to the Referenced Assemblies field of the rule first (in Properties tab). Note that, if you're in version 7.3+ and using custom Workspaces, there are a few more pitfalls.
03-15-2024 03:50 PM - edited 03-17-2024 10:10 AM
Here's how I do it:
Create a public class in your Dashboard extender with a/some public methods:
Note the namespace, class name, and method name(s) you want to use elsewhere
In your spreadsheet rule's Properties, add a reference to your dashboard extender's namespace, quirky, just the part after the last dot:
Now you can code to the class and its methods in your spreadsheet rule. Import the full namespace of the extender rule, and then reference the class by its name. Instantiate it to use its methods:
03-18-2024 05:52 AM
Hi Robb,
This is gold, thanks a lot.
Do you think I can reference to the MainClass in the Extender Rule rather than ExtraFunctions in your example? I guess that is creating a problem for me since MainClass is also being used in the Spreadsheet rule right?
03-18-2024 09:41 AM
@GorkemSenol yes. Access MainClass the same way.
Reference the rule your MainClass is in and then instantiate and use it.