Options

Dyanmics NAV 2009 SP1 RTC: Problems with events of autom.

TatevikTatevik Member Posts: 28
edited 2009-09-23 in NAV Three Tier
hello !!!!
I used to have troubles with working events of the automation in the Dynamics NAV 2009 RoleTailored Client.
I hoped that this problem will be resolved in Dynamics NAV 2009 Sp1.
But unfortunately the same picture in the new version... Maybe I use events incorrectly, is there anybody who have ever try to work with simple excel automation events. Please advice... Anything ...
Ill be very grateful.

Beforehand thanks a lot. [-o< [-o< [-o< [-o< [-o< [-o< ](*,) ](*,) ](*,) :oops: :oops: :oops: :oops:

Comments

  • Options
    kinekine Member Posts: 12,562
    There are some restrictions when the events could be used. E.g. when the automation is running on Server/client (I can't remember on which one it must be to work... :oops: )
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    TatevikTatevik Member Posts: 28
    thanks for your reply kine:
    but what you mean by client/server? look I used simple excel automation with its events , which are working fine in classic Dynamics NAv client, but nothing happened when I used the same automation with the same event in the Dynamics NAV RoleTailored client.. what the difference does Dynamics NAV 2009 SP1 RTC does not support working with automation events......??


    thank you
  • Options
    TatevikTatevik Member Posts: 28
    look the problem is the following
    on the RTC client I have action calling following trigger:

    Button1 - OnAction()
    {
    IF NOT ISCLEAR(XlApp) THEN
    CLEAR(XlApp);
    IF NOT CREATE(XlApp,FALSE,TRUE) THEN
    EXIT;
    XlApp.Visible(TRUE);
    XlWrkBk := XlApp.Workbooks.Add;
    XlWrkSht := XlWrkBk.Worksheets.Add;
    }
    this part works fine excel workbook opens form RTC client but its event trigger does not work . see below:
    XlApp::NewWorkbook(Wb : Automation "'Microsoft Excel 12.0 Object Library'.Workbook")
    {
    MESSAGE('newworkbook');
    }
    this event couldn't be cached.
  • Options
    kinekine Member Posts: 12,562
    I think that the problem is, that you are creating the automation on the client (third parameter of the CREATE function), but when you are using automation on client, you cannot catch the events, because whole business logic is running on NST (on middle-tier), thus the event cannot be run from client.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    TatevikTatevik Member Posts: 28
    so does it mean that this problem is unresolved... ? there is no way to do it...?
  • Options
    kinekine Member Posts: 12,562
    No, it means that you need to change the way how you are doing it to have it compatible with NAV 2009 SP1... ;-) But because I do not know what you want to do...

    In SP1 you can create addins, thus you can create addin which will host excel directly on your page if you want and it will handle all what you need in some way... Or you can use webservices from excel to read/save data etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    TatevikTatevik Member Posts: 28
    thank you for you prompt reply ...
    I'll try to find out more about add-ins of NAv 2009 Sp1 and how useful they can be for my problem... actually I used excel automation events for testing .. but in real I need to use my own automation ... with it's events...
    anyway you're great thanks again.
Sign In or Register to comment.