Hello I am a newbie in Dynamics 365, and I am on the struggle on how to edit existing procedure on a table.
For example. In sales header table, a local procedure has been declared.
LOCAL LookupAppliesToDocNo()
GLSetup.GET;
IF ("Document Type" IN ["Document Type"::"Credit Memo","Document Type"::"Return Order"]) AND
GLSetup.GSTEnabled("Document Date")
THEN BEGIN
"BAS Adjustment" := BASManagement.CheckBASPeriod("Document Date",CustLedgEntry."Document Date");
"Adjustment Applies-to" := "Applies-to Doc. No.";
END;
I just wanted to comment some of the code here. How could I achieve it? Is it possible in extension?
Thank you so much. This helps a lot.
In accessing the base code in wave2, this link may help. https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-publish-code-customization
With Wave 2 release, standard source code is available on the dvd (for the onpremise version) or from the Docker container (if SaaS).
I think you’re talking to SaaS here, so you can create a docker container with the image you’re using and then extract the base app code from here. Command to do that:
$alProjectFolder = "C:\SD\BaseApp" Create-AlProjectFolderFromBcContainer -containerName $containerName ` -alProjectFolder $alProjectFolder ` -useBaseLine -useBaseAppProperties
Thanks for the reply, I highly appreciate it.
How about in wave 2 where there is no Development environment meaning we cannot see existing code blocks? Therefore I cannot duplicate the procedure.
Is there any other way to do so?
Not possible without modifying the base code (so, not possible on a SaaS environment). You cannot modify existing code, but only attaching to events (and here you don't have events exposed). In these cases (if the modification is needed and you cannot do in another way) you need to duplicate the function in your objects.
Sohail Ahmed
999
YUN ZHU
934
Super User 2025 Season 1
Mansi Soni
612