A web service question...

FranklinFranklin Member Posts: 253
edited 2012-02-22 in NAV Three Tier
Good morning,

I wonder if, using the NAV web services, you can call a function (codeunit) and it can return a value.
The example is as follows:

In an external database (web store) it creates a client, if there is not exist in NAV is also created but it must return the NAV client code to update the web store.

Is this possible? I have never used an external web service and i would like to know if you can return values ​​and read them without having to make the call to another function.

Thx a lot...

Comments

  • JAJJAJ Member Posts: 52
    Franklin wrote:
    Good morning,

    I wonder if, using the NAV web services, you can call a function (codeunit) and it can return a value.
    The example is as follows:

    In an external database (web store) it creates a client, if there is not exist in NAV is also created but it must return the NAV client code to update the web store.

    Is this possible? I have never used an external web service and i would like to know if you can return values ​​and read them without having to make the call to another function.

    Thx a lot...


    Hi Franklin,

    Yes you can. You can publish a NAV web service Codeunit and return a code with "Customer No.".

    This is a great example by Freddy :

    http://blogs.msdn.com/b/freddyk/archive ... 9-sp1.aspx

    Greetings.
  • FranklinFranklin Member Posts: 253
    Thxs a lot JAJ... a new spanish friend :P
  • JAJJAJ Member Posts: 52
    Franklin wrote:
    Thxs a lot JAJ... a new spanish friend :P

    You are wellcome.

    Nice to meet you. :)
  • FranklinFranklin Member Posts: 253
    Hi again,

    Finally i´ll trying to use the example of Freddy but i´m in troubles with DISPLAY function. NAV don´t detect this function.

    Why my code is wrong?

    TReparation.RESET;
    TReparation.SETRANGE("Numero de orden",vCodReparation);
    IF TReparation.FINDFIRST THEN
    BEGIN
    vEstado := FORMAT(TReparation.Situacion);
    DISPLAY(vEstado);
    END;


    NAV says me that is an invalid variable...
  • VjekoVjeko Member Posts: 55
    Read Freddy's post to the end. It is a pseudocode function and Freddy explains it.
    (Co-)author of "Implementing Microsoft Dynamics NAV 2009"
    http://vjeko.com/
  • FranklinFranklin Member Posts: 253
    Ok, i´ll try to do it again. :thumbsup:
Sign In or Register to comment.