Can't subscribe to OnAfterLogInteraction in CU5051

airamairam Member Posts: 88
I need to run a process after an interaction log entry is created, but I can't seem to be able to subscribe to the above captioned event.

any tips?

thanks

Answers

  • kylehardinkylehardin Member Posts: 257
    What do you mean by can't subscribe? Your event subscriber codeunit won't compile, or the subscriber doesn't fire at runtime? What version of BC?
    Kyle Hardin - ArcherPoint
  • airamairam Member Posts: 88
    Thanks for your reply.

    It's NAV2018. The codeunit is not compiling giving this error "The event 'OnAfterLogInteraction' is not found in the target"

    Thanks
  • kylehardinkylehardin Member Posts: 257
    Is your codeunit in C/AL or AL?
    Kyle Hardin - ArcherPoint
  • airamairam Member Posts: 88
    AL
  • kylehardinkylehardin Member Posts: 257
    Create a new CAL codeunit - just temporarily. Add a function there and declare it as an event subscriber for CU5051. In C/AL, you can do a lookup of the available published events. Choose the correct OnAfter event. If you close out of function properties and go back to your temporary codeunit, it will have created the new function with the exact Event subscriber, complete with the correct parameters.

    You can use this to write your AL codeunit. I suspect that you do not have the correct event defined in AL. Make the AL match the event subscriber in C/AL exactly. Then go delete your C/AL codeunit.
    Kyle Hardin - ArcherPoint
  • airamairam Member Posts: 88
    my bad! sorry! in CU5051 there aren't any published events in NAV2018, I was actually checking BC CAL (as we have 2 databases) hence why i couldn't subscribe!

    I need to find a way of running a process through AL after an interaction has been logged in NAV2018..
Sign In or Register to comment.