In this post, I want to discuss how to redirects references to table data from one company to another.
If your client work across different companies in the same Tenant and want to easily collect some data from each company, you may use this method.
[Ok := ] Record.ChangeCompany([CompanyName: String])
An instance of the Record data type.
The name of the company to which you want to change. If you omit this parameter, you change back to the current company.
true if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
Let me do a simple test.
Show current company name -> Change Company -> Show another company Name.
So by customizing, you can show all company data on the same page, or you can share master data between companies. You can also use the Sales Order data of Company A to create the Purchase Order of Company B, etc.
For example: Try to share customer master data to another company.
You can also use RecordRef.ChangeCompany Method to redirect references to table data from one company to another.
Hope this will help.
Thanks for your reading.