Web service for payment in NAV 2009

Hi All,

I created Web service for create Payment journal. I want to add multiple filter as Journal_Template_Name, Journal_batch_Name and Document No. Please guide me, how can I add multiple filter.

int

iUpdateRecord = 0;

// Create instance of service and setting credentials

Payment_Journal_Service service = new Payment_Journal_Service();

service.UseDefaultCredentials =

true; ";

service.Url = "http://localhost:7047/DynamicsNAV/WS/Page/Payment_Journal

List<Payment_Journal_Filter> filterArray = new List<Payment_Journal_Filter>();

nameFilter.Field = Payment_Journal_Fields.Journal_Template_Name;

nameFilter.Criteria =

“GENERAL”; Payment_Journal_Fields.Journal_Batch_Name; “PAYMENT”; Payment_Journal_Fields.Document_No; “payment_number”].ToString();

nameFilter.Field =

nameFilter.Criteria =

nameFilter.Field =

nameFilter.Criteria = dr[

filterArray.Add(nameFilter);

Payment_Journal[] list = service.ReadMultiple(“GENERAL”, filterArray.ToArray(), null, 100);

{

Payment = Payment1;

iUpdateRecord = 1;

}

if(iUpdateRecord == 1)

{

LoadPaymentData(dr, Payment);

service.Update(

}

else

{

LoadPaymentData(dr, Payment);

service.Create(

}

“GENERAL”, ref Payment);“GENERAL”, ref Payment); foreach (Payment_Journal Payment1 in list)

hi Nilehs,

as it’s payment journal in navision. you can hard code

Journal_Template_Name = ‘GENERAL’

Journal_bactch_Name = ‘PAYMENT’

u can put only filter on Document_No.

Hi Samu,

Fine. Can i able put multiple filter for selecting criteria?

Yes you can … :slight_smile:

Hi Samu,

I tried with multiple filer for payment journal but it won’t work. (e.g. filters: Journal template name, batch name and document name)