Analyzer
PlatformCop
Issue type
False positive (diagnostic fires when it shouldn't)
Rule ID
PC0036
Description
The rule says "Calling SetRecord on a Page variable with a temporary record is not supported and will cause a runtime error. The Business Central runtime cannot bind a page to a temporary record instance via this method."
However, this approach is used in standard BC by Microsoft in multiple places and also in our apps too. I haven't see any issues with this, is this rule based on recent change or experience?
AL code to reproduce
Check codeunit 5332 "Lookup CRM Tables", the following procedures use this approach for conversion of option to mapping
- LookupCRMPaymentTerm(SavedCRMOptionId, CRMOptionId, CRMOptionCode, IntTableFilter)
- LookupCRMFreightTerm(SavedCRMOptionId, CRMOptionId, CRMOptionCode, IntTableFilter)
- LookupCRMShippingMethod(SavedCRMOptionId, CRMOptionId, CRMOptionCode, IntTableFilter)
Additional context
No response
Analyzer
PlatformCop
Issue type
False positive (diagnostic fires when it shouldn't)
Rule ID
PC0036
Description
The rule says "Calling SetRecord on a Page variable with a temporary record is not supported and will cause a runtime error. The Business Central runtime cannot bind a page to a temporary record instance via this method."
However, this approach is used in standard BC by Microsoft in multiple places and also in our apps too. I haven't see any issues with this, is this rule based on recent change or experience?
AL code to reproduce
Check codeunit 5332 "Lookup CRM Tables", the following procedures use this approach for conversion of option to mapping
Additional context
No response