Sunday, 21 February 2021

How to add a DLL to TFS/VSTS in Dynamics 365 Finance

 I wrote a custom C# .dll add-in for D365FO that will reach out to google maps api. By doing so it seemed easy to integrate into a D365FO project and it was. How ever until I went to move it I realized that it requires some extra steps in order for it to be deployed to another machine via TFS/VSTS properly.


You will first need to add the reference node within visual studio to source control



However adding this referenced file into source control will not actually add the .dll to the source control like you would think. This is actually just an xml file that references the dll which can be found at K:\AOSService\PackagesLocalDirectory\[package name]\[model/project]\AxReference


In order to add the actual .dll we need to go to source control explorer and go to the main package folder and right click and choose "Add items to folder"



browse to the folder: K:\AOSService\PackagesLocalDirectory\[package]\bin 



select the actual .dll that was added to the project from "Included to add / excluded items tabs".



This will create a bin folder in the main project node within TFS but will only include the file you selected and not every file in the folder.

At this point just check in the two files to TFS/VSTS.


To conclude it up be sure to include the following two files

K:\AOSService\PackagesLocalDirectory\[package name]\[model/project]\AxReference\

And

K:\AOSService\PackagesLocalDirectory\[package]\bin\dllname.dll


or else the package/project will not compile when loaded onto a different server/ build server. 


@Rahul


For more details, please refer the below post

https://axcalated.blogspot.com/2018/08/d365fo-adding-custom-dll-to-project.html

SysWorkflow - Submit SysWorkflowDocument-assertPermission SysWorkflowDocument-assert user not found error while submitting the purchase repulsition to the workflow Dynamics 365 finance

 User was getting the below error while submitting a purchase requisition to the workflow. He has all the required security roles and the worker has assigned to his user account. But, but still getting this error.




Reason: After spending some time, I found that there were multiple worker's created for the same user account. Due to that "DirPersonUser" table has duplicate records for the same user and it is causing the problem. 




Solution: Delete duplicate records from the DirPersonUser  table. I used the below query to delete the records in DEV environment. And, opened a ticket to Microsoft to run in Production environment.

After deletion of the records, assign the worker to the user account and try again.

delete DPU from DirPersonUser as DPU

inner join DIRPARTYTABLE on DPU.PERSONPARTY = DIRPARTYTABLE.RECID

where DPU.USER_ = 'rahul'-- Add the userid here


@Rahul



Visual studio debugger asking for credentials every time in dynamics 365 finance

 All of sudden the visual studio debugger is asking for credentials when start I debug any code. The credentials screen keep populating even after I enter the details.




Reason: This happens when the VS/VSTS(team explorer) login credentials were expired or signed out. This may also happens when multifactor authentication was enabled and the VS application is not login/ verified with user login credentials.


Solution: 

1 -> Login/Re-Verify the VS with your user credentials . If it was already signed it, sign-out and sign-in again.

2 -> VSTS/TFS(team explorer) connection  might have signed out. So, please re-login to VSTS/TFS and connect to the code repository

Once you make the changes, close and reopen the Visual studio

If 1 & 2 does not work, please use the AdminUserProvisioning (K:\AosService\PackagesLocalDirectory\bin) and update the admin account with your user account and try again. 


@Rahul



Thursday, 18 February 2021

Ledger account not specified. Bank transaction type is not specified error while recoiling the bank in D365

 I was getting the below error while trying to reconcile the bank.



Reason: There are some entries with $0 amount causing the problem. 

Solution: 

Filter "Amount in transaction currency" field with $0 amount and delete the records and try again.

The delete button may disabled for some transactions. You can leave them and continue with the other $0 records.




@Rahul

Wednesday, 17 February 2021

Update Due date of a transaction in D365 Finance and operations

 As far as I know, there are multiple ways to update the due date of a transaction in for vendors or customers in D365 F&O. Below is the best way to update the due date.

These steps are common for both vendor and customer transactions.



-> Accounts Receivable> Customers> All Customers, select transactions and filter the records with open status


Now, click on voucher number




Click on Open details in the header and update the due date. This will automatically update the due date in all areas where the transaction was stored.









If transaction has been already settled, then you need to unsettle the transaction. While settling the transaction, in the settlement screen system will allow you to update the due date.



@Rahul

For more details please refer "Due date and schedule" in the below post.


https://financefunction.tech/2019/02/15/how-to-manage-payables-in-dynamics-365-for-finance-and-operations/

Your connection is not private Attackers might be trying to steal your information from NET::ERR_CERT_REVOKED Dynamics 365 Finance and Operations

 All of sudden the below error coming up while access my DEV environment application.



Since all Dynamics environments are deployed using LCS and the Cert used is owned by Microsoft we have limited ability to fox the issue on our own. This is why Microsoft built functionality into LCS to help us with this. To fix the issue, just look up the environment in LCS, click Maintain and select Rotate Secrets

The Cert you need to fix is the SSL Certificate


Simply click Rotate SSL Cert and wait for the process to finish. In my experience you will also need to reboot the VM.

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...