Thursday, 19 September 2019

D365FO - Importing License File (ISV/VAR Add-on) via deployable package (LCS)

In order to deploy this license file to, we need to do the following. 

It is a two-step process 

1. Copy license file to ImportISLicense.Zip folder 
Any AOS server:

Windows Explorer > \AOSService\PackagesLocalDirectory\Bin\CustomDeployablePackage
*usually C:\AOSService\PackagesLocalDirectory\Bin\CustomDeployablePackage or on the K-drive*



In here you will find the file  ImportISVLicense.zip

Make a copy of this zip file and open it up (don't unzip, just open it). 
Then browse to the following location: ImportISVLicense.zip\AosService\Scripts\License
Copy the license .txt file into this folder and save the zip.




2. Upload to LCS packages 

LCS > Open the AX project in which you wish to apply the license to which in this case is the QA environment which means we need to open the implementation project. Then go to Asset library
Go to software deployable package > Click on the add button and fill out the info regarding the file being uploaded and select the zip file we created in the steps above


wait for a couple of minutes before the "valid" box has a checkmark. You will not be able to apply this file until the instance is marked as valid.

Once the instance has been marked as valid we need to apply it to the system.

Go to the full details page for the specific environment we need to apply this to and click on the Maintain option > Apply updates


apply+updates+menu.png (1045×401)
From this window, we need to choose the asset we just created and click on apply

After this, the system will process the request and trigger emails whenever the process starts and completes.

Whenever you open the main page you will also see the current status of the import itself as well.

Reference:

Friday, 13 September 2019

D365 F&O X++ code to copy data form one table two other table with similar fields using SysdictTable

Today we will see a code, which is useful to copy data from one table to a similar table and let's say you have many fields.



public static Common copyFromToTable(Common _commonFrom, Common _commonTo)
    {
        SysDictTable    dictTable = new SysDictTable(_commonTo.TableId);
        SysDictField    dictField;
        FieldId         fieldId = dictTable.fieldNext(0);
       
        while (fieldId)
        {
            dictField = dictTable.fieldObject(fieldId);

            if (dictField.isSql() && !dictField.isSystem())
            {
                FieldName fieldName = dictField.name();
                FieldId fieldIdFrom = fieldName2Id(_commonFrom.TableId, fieldName);

                if (fieldIdFrom)
                {
                    _commonTo.(dictField.id()) = _commonFrom.(fieldIdFrom);
                }
            }

            fieldId = dictTable.fieldNext(fieldId);
        }

        return _commonTo;
    }

Import and Export file from BLOB storage Account(Azure) in D365 F&O using X++

  Import and Export file from BLOB storage Account in D365 F&O using X++ Import: /// <summary> /// MKInventQualityOrderLineService...