Category Archives: D365 Finance and Operations
How to delete workspace from TFS Visual Studio
Introduction: In this blog, we will see how we can delete any of the TFS workspace which is assigned to different user Even if tried to remove/delete the workspace from Visual Studio, We’re unable to map existing workspace to new user. In such scenario, It is necessary to delete the workspace explicitly while getting the error as below “The working folder ‘Workspace_Folder_Local_Path’ is already in use by the workspace : on computer Solution: 1. Open Developer Command Prompt for VS2015 from Start menu 2. For getting the list of workspaces associated with user, run below command tf workspaces /server:https://{TFS}.visualstudio.com/{CollectionName} /owner:”{Owner}” Explanation, in my case {TFS} is xxxx.visualstudio.com/defaultcollection and {Owner} as Jagdish Solanki, Eventually it will look something like this, tf workspaces /server:https://xxxx.visualstudio.com/{CollectionName} /owner:”Jagdish Solanki” Reference: 3. To delete the workspace, run below command tf workspace /server:https://{TFS}.visualstudio.com/defaultcollection /delete “{Workspace};{Owner}” It will looks something like this, tf workspace /server:https://xxxx.visualstudio.com/defaultcollection /delete “SCM-DEV-1;Jagdish Solanki” Once the above command is executed, system will prompt you if user has any pending change(s). Are you sure want to delete the workspace? (Yes/No). Enter yes Reference:
Share Story :
“Cannot delete a record in batch job(BatchJob). The corresponding AOS validation failed “while deleting batch job
while you want to delete batch job in Finance and operation you may have faced error as follows “Cannot delete a record in batch job(BatchJob). The corresponding AOS validation failed”. This blog will be helpful to resolve this issue, just follow mentioned steps. Go to batch job(system administation >> inquiries >> batch jobs) select batch jobs which you want to delete and press button change status now change its status to canceling as follows after which jobs status will change to canceling and after that it will automatically change to waiting state now try to delete it by pressing delete button. Now select yes to delete record And you have successfully deleted the record. Hope this blog was helpful to you.
Share Story :
Enable/Disable & Visibility an Action pane button on a list page using interaction class in D365
Introduction: In this blog, we will see how we can enable/disable or change the visibility of the form control in interaction class. Standard behavior of the form, system does not allow us to write code on form which comes under form template -> List page It Seems like below attached image (Here we will consider form VendTableListPage. Property of form as shown below) Each ListPage form consisting with an interaction class as shown in property, Here it is VendTableListInteraction. Each interaction class has one override method which is selectionchanged() Solution: Here we will override the method of selectionchanged() as below [ExtensionOf(classStr(VendTableListPageInteraction))] final class VendTableListPageInteractionCFSJSClass_Extension public void selectionChanged() { next selectionChanged(); //for visibility this.listPage().actionPaneControlVisible(formControlStr(VendTableListPage, ), false); //for enable/disable this.listPage().actionPaneControlEnabled(formControlStr(VendTableListPage, true); } For all other ListPage, we can go through interaction class. For reference, go through below mentioned classes: AgreementListPageInteraction BankDocumentTableListPageInteraction CatProcureOrderListPageInteraction CatVendorCatalogListPageInteraction CustBillOfExchEndorseListPageInteraction CustomsExportOrderListPageInteraction CustPDCListPageInteraction CustPDCSettleListPageInteraction CzCustAdvanceInvoiceListPageInteraction CzVendAdvanceInvoiceListPageInteraction EcoResCategoryHierarchyPageInteraction EcoResProductListPageInteraction EmplAdvTableListPageInteraction EntAssetObjectCalendarListPageInteraction EntAssetWorkOrderPurchaseListPageInteraction EntAssetWorkOrderPurchReqListPageInteraction EntAssetWorkOrderScheduleListPageInteraction EPRetailPickingListPageInteraction EPRetailStockCountListPageInteraction EximAuthorizationListPageInteraction EximDEPBListPageInteraction EximEPCGListPageInteraction GlobalAddBookListPageInteraction HcmCourseAttendeeListPageInteraction HcmWorkerAdvHoldTableListPageInteraction InventBatchJournalListPageInteraction InventDimListPageInteractionAdapter JmgProdStatusListPageInteraction JmgProjStatusListPageInteraction PCProductModelListPageInteraction PMFSeqReqRouteChangesListPageInteraction ProdBOMVendorListPageInteraction ProdRouteJobListPageInteraction ProdTableListPageInteraction ProjForecastListPageInteraction ProjInvoiceListPageInteraction ProjInvoiceProposalListPageInteraction ProjProjectContractsListPageInteraction ProjProjectsListPageInteraction projProjectTransListPageInteraction ProjUnpostedTransListPageInteraction PurchCORListPageInteraction PurchCORRejectsListPageInteraction PurchLineBackOrderListPageInteraction PurchReqTableListPageInteraction PurchRFQCaseTableListPageInteraction PurchRFQReplyTableListPageInteraction PurchRFQVendorListPageInteraction_PSN PurchRFQvendTableListPageInteraction PurchTableVersionListPageInteraction ReqTransActionListPageInteraction ReqTransFuturesListPageInteraction ReqTransListPageInteraction RetailOnlineChannelListPageInteraction RetailSPOnlineStoreListPageInteraction ReturnTableListPageInteraction SalesAgreementListPageInteraction SalesQuotationListPageInteraction SalesTableListPageInteraction SysListPageInteractionBase SysUserRequestListPageInteraction UserRequestExternalListPageInteraction UserRequestListPageInteraction VendEditInvoiceHeaderStagingListPageInteraction VendNotificationListPageInteraction VendPackingSlipJourListPageInteraction VendPDCListPageInteraction VendPDCSettleListPageInteraction VendProfileContactListPageInteraction VendPurchOrderJournalListPageInteraction VendRequestCategoryListPageInteraction VendRequestListPageInteraction VendRequestWorkerListPageInteraction VendTableListPageInteraction VendUnrealizedRevListPageInteraction Thanks for reading !!!
Share Story :
Change planned purchase order status as draft insted of default approved
When we create purchase order using planned order its default approval status will be approved as displayed in screenshot. To change that status to draft write following code where we will change its status to draft and further code to is to remove version of purchase order which necessary to make delete button enabled on purchase order form code:- /// <summary> /// extension of class: ReqTransPoMarkFirm /// </summary> [ExtensionOf(classStr(ReqTransPoMarkFirm))] final class ReqTransPoMarkFirmCFSClass_Extension { public container conPurchOrders; /// <summary> /// updatePurchTable /// </summary> /// <param name = “_purchTable”>_purchTable</param> protected void updatePurchTable(PurchTable _purchTable) { conPurchOrders += _purchTable.PurchId; next updatePurchTable(_purchTable); } /// <summary> /// purchTablePostProcessing /// </summary> protected void purchTablePostProcessing() { next purchTablePostProcessing(); for (int i = 1; i <= conLen(conPurchOrders); i++) { PurchTable purchTable = PurchTable::find(conPeek(conPurchOrders, i), true); if(purchTable.RecId) { ttsbegin; //delete the version created for po PurchTableVersion purchTableVersion = PurchTableVersion::findLatest(purchTable.PurchId, purchTable.DataAreaId, true); if(purchTableVersion.RecId) { purchTableVersion.delete(); } purchTable.ChangeRequestRequired = NoYes::No; purchTable.DocumentState = VersioningDocumentState::Draft; purchTable.update(); ttscommit; } } } } I hope this will helo you,thank you
Share Story :
Change RFQ purchase order status as draft insted of default approved
When we create purchase order using RFQ its default approval status will be approved. To change that status to draft write following code where we will change its status to draft. create new class and add following code class CFSPOStatusRfq { [PostHandlerFor(classStr(PurchAutoCreate_RFQ), methodStr(PurchAutoCreate_RFQ, endUpdate))] public static void PurchAutoCreate_PurchReq_Post_endUpdate(XppPrePostArgs args) { //PurchTable purchTable = args.getThis(‘purchTable’); PurchAutoCreate_RFQ purchReq = args.getThis() as PurchAutoCreate_RFQ; PurchTable purchTable, purchTablenew; purchTable = purchReq.parmPurchTable(); ttsbegin; select forupdate purchTablenew where purchTableNew.PurchId == purchTable.PurchId; if(purchTablenew && purchTablenew.DocumentState == VersioningDocumentState::Approved) { purchTablenew.DocumentState = VersioningDocumentState::Draft; purchTablenew.update(); } ttscommit; } }
Share Story :
Financial Dimensions in Retail Stores and payment methods in D365 Commerce and Retail
Overview: As we are aware that Financial Dimensions are available for user to identify the posting routine of payments, sales, purchases etc in the ledger account. These values are selectable / mandatory at all checkpoints on D365 FNO. However, in retail we would have to configure the financial dimensions in Retail Store or Payment Methods of retail store. This will help user to identify the posting routine with details of the transaction. If financial dimensions are not mapped then posting will happen but it will be posted as entry without dimensions as below images. Without Financial Dimensions: With Financial Dimensions: To configure Financial Dimensions: Payment Methods: Goto Retail and Commerce > Channels > Stores In Action Tab > Set Up > Payment Methods Select Desired Payment method and in details tab you can find Financial Dimensions 2. Stores: Goto Retail and Commerce > Channels > Stores And select desired store that you want to set the default dimensions on the bottom as shown in the image. (Note: Enabling this will overwrite the Financial Dimensions that were enabled on payment methods as this will be set as Default Dimensions for all types of transactions.) Thanks! Hope this was helpful!
Share Story :
List of security roles for current user | D365FO
Introduction: In this blog, we will see how we can get a list of security roles assigned to a current user Solution: UserInfo userInfo; SecurityRole securityRole; SecurityUserRole securityUserRole; while select securityRole exists join securityUserRole where securityUserRole.SecurityRole == securityRole.RecId exists join userInfo where userInfo.id == securityUserRole.User && userInfo.id == curUserId() { info(securityRole.name); } Thanks for reading !!!
Share Story :
Duplicate address record entry through Data entity in Dynamics 365 Finance and Operations
Introduction:In this blog, we will see how to allow system for accepting duplicate addresses of customer, vendor or any other, through doing bit change in Data Entity Solution:For allowing duplicate entries we will create one field in LogisticsPostalAddress. Here field name is as IsCreateFromEntity. Field-IsCreateFromEntity will be used as flag, type of boolean / NoYesId (EDT). [ExtensionOf(tableStr(LogisticsPostalAddressBaseEntity))] final class LogisticsPostalAddressBaseEntityCFSJSTable_Extension { public static LogisticsLocationId resolveRemittanceAddressLocationId(LogisticsPostalAddressBaseEntity _postalAddressEntity, DirPartyNumber _partyNumber) { LogisticsLocationId locationId, locationIdCreateNew; locationId = next resolveRemittanceAddressLocationId(_postalAddressEntity, _partyNumber); if(_postalAddressEntity.IsCreateFromEntity) { locationId = locationIdCreateNew; } return locationId; } } Aforementioned code would replace the standard locationId variable with new locationIdCreateNew which will be null always. Once new variable locationIdCreateNew is replaced with standard code, system will generate the new locationId in the LogisticsLocation(Table) and create the same duplicate address along with state, city, country, zipcode and all other respective fields. Moreover, we will just need to pass YES value to the newly created field ISCreateFromEntity while creating the new address and run the execution. How easy it is!!! Thanks for reading !!!
Share Story :
Deploy SSRS reports through Windows Powershell in Dynamics 365 Finance and Operations
Introduction:In this blog, we will see how to deploy SSRS reports in Microsoft Dynamics 365 Finance and Operations Solution: For on-prem environment, we will open Windows PowerShell in administrator mode and run the below scrip step by step. cd C:\AOSService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSsrs.ps1 For online Cloudhosted/Dev environment, we will run below mentioned script cd k:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “k:\AosService\PackagesLocalDirectory” It appears as When deploying reports are completed, It looks like Thanks for reading !!!
Share Story :
Item Master Data Mass uploading via Data Management in Dynamics 365 Finance and Operations
Item Master Data Mass uploading via Data Management In the world of data management, it has become essential that the business users are provided solution for mass data uploading. Where the data is managed by very less expert users who’re required to upload and download data in bulk at very less given time. Today I am going to show you the way to upload Item Master Data quickly and with no errors via Data Management in MS Dynamics Commerce and Retail. Note: Masters as Item group, tax codes, units, category, item model group etc should be pre-configured or created for this to work accurately otherwise this operation will fail with errors as the masters are not created/configured. For this operation to work first we need to identify the fields that are required to do two steps. First, Item Master Creation Secondly, Item Master release in released products. So now to identify the necessary “importable” fields first we will export the required fields in excel as below. Goto Workspaces> Data Management and in Data Management click Export Button. Upon Clicking “export” create project as data filled in below. Desired Project name in my case I have named it “product master fields” Generate Data package to be set as No. Now when project is created click on “add entity” Select entity as “Released product creation V2” or anything as “Released product creation” whichever is latest according to your version of D365. Select output as “EXCEL”. Use sample file and skip staging to be set as NO. Very important step to select fields to be set as “Importable Fields” And “add” the entity to the project. Now again click on “add Entity”, select the rest of the fields as mentioned in pt. II., and select “released products V2) in entity name and click on add. Now click on export button as below Now on export screen Click on “refresh” button until you see mark on thee screen, and then “download File” to obtain excel file. Note: click each project one by one to download table fields. After downloading file replace the data with required information that you want in your product master so that we can Import the Master data. (Note: You can hide fields that doesn’t require user to input any data but are required by AX this you will identify in released products format). Assuming that you have created your files for upload we will now continue with “Import” data, Goto Workspaces > Data Management and in Data Management click “Import” Button. Upon clicking “Import” create a project and add entity as below. Add group name, in my case added as “import Master Data” Now when project is created click on “add File” Select entity as “Released product creation V2” or anything as “Released product creation” whichever is latest according to your version of D365. Click the upload data file and select the appropriate file, in my case it is “Released product creation V2 – Format.xlsx” Select “Source data format” Click close. Now again click on “add File”, select the rest of the fields as mentioned in pt. VIII., and select “released products V2) in entity name and click on Close. After adding both the files, now its time to click on “import”, but first ensure that the sequence of the below files are as such 1st for Released Product Creation and 2nd for Released products. If this is not in sequence the above operation will fail. After Clicking on Import, you will have to click on refresh button until the come. Upon success you can see the validation message that the master data has been uploaded successfully and released the product for use. In my case I had uploaded a test product which got successfully uploaded to the system. Hope this helps!