June 11, 2018

[Solved] display method 'salesPcsPrice' defined on 'InventTable', referenced in data source *****

Hi Folks,

During some RnD on On hand inventory form, I have to duplicate the InventOnHandListPage, and while compiling this new form I was getting below error (even without any changes)

1. display method 'salesPcsPrice' defined on 'InventTable', referenced in data source 'InventTable_DS' of form '<FormName>', returns type 'Price', which is not recognized. Are you missing a module reference?
2. display method 'inventUnitId' defined on 'InventTable', referenced in data source 'InventTable_DS' of form '<FormName>', returns type 'UnitOfMeasureSymbol', which is not recognized. Are you missing a module reference?
3. display method 'purchPcsPrice' defined on 'InventTable', referenced in data source 'InventTable_DS' of form '<FormName>', returns type 'Price', which is not recognized. Are you missing a module reference?




The best solution I found for this issue, is:
Go to the method which causes this error > Check the method return type> check the respective EDT >Chcek the package.

Now chcek you model parameters if the EDT model refering to system model as well. If this model is missing in reference, add it and update the model parameter.



After model parameter update, build your model and these errors must be fixed.

Enjoy.!!
Harry

June 08, 2018

Solution: Build error for new class in D365FO

Error: The model element was saved with unparsable source code and cannot be used. Please edit the element in Visual Studio to fix the errors: <ProjectName> (CUS) [<Modelname>] K:\AosService\PackagesLocalDirectory\bin\XppSource\<ModelName>\<ObjectName>.xpp



Possible reason: Sometimes when we rename the object name in code and manually rename the object from Solution Explorer, respective metadata still pointing to old names. Ideally, it should be another way around, rename the object in solution explorer and then just open the object it will automatically rename in class code.

Suggested Solution:
This issue doesn't fix even after DB synch and Model build. The only solution I can find for this issue is by deleting the object and create a new one. Yes, delete the object and create a new one with same code and name. This should fix this error.
Let me know if you found some other fix for the same.

Cheers
-Harry

May 16, 2018

How deploy a metadata or X++ hotfix [D365FO]

[Edited: Oct 16, 2018]

Hi Folks,


Here I’m going to share how to deploy a metadata or X++ hotfix using Visual Studio menu. Follow below steps to get this done. I strongly recommend using VSTS check in once hotfix deployed. Of course, you don't have RDP access other than DEV environment so this option should be for DEV servers only.
Let's start by getting into your dev machine (RDP access).


1. Open Visual studio as admin
2. GO to D365> addins
clip_image002

3. Next windows
clip_image004

Browse metadata hotfix file
clip_image006

The file must be unzipped from a folder.

4. Click on prepare button
clip_image008

You will get an info log for completion

5. Now close this dialog box and As a next step, you need to check-in all affected object in VSTS. Its a mandatory step in the process so in case anything goes wrong you will have the option to revert the hotfix changes.
if you missed this step and you need to revert the changes, the system may delete the object itself as these objects were never part of VSTS.

6. After this intermediate code check-in, repeat step 2 and 3 and this time click on apply directly.
clip_image010

Get Infolog once complete

7. Do application build with DB synch and test the hotfix. If the hotfix is working expected than you need to check-in the objects again.

8. Sometimes these changes don’t come in pending changes for VSTS. In that case, you may need to add manually in VSTS branch. Go to Source control > <VSTS branch> > Metadata folder> Right click and select  “Add Items to folder”. Don’t create any folder manually, the system must create respective folders automatically when you add an item.
 clip_image012

9. Now the same can be added in the next deployment package to get this hotfix to change in further environment (another dev box or UAT/SIT/QA).

[Updated on Oct 22, 2018]
Here is a link for further reference,

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/migration-upgrade/install-metadata-hotfix-package

Thanks, Guys, Enjoy….
Harry.