creating the SalesOrder using the Document Service

Hi all,

I want to create the Sales Order Using the DocumentService .In Document Service i create the Query. In Query i insert salesTable,SalesLine Table and created the Relation too… I Consume the Document Service in the Visual Studio … When i call from VisualStudio using c# Sales line is not created … Can any one tell how to pass the argument in visual studio to create the SalesLine in ax. It Shows the SalesOrder Must be filled in … but when i remove the SalesLine the salesId is Created… but when i insert the salesLine coading it shows the error that “SalesOrder must be filled in”.