API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

CurrentInvoiceLine_SetDepartment gives internal server error

0
Hi

We are trying to set the department on an invoice line.

I get this error:
Economic.Api.Exceptions.ServerException(E00000): An internal error has occurred. {id=321215548}



$department = 1;
                try {
                    $economic-CurrentInvoiceLine_SetDepartment(array('invoiceLineHandle' = $invoiceLineHandle, 'value' = $department));
                } catch (Exception $exception) {
                echo  $exception-getMessage() ;
                }



Any hints to what the internal errors means?
created Apr 26, 2012 by ThomasKj
0% Accept Rate
Q 2 A 3 C 0

3 Answers

0
I want to set the department because when I try to book the invoice with CurrentInvoice_Book
I get this error message

Economic.Api.Exceptions.IntegrityException(E06300): Cannot book the current invoice: No department has been entered for the products in 1 invoice line(s). You can do this on each invoice line. {id=321279907}

We have enabled the dimension module on the account.
answered Apr 26, 2012 by ThomasKj
0
Setting the department with


$economic-CurrentInvoiceLine_SetDepartment(array('currentInvoiceLineHandle' = $invoiceLineHandle, 'value' = $department));


Does not give the error.
Though, we still have the book problem with


EconomicApiExceptionsIntegrityException(E06300) Cannot book the current invoice No department has been entered for the products in 1 invoice line(s) You can do this on each invoice line {id=321279907}
answered Apr 26, 2012 by ThomasKj
0
It works with:

      $client-CurrentInvoiceLine_SetDepartment(array(
        'currentInvoiceLineHandle' = $invoiceLineHandle,
        'valueHandle' = $departmentHandle));

/Kjeld
answered Oct 16, 2012 by ecodyr
Visma e-conomic A/S
...