RecordRef and Changecompany

jensthomsen
jensthomsen Member Posts: 173
How does Changecompany and Recordref work together? Is it possible to get the OnInsert code run in another company, when using Recordref?
ANY comments/examples would be welcome:-)
This is what I wan't to do: I want to be able from one company to insert a record in another, and then use the NoSeriesManagement codeunit to name the new record (that is, if there is a number series in the new company, this shoul be used).
Jens

Comments

  • kriki
    kriki Member, Moderator Posts: 9,121
    The CHANGECOMPANY ONLY works on current record. It does NOT work on the records used in the triggers (not even the ones in the tablerelation-properties) of the current record, so you would also have to write all that code.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • jensthomsen
    jensthomsen Member Posts: 173
    Okay...hmmm. My solution is ending up with a copy of codeunit 396 with a couple of 'CHANGECOMPANY' added.
    Jens