ncgjiju
23rd February 2009, 05:37
How to change company in Baan script from one company to another

ncgjiju
23rd February 2009, 05:46
I need to check record in other company , if not found must insert a record into it

bdittmar
23rd February 2009, 09:14
I need to check record in other company , if not found must insert a record into it

Hello,

long switch.to.company( long new_compnr )

Regards

loveubaan
23rd February 2009, 09:32
if u need to check if a record is present in a table in some other comp and if not present use following logic :

select <table_name>.field1
from <table_name>
where <table_name>._index1 = {Condition}
and <table_name>._compnr = :your_comp_var
selectdo
selectempty
<table_name>.field1 = value
<table_name>._compnr = your_comp_var
db.insert(t<table_name>,db.retry)
endselect
commit.transaction()