Functions not accessible in extenstions v2.
I converted our code to al, but get a lot of issues with methods that "can not be used for extension development". I'm a bit puzzled why the accessibility level does not match that of the standard application. Would make development a lot easier. Is there a specific reason for this behavior? I can to some extend understand limiting the access to the system table objects, but can't really grasp this.
Anyways, browsing the other issues it seems like you accept lists of missing access, so there are the ones i've found so far (Might have overlooked some)
ChangeLogMgt (Codeunit 423) LogModification LogDeletion LogInsertion
MoveNegPurchLines (Report 6698) SetPurchHeader ShowDocument
CopyPurchDoc (Report 492) SetPurchHeader
ReleasePurchDoc (Codeunit 415) PerformManualRelease
PurchPostYesNo (Codeunit 91) Preview
PurchCalcDiscByType (Codeunit 66); ApplyDefaultInvoiceDiscount
Purchase Header (Table 38) CalcInvDiscForHeader GetPurchLines SumPurchLinesTemp
ApprovalsMgmt (Codeunit 1535) CreateApprovalRequests CheckPurchaseApprovalPossible CheckSalesApprovalPossible ApproveRecordApprovalRequest FindWorkflow CanExecuteWorkflow IsPurchaseApprovalsWorkflowEnabled
Purchase Post (Codeunit 90) GetPurchLines SumPurchLinesTemp
Sales Post (Codeunit 80) GetSalesLines SumSalesLinesTemp
SegManagement (Codeunit 5051) CopyFieldsToInteractLogEntry
WorkflowManagement (Codeunit 1501); HandleEvent HandleEventOnKnownWorkflowInstance
WorkflowSetup (Codeunit 1502) InitWorkflow
Our problem is that the base application itself still uses .net interop and some of the internal only API's. Due to the size of the app we had to use some static analysis, that was on the cautious side.
We will take a look at the list.
Ok, I just foresee that this will be an issue to many as I can see I already is (in the issues list) for other people porting their solution. It should be pretty straightforward to get all procedures and their accessibility level by scanning the base application code in text format. But yes I don't know what tools you have at hand, I just hope that the long term solution isn't to add functions on-demand :)
It's not as simple as that. E.g. some codeunits in the base app are exposing methods to work with files, maybe through other codeunits. This can only be discovered through static call tree analysis.
The is all about robustness and security when running in a SaaS environment, which is why we have chosen to be on the safe side.
Ok, yes that makes it a bit more complex. I'm just concerned that we might not be able to port the code as simple as possible, if we are to face a lot of issues like this. So i hope that your analysis will go from overly cautious to just plain cautious :)
Incoming request are now validated manually. Only the initial process was done using static analysis.
Because I just see that in the missing functions of the discount functions is spoken. Yes, we would also gladly address this, and also in the booking process available. Unfortunately, however, this has been defined by the system. It is not possible to make a change because many events are still missing in the entire booking process. For example, codeunit 17 and 366 do not have a single event. Thus one can unfortunately relatively few data during the booking check.
Sales Header (Table 36) : CalcInvDiscForHeader is also not accessible.
