-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GetTableUrl for DataPerCompany=false #2303
base: main
Are you sure you want to change the base?
Fix GetTableUrl for DataPerCompany=false #2303
Conversation
begin | ||
if Company = '' then | ||
TableMetadata.Get(TableNo); | ||
if not TableMetadata.DataPerCompany then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if Company is blank and the data is per company? Why cannot we always replace the blank company name with the current company?
This will also slow down the code since we will load the table metadata, which can be slow on the first call. I'm not sure how slow it is after the first call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't help.
The only thing that would help is to try a Company.Get(Company) to know if the Company
text that was passed to the procedure is a valid company name.
I could then remove the check for the DataPerCompany.
if not CompanyRecord.Get(Company) then
Company := CompanyName();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pri-kise If the company exist or not is a caller's responsibility to determine. This code should not fix it. If you ask for a non-existing company URL, you should get what you ask.
If we have a problem with blank company name, why cannot we replace it with current company? We know that it exists.
Also keep in mind, we can open a bug for a platform to fix GetURL if we have issues with it.
The system could easily be generating the links to the external environment - we generate the first part and then the part is replaced. We need to be careful with our assumptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is not the Blank Company Name.
The problem is Company with the value of the label.
CrossCompanyDataLbl: Label '(Cross-Company Data)'
I can change the code to check for the label CrossCompanyDataLbl
.
....
Summary
Fix GetTableUrl for Tables with
DataPerCompany=false
Work Item(s)
Fixes #2262
Fixes AB#557526