for example I login to Company A.
but I want to post for Company B.
I can insert data from company A to B, but when post it, it seems still read data from Company A.
You cannot run codeunits across companies. Even if you could, any record references they make would refer to the current company. Possible solution I see is to build a process that queues info to be posted from Company A to be processed by company B.
Not directly. You might be able to design some sort of interface using Scheduler.
Are you sure your data in the other company is being inserted (and validated) correctly? If you are using "ChangeCompany" to achieve this, remember that function only works on the tabledata for the record you set it on. If any validation logic references other tables, those tables are read from the current database. This can result in incorrect validation results.
You cannot run codeunits across companies. Even if you could, any record references they make would refer to the current company. Possible solution I see is to build a process that queues info to be posted from Company A to be processed by company B.
Answers
Are you sure your data in the other company is being inserted (and validated) correctly? If you are using "ChangeCompany" to achieve this, remember that function only works on the tabledata for the record you set it on. If any validation logic references other tables, those tables are read from the current database. This can result in incorrect validation results.
yes upon inserting I also not using Validate.
I inserted manually..
all are correct.
only the posting cant be done.
thanks for you advise.
btw i solved this issue.
i create job queue in company B, so that in company B will post this entries.
Thanks.