manipulate forms with c/front

Hi, What i would like to do is to perform a customer search in Navision Attain database from our application, and if a matching customer is found make that customer card active inside Navision. Is this possible using c/front? Thankful for any help /L

“CALL” Navision (here the customer card) by using the Navision links (CONTEXTURL) e.g. navision://client/run?database=c:%5CDatabase%5Cdatabase.fdb%26company=CRONUS%20AG%26target=Form%2021%26view=SORTING(Field1)%26position=Field1=0(20000)%26servertype=NAVISION I guess CONTEXTURL is not available in c/front so you have to “create” the CONTEXTURL-link on your own.

That got me the functionality i was after, thank you very much! [8D] However the command is rather slow (8-9 seconds to find the correct customer on my demo db). Is there any way to speed up this function by filtering or something? I tried adding “WHERE(Field1=20000)” to the view part of the string, but that didnt seem to help much. Thanks! /L

If you want to have it really good then there is a more difficult sollution with automation. General this would be the idea steps. Create an ActiveX DLL which has a class. In Navision start in CU1 an hidden form. Let the form reference an instance of the class in the DLL. Also let your program create an instance to this class. Now you have 2 instances of the same class, one by navision and one by your application. When both instances have a reference to each other you can let both applications talk to each other by calling functions and trigger events. You can trigger an event in for example a hidden navision form which was started by CU1 and remains constantly active. In the trigger, which is created in the form when you reference the variable and use the withevents property, you could code C/AL code that starts a navision form with filters etc. It is a little bit of work but when you know automation principles you can finish this in a day. Hope this explains a bit. If your not into automation then this may be abracadbra for you. In that case … never mind [:D] And only do this when 8-9 seconds is a huge problem … Good luck !

quote:

And only do this when 8-9 seconds is a huge problem …
Originally posted by janpieter - 2005 Mar 23 : 15:31:22

Jan, Latmask, as Jan’s solution needs an open Navision session, try the CONTEXTURL with an open Navision as well. It should work much faster then. If the URL opens a new(second) client task refer to the help files. There is a flag not to start a new client if an instance is already open.

hmm can you do that ?? Verry interesting. There are always things to learn …

OK, i think well get this working. Thanks for the help guys! /L