Variant can't contain a Records Company information
Open
@BazookaMusic is already working on this.
Since Jan 28, 2025.
investigate
- Dominant language
- PowerShell
- Stars
- 881
- Forks
- 285
- Avg merge
- 3d 36m
- Merged PRs (30d)
- 1
Description
Got issues with recordref with other companies in BC together with variants. How can I get this fixed ?
Working with a lot of RecordRef's and variants. Found out today that RecordRef do have CurrentCompany, but it doesn't work if the assignment to RecordRef comes from an variant and not the record itself.
Example code;
trigger OnOpenPage()
var
customer: Record Customer;
recordref: RecordRef;
variant: Variant;
begin
customer.ChangeCompany('OTHER COMP');
recordref.GetTable(customer);
Message(recordref.CurrentCompany);
clear(recordref);
variant := customer;
recordref.GetTable(variant);
Message(recordref.CurrentCompany);
end;
First message is correct company (OTHER COMP). second message will be current company and not OTHER COMP.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.