Quantcast
Channel: PTC Community: Message List - Arbortext
Viewing all articles
Browse latest Browse all 3717

Re: Tables and callbacks

$
0
0

Hi Martin--

 

Basically, the answer is the same. Your function won't be available until you load it, and it won't load automatically unless it's in one of the startup script locations (custom/init, custom/editinit, custom/doctypes/*).

 

If you want to load it manually for testing purposes, use the "source" command, e.g. if your function is defined in custom/scripts/myCB.acl,

 

     source myCB.acl

 

If your script file is in custom/scripts, then you won't have to add the full path, you should just be able to use the base filename with the source command.

 

Another potential gotcha: if you have defined a package for your script file, you will need to include the package qualifier in your doc_add_callback() call. For example, if you have this at the top of your script file:

 

     package myCallbacks;

 

then your doc_add_callback() call would need to look like this:

 

     doc_add_callback(0, "tbl_insert_after", "myCallbacks::myCB");

 

--Clay


Viewing all articles
Browse latest Browse all 3717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>