Forum Discussion
4 Replies
- tonydugayContributor
I think you can do something like this:
MyExtUnit.MyRoutine(Param1, Param2)
- william_roeSuper Contributor
This does not work for all script files (units). I can do this with some of the script files but not all. Specifically, I have a script file 'Purchasing' which contains a function called 'ShowAllSites'. This function exists in other script files... none of which can be called with the MyExtUnit.MyRoutine syntax (Purchasing.ShowAllSite). My guess is the script file are global in scope and the identical function names are causing the problem.
Can anyone confirm this?
- HKosova
Alumni
william_roe wrote:
Intellisense doesn't show all script files.
You need //UNEUNIT UnitName to call functions from other units, and for those units to appear in the Code Completion.
[JScript]
//USEUNIT Unit2 //USEUNIT Unit3 function Main() { Test(); // Runs the Test() function from the current unit Unit2.Test(); Unit3.Test(); }
william_roe wrote:
Must the function names be unique across all script files?
No. But it's a good idea to keep them unique.