Pass value from codeunit to XMLPort
Rikarddo
Member Posts: 80
Hi,
I have a Code Unit where using webservice i receive some parameters and i turn back some values.
This function counts the number of item cointainer of a product and all the item containers.
What i want is how to filter for one item?
In XMLPort or in the Codeunit and how?
This is my xml
Can someone help me please? Thanks
I have a Code Unit where using webservice i receive some parameters and i turn back some values.
Simulador(ContactNo : Code[20];ItemNo : Code[20];VAR CustName : Text[50];VAR PmtTermsCode : Code[20];VAR ItemDesc : Text[50];VAR Vas : Integer;VAR Vasi : XMLport Vasilhames) : Text
ltBusRel.RESET;
ltBusRel.SETRANGE("Contact No.",ContactNo);
ltBusRel.SETRANGE("Business Relation Code",'CLI');
IF ltBusRel.FINDFIRST THEN
BEGIN
ltCustomer.GET(ltBusRel."No.");
ltPaymentTerms.GET(ltCustomer."Payment Terms Code");
END;
ltitem.RESET;
ltitem.SETRANGE("No.",ItemNo);
IF ltitem.FINDFIRST THEN
BEGIN
Descricao:=ltitem."Extended Description";
ItemContainer.RESET;
ItemContainer.SETRANGE("Item No.",ItemNo);
IF ItemContainer.FINDSET THEN
BEGIN REPEAT
Vasilhame:=ItemContainer.COUNT;
UNTIL ItemContainer.NEXT=0;
END;
END;
Vas:=Vasilhame;
This function counts the number of item cointainer of a product and all the item containers.
What i want is how to filter for one item?
In XMLPort or in the Codeunit and how?
This is my xml
Node Name Prefix Node Type Source Type Data Source XMLComentariosCompra Element Text <XMLComentariosCompra> Vasilhame Element Table <Item Container>(Item Container) No Element Field Item Container::Container No.
Can someone help me please? Thanks
0
Answers
-
Please some help?
I have codeunit published as webservice. In that codeunit i call other codeunit that calculates some value.
Simulador(ItemNo : Code[20];ItemContainerNo : Code[20];VAR xml : XMLport PricingToolSimulador;VAR Temp : Decimal)
....
Temp:=PricingTool.GetCustoOperacao(ItemNo,Variante);
ItemNo and Variante are parameters. Fine so far.
My final goal is:
I have an xmlport not based in any table. I have a variable CostOp that will export the the same value as show above
CustoOp:=format(PricingTool.GetCustoOperacao(ItemNo,Variante));
My dificulty here is how to pass to xmlport the Itemno and variante in the webservice codeunit??
If i make like this CustoOp:=format(PricingTool.GetCustoOperacao('0000001010','j70-1010')); it will return a tag with
the correct value.
Will apreciate some tips thanks0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions