Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Saturday, November 17, 2018

cannot access a disposed object, Object name 'memory model provider has been already disposed


Hi,

Cannot access a disposed object,
Object name 'memory model provider has been already disposed

Prompts an error when you built the model you have.

Solution:

1. Full built all the model files.
2. Restart the IIS.
3. Rerun the VS.

Regards,

Thursday, November 15, 2018

Job to list all the fields in particular table in D365

Hi,


class AlfasithTableFieldList
{       
    /// <summary>
    /// Runs the class with the specified arguments.
    /// </summary>
    /// <param name = "_args">The specified arguments.</param>
    public static void main(Args _args)
    {

        TableName           tableName = 'SalesTable';
        SysModelElement     sysModelElementTables;
        SysModelElement     SysModelElementFields;
        DictField           dictField;
        ;
        while select    sysModelElementTables
            where   sysModelElementTables.ElementType               == UtilElementType::Table       &&
                    sysModelElementTables.Name                      == tableName
            join SysModelElementFields
                where   SysModelElementFields.ElementType           == UtilElementType::TableField  &&
                        SysModelElementFields.ParentModelElement    == sysModelElementTables.RecId
        {
            dictField = new DictField(sysModelElementTables.AxId, sysModelElementFields.AxId);
            print dictField.name();
        }
    }

}

Regards,

SQL code to upate one Legal entity banner to all the legal entity in D365

 Hi, update companyimage set  companyimage.Image  = companyimageA.Image  from  ( select Image from companyimage where dataAreaid = 'USF...