Field Value modify by FieldRef and RecRef

Asallai
Asallai Member Posts: 142
Hi All,

I tried many method to solve this problem, but I did not do any success solution.
I have 6 different companies and same tables.
If somebody is changing a field value in a table, I’d like to cange itt o all other companies too.
So I have to catch the table no. and the field no. It is OK, but how can I set the other company same field value? :-o
If somebody has a method or tip please help me (or a topic here on MIBUSO).

Thank you!

Andras

Comments

  • SteveO
    SteveO Member Posts: 164
    If you are using normal record variables then have a look at

    Record.CHANGECOMPANY(CompanyName);

    If you are using recordrefs then you can specify the Company Name when you open a Table. RecRef.OPEN(Number, Temporary, CompanyName).

    Alternatively, if it is a new table that you have created have a look at the DataperCompany property on the table. This allows all companies to share the same data.
    This isn't a signature, I type this at the bottom of every message
  • Asallai
    Asallai Member Posts: 142
    It is OK, but I'd like to do more... :roll:

    the USER set the value of the field:
    Company1.Table1.Field1.Value

    How can I set the
    Company2.Table1.Field1.Value to the same value from the Company1?
    :(

    What is the type of var to do this? And what is that command to set the field value? ](*,)

    I'm tried to tell it clearly... :wink:
  • Rko
    Rko Member Posts: 24
    Hi, I just wonder, Do you use some tables for all companies with same datas?
    If yes, why you don't use table property DataPerCompany in Table. So, Data for specific tables will be the same if you set this property on table to NO.
    Navision Developer and Consultant
  • Asallai
    Asallai Member Posts: 142
    Rko wrote:
    Hi, I just wonder, Do you use some tables for all companies with same datas?
    If yes, why you don't use table property DataPerCompany in Table. So, Data for specific tables will be the same if you set this property on table to NO.

    Yes, the tables are same, but one of them company has a different value of that table as like the others.
    This is the reason why I cannot mixed them...
    but this was the first step :)