en@frrom
16th March 2010, 15:18
Hey all,
I am writing a session to dynamically copy texts from one company to another based on tables in a file and/or form selection.
I have come across a function text.copy.between.companies() in the help file (see below). I tried to use it, but no results. I always get return value 0, and no text is created nor updated.
long text.copy.between.companies( string text_field_to(17), string text_field_from(17), long source_company, long target_company, string kw1(17), string kw2(17), string kw3(17), string kw4(17), string tgroup(8), string edit_opt(15) )
Description
This copies the entire text of a specified text field, for all languages, from one company to another.
Arguments
text_field_to The name of the new text field. See Text fields: overview. This returns the text number for the new text field.
text_field_from The name of the text field that must be copied. See Text fields: overview.
source_company This specifies the source company.
target_company This specifies the destination company.
kw1 to kw4 Use these arguments to specify key words for the new text. If you specify one or more of these arguments as an empty string, the corresponding key word(s) are copied from the original text. It is possible, for example, to specify two new key words and to copy the other two from the original text.
tgroup This specifies the name of the text group to which the new text must be assigned. If you specify an empty string here, the text is assigned to the user"s default group.
edit_opt This specifies the type of window in which the text must be displayed.
Return values
>0 success; returns the number of lines copied
-1 error
I have tried with and without commit.transaction(), with or without selection for update, no results.
Does anybody know this function and can tell me if it works and how to use it?
Thanks in advance!
Regards,
Eli Nager
I am writing a session to dynamically copy texts from one company to another based on tables in a file and/or form selection.
I have come across a function text.copy.between.companies() in the help file (see below). I tried to use it, but no results. I always get return value 0, and no text is created nor updated.
long text.copy.between.companies( string text_field_to(17), string text_field_from(17), long source_company, long target_company, string kw1(17), string kw2(17), string kw3(17), string kw4(17), string tgroup(8), string edit_opt(15) )
Description
This copies the entire text of a specified text field, for all languages, from one company to another.
Arguments
text_field_to The name of the new text field. See Text fields: overview. This returns the text number for the new text field.
text_field_from The name of the text field that must be copied. See Text fields: overview.
source_company This specifies the source company.
target_company This specifies the destination company.
kw1 to kw4 Use these arguments to specify key words for the new text. If you specify one or more of these arguments as an empty string, the corresponding key word(s) are copied from the original text. It is possible, for example, to specify two new key words and to copy the other two from the original text.
tgroup This specifies the name of the text group to which the new text must be assigned. If you specify an empty string here, the text is assigned to the user"s default group.
edit_opt This specifies the type of window in which the text must be displayed.
Return values
>0 success; returns the number of lines copied
-1 error
I have tried with and without commit.transaction(), with or without selection for update, no results.
Does anybody know this function and can tell me if it works and how to use it?
Thanks in advance!
Regards,
Eli Nager