Offline Authentication Admin Email D365FO


Offline Authentication Admin Email D365FO



Most of the time my team members complain to me that they are getting two types of errors randomly.


  1. Authentication error while browsing the table from Visual Studio.
  2. Exception occurred on the metadata service on client or server – error: forbidden. While setting report data source as query the above error occurred 


Point-1 reference screenshot


Point-2 reference screenshot


We can resolve both types of errors in just a few steps.

Step-1 Check for the “OfflineAuthenticationAdminEmail”  key in file “DynamicsDevConfig” in AOSService -> PackagesLocalDirectory->Bin to be set to the correct login email that you are using.


Step-2 In my case administrator@contosoax7.onmicrosoft.com was mentioned. So I replace it with the email I was using.

reference screenshot.




Step-3 Sign In to Visual Studio with your account.


Step-4 Close Visual studio.
Step-5 Restart IIS.
Step-6 Restart Batch 
Step-7 Open Visual Studio as Administrator
Step-8 Verify your issue again. in my case, both issues were resolved.


Please feel free to contact me if you are facing any issues implementing this blog.


Support Faryal's Cusine


Product Receipt validation in Extension using COC D365FO

Product Receipt validation in Extension using COC D365FO



Yesterday, I received the requirement to put some custom validation while performing product receipts.

As everyone knows that in D365FO over-layering is not allowed anymore. So I have to perform this task in extension.

In extension, I have two ways to perform this task.

Create the form extension and replace the product receipt menu item with my custom menu item and after performing my successful custom validation call original menu items.

Create extension class of  PurchPackingSlipJournalCreate and override the check method using COC pattern and perform our custom validation.

So I go with COC and the following are the code snippet I have to write 



    [ExtensionOf(classstr(PurchPackingSlipJournalCreate))]

    final class SLD_PurchPackingSlipJournalCreate_Extension
    {
        protected boolean check()
        {
            boolean flag=    next check();
            flag= flag && validatePackingSlip(flag);

            return flag;
        }



        public boolean validatePackingSlip(boolean flag)
        {

            if(flag && this.purchParmUpdate.DocumentStatus==DocumentStatus::PackingSlip)
            {
                // write your validation here... you can access buffer of these table purchParmUpdate,purchParmTable
                flag= checkFailed(strFmt("Custom validation causes the product receipt generation failed, %1, %2",this.purchParmTable.ParmId, this.purchParmTable.DocumentDate));

            }
            return flag;
        }


    }





Support Faryal's Cusine


Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...