Translate Option in NAV into ASP.NET DropdownList

philipuskd
Member Posts: 36
is there anyway to translate the option field in NAV webservice to dropdown list in ASP.NET?
if only I can fetch the options fields value one by one, maybe I can user ddl.Items.Add(ddlItem); which ddl is the dropdownlist and ddlItem is the ListItem which has the text and value of options field that I fetch. the problems is I couldn't find any way to retrieve the options.
is there any way to do this?
if only I can fetch the options fields value one by one, maybe I can user ddl.Items.Add(ddlItem); which ddl is the dropdownlist and ddlItem is the ListItem which has the text and value of options field that I fetch. the problems is I couldn't find any way to retrieve the options.
is there any way to do this?
0
Comments
-
If you parse the WSDL file for the service, you can find all the valid enumerations (restrictions) for an Option field. Here is a partial listing of the Customer Card WSDL showing all the option fields.
<xsd:simpleType name="Blocked">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Ship"/>
<xsd:enumeration value="Invoice"/>
<xsd:enumeration value="All"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Copy_Sell_to_Addr_to_Qte_From">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Company"/>
<xsd:enumeration value="Person"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tax_Identification_Type">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Legal_Entity"/>
<xsd:enumeration value="Natural_Person"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Application_Method">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Manual"/>
<xsd:enumeration value="Apply_to_Oldest"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Reserve">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Never"/>
<xsd:enumeration value="Optional"/>
<xsd:enumeration value="Always"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Shipping_Advice">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Partial"/>
<xsd:enumeration value="Complete"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Bank_Communication">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="E_English"/>
<xsd:enumeration value="F_French"/>
<xsd:enumeration value="S_Spanish"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Check_Date_Format">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="MM_DD_YYYY"/>
<xsd:enumeration value="DD_MM_YYYY"/>
<xsd:enumeration value="YYYY_MM_DD"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Check_Date_Separator">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="_minus_"/>
<xsd:enumeration value="_dot_"/>
<xsd:enumeration value="_slash_"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Sales_Orders">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Shipments">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Invoices">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>Wm. Matthew Street (Matt)
http://www.wmmatthewstreet.com0 -
wmstreet wrote:If you parse the WSDL file for the service, you can find all the valid enumerations (restrictions) for an Option field. Here is a partial listing of the Customer Card WSDL showing all the option fields.
<xsd:simpleType name="Blocked">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Ship"/>
<xsd:enumeration value="Invoice"/>
<xsd:enumeration value="All"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Copy_Sell_to_Addr_to_Qte_From">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Company"/>
<xsd:enumeration value="Person"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Tax_Identification_Type">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Legal_Entity"/>
<xsd:enumeration value="Natural_Person"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Application_Method">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Manual"/>
<xsd:enumeration value="Apply_to_Oldest"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Reserve">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Never"/>
<xsd:enumeration value="Optional"/>
<xsd:enumeration value="Always"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Shipping_Advice">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Partial"/>
<xsd:enumeration value="Complete"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Bank_Communication">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="E_English"/>
<xsd:enumeration value="F_French"/>
<xsd:enumeration value="S_Spanish"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Check_Date_Format">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="MM_DD_YYYY"/>
<xsd:enumeration value="DD_MM_YYYY"/>
<xsd:enumeration value="YYYY_MM_DD"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Check_Date_Separator">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="_minus_"/>
<xsd:enumeration value="_dot_"/>
<xsd:enumeration value="_slash_"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Sales_Orders">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Shipments">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="Components_on_Invoices">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="_blank_"/>
<xsd:enumeration value="Show"/>
<xsd:enumeration value="Do_Not_Show"/>
</xsd:restriction>
</xsd:simpleType>
Hi Matt,
thanks for the reply. I'm new in ASP.net and NAV webservice as well. would you mind show me a sample code to fetch the option field, knowing the WSDL above?
Regards,
Philipus0 -
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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