Thursday, February 23, 2017

Upgrade usefull links

Upgrade Ax 2012 R2 to Ax 2012 R3


http://www.msdynamicsax.info/2014/05/ax-2012-r2-to-ax-2012-r3-upgrade.html
https://technet.microsoft.com/en-us/library/jj733502.aspx
http://yetanotherdynamicsaxblog.blogspot.in/2014/04/upgrading-ax2012-r2-to-ax2012-r3.html
http://myaxdoctor.blogspot.in/2014/05/ax-2012-r2-to-ax-2012-r3-upgrade.html
http://blog.clientsfirst-ax.com/blog-1/bid/379080/An-Overview-of-Your-AX-2012-R3-Upgrade-Approach

Alert Sample Code in Ax 2012

static void create_alert(Args _args)
{
        EventNotificationSource                source;
        EventNotification                                event = EventNotification::construct(EventNotificationSource::Sync);
        EventInboxId                            inboxid;
        ;
        event.parmRecord(_record);
        event.parmUserId(curuserid());
        event.parmDataSourceName('ledgerjournaltable');
        event.parmMenuFunction(new MenuFunction('LedgerJournalTable5', MenuItemType::Display));
        event.parmSubject('Customer Changed');
        event.parmMessage('Customer has changed, please verify');
        inboxid = event.create();
}

static void AlertTestEvent(Args _args)
{
    EventInbox inbox;
    ;
    inbox.initValue();
    inbox.ShowPopup = NoYes::Yes;
    inbox.Subject = "This is the Alert subject";
    inbox.Message = "This is the Alert message";
    inbox.AlertedFor = "This alert is just information no links are available";
    inbox.SendEmail = false;
    inbox.UserId = curuserid();
    inbox.TypeId = classnum(EventType);

    //inbox.AlertTableId = tablenum(Address);
    //inbox.AlertFieldId = fieldnum(Address, Name);
    //inbox.TypeTrigger = EventTypeTrigger::FieldChanged;
    inbox.CompanyId = curext();
    inbox.InboxId = EventInbox::nextEventId();
    inbox.AlertCreatedDateTime = DateTimeUtil::getSystemDateTime();
    inbox.insert();
}
static void AlertTest(Args _args)
{
    EventNotificationSync   alert;
    MenuFunction            MenuFunction;
    str                     dataSourceName;
    Name                    _subject ="Entered is greater than Current Stock Onhand Qty";
    Name                _bodyMsg = "Ensure you are entered Qty is greater than Stock on Hand Qty";
    UserId                  _user;
    ; 
    _user                = curUserId();       
    //dataSourceName  =   tablestr(PurchLine);
    //MenuFunction    =   new MenuFunction(menuitemdisplaystr(PurchTable), MenuItemType::Display);
    alert           =   EventNotificationsync::newInfo(_subject,
                                        _bodyMsg,
                                        _bodyMsg,
                                        NoYes::NO);
    alert.parmUserId(_user);       
    alert.create();
}

open Ax Menu item From Global

//Open Ax Menu item common

void openAXMenuItem(str _Name, MenuItemType _type = MenuItemType::Display,Args _args)
{
    new MenuFunction(_Name, _type).run(_args);
}

Inventory Stock Details Qty and Value in ax 2012

// Inventory Movement Report Detail/Summary Qty and Value in ax 2012
//Sample Codeand view only
// Need to modify Query and code as per your requirment

static void InventoryStockDetails(Args _args)
{
    InventDim   inventDim;
    Query   query;
    int j;
    ReportTmpTable   reportStagTable,reportStagIns;
    InventValueReportView   inventvalueReportView;
    InventSum       inventSum;
    InventTransOrigin       transOrigin;
   
   Qty GetQtyByOpenDate(ItemId     _item,InventDimId   _inventDimId)
    {
        Qty                       total;
        InventValueReportView     trans;
        ;
        select sum(Qty) from trans
            where trans.TransDate < mkDate(1,1,2015)
                    && trans.TransDate != dateNull()
                        && trans.ItemId == _item
                            && trans.inventDimId == _inventDimId;
        total = trans.Qty;
        return total;
    }
    Amount GetCostAmountbyOpenDate(ItemId     _item,InventDimId   _inventDimId)
    {
        Amount                    total;
        InventValueReportView     trans;
        ;
        select sum(Amount) from trans
            where trans.TransDate < mkDate(1,1,2015)
                    && trans.TransDate != dateNull()
                        && trans.ItemId == _item
                            && trans.inventDimId == _inventDimId;
        total = trans.Amount;
        return total;
    }
    ;
    ttsbegin;
    //Clear Report tmp Table
    delete_from reportStagTable;
    //End Code
    contract = this.parmDataContract();
    while select 
        inventSum by InventDimid,ItemId
 where inventSum.itemId == _itemId
 join inventDim
  where inventDim.inventDimid == inventSum.inventDimId
    {
 reportStagTable.clear();
        inventDim.clear();
        inventDim = InventDim::find(this.CreateInventDim(inventDim.InventSiteId,
                                                         inventDim.InventLocationId,
                                                         inventDim.configId,
                                                         inventDim.InventSizeId,
                                                         inventDim.InventStyleId).inventDimId);
        reportStagTable.InventDimId         = inventDim.inventDimId;
        reportStagTable.OnHandQty           = GetQtyByOpenDate(reportStagTable.ItemId,inventDim.inventDimId);
         reportStagTable.BeginQty            = reportStagTable.OnHandQty;
         reportStagTable.BeginCostAmount     = GetCostAmountByOpenDate(reportStagTable.ItemId,inventDim.inventDimId);
        reportStagTable.Parent    = NoYes::Yes;
        reportStagTable.Sort       = 1;
        reportStagTable.OnHandQtyOfEnd =0;
        reportStagTable.PurchQty = 0;
        reportStagTable.ReceivedQty = 0;
        reportStagTable.PurchReturn = 0;
        reportStagTable.SalesReturn   = 0;
        reportStagTable.SoldQty = 0;
        reportStagTable.ProdInQty =0;
        reportStagTable.ProdOutQty =0;
        reportStagTable.AdjInQty = 0;
        reportStagTable.AdjOutQty =0 ;
        reportStagTable.BOMInqty =0;
        reportStagTable.BOMOutQty = 0;
        reportStagTable.CountInQty =0;
        reportStagTable.CountOutQty =0;
        reportStagTable.TransferInQty = 0;
        reportStagTable.TransferOutQty =0;
        reportStagTable.IssuedQty =0;
        reportStagTable.RecPurchAmount = 0;
        reportStagTable.IsuPurchReturnAmount = 0;
        reportStagTable.RecSalesReturnAmount   = 0;
        reportStagTable.IsuSalesAmount = 0;
        reportStagTable.RecProdAmount =0;
        reportStagTable.IsuProdAmount =0;
        reportStagTable.RecAdjAmount = 0;
        reportStagTable.IsuAdjAmount=0 ;
        reportStagTable.RecBOMAmount =0;
        reportStagTable.IsuBOMAmount = 0;
        reportStagTable.RecCountAmount =0;
        reportStagTable.IsuCountAmount =0;
        reportStagTable.RecTransferInAmount = 0;
        reportStagTable.IsuTransferOutAmount =0;
        reportStagTable.PurchasedQtyTotal       = reportStagTable.PurchQty + reportStagTable.SalesReturn + reportStagTable.ProdInQty
                                                            + reportStagTable.BOMInqty + reportStagTable.CountInQty + reportStagTable.AdjInQty + reportStagTable.TransferInQty;
        reportStagTable.SoldQtyTotal            = reportStagTable.SoldQty + reportStagTable.PurchReturn + reportStagTable.ProdOutQty
                                                    + reportStagTable.BOMOutQty + reportStagTable.CountOutQty + reportStagTable.AdjOutQty + reportStagTable.TransferOutQty;
        reportStagTable.TotalcloseQty           = reportStagTable.OnHandQty + reportStagTable.PurchasedQtyTotal + reportStagTable.SoldQtyTotal;
        reportStagTable.ReceivedCostAmount      = reportStagTable.RecPurchAmount   + reportStagTable.RecSalesReturnAmount
                                                    + reportStagTable.RecAdjAmount + reportStagTable.RecProdAmount + reportStagTable.RecCountAmount
                                                    + reportStagTable.RecBOMAmount + reportStagTable.RecTransferInAmount;
        reportStagTable.IssuedCostAmount        = reportStagTable.IsuSalesAmount   + reportStagTable.IsuPurchReturnAmount
                                                    + reportStagTable.IsuAdjAmount + reportStagTable.IsuProdAmount + reportStagTable.IsuCountAmount
                                                    + reportStagTable.IsuBOMAmount + reportStagTable.IsuTransferOutAmount;
        reportStagTable.TotalCostAmount         = reportStagTable.BeginCostAmount  + reportStagTable.ReceivedCostAmount + reportStagTable.IssuedCostAmount;
        reportStagTable.Insert();
    }
    //Inserting Detail level transation
    while select reportStagTable
            where reportStagTable.Parent    == NoYes::Yes
    {
        j = 2;
        inventvalueReportView.clear();
        transOrigin.clear();
        while select inventvalueReportView order by TransDate Asc
                where inventvalueReportView.TransDate >= mkDate(01,01,2015)
                    && inventvalueReportView.TransDate <= mkDate(1,1,2016)
                        && inventvalueReportView.ItemId == reportStagTable.ItemId
                            && inventvalueReportView.inventDimId == reportStagTable.InventDimId
        {
            reportStagIns.clear();
            reportStagIns.ItemId            = reportStagTable.ItemId;
            reportStagIns.UnitId            = InventTableModule::find(reportStagTable.ItemId,ModuleInventPurchSales::Invent).UnitId;
            reportStagIns.ItemGroupId       = reportStagTable.ItemGroupId;
            reportStagIns.ItemName          = reportStagTable.ItemName;
            reportStagIns.InventDimId       = reportStagTable.InventDimId;
            reportStagIns.configId          = reportStagTable.configId;
            reportStagIns.InventSizeId      = reportStagTable.InventSizeId;
            reportStagIns.InventStyleId     = reportStagTable.InventStyleId;
            reportStagIns.InventSiteId      = reportStagTable.InventSiteId;
            reportStagIns.InventLocationId  = reportStagTable.InventLocationId;
            reportStagIns.Parent            = NoYes::No;
            reportStagIns.Sort              = j;
            reportStagIns.OnHandQty         = 0;
            reportStagIns.BeginQty          = 0;
           
                switch(inventvalueReportView.ReferenceCategory)
                {
                    case InventTransType::Purch :
                        if(inventvalueReportView.Qty > 0)
                            reportStagIns.PurchQty                = inventvalueReportView.Qty;
                        else if(inventvalueReportView.Qty < 0)
                            reportStagIns.PurchReturn                = inventvalueReportView.Qty;
                        break;
                    case InventTransType::Sales :
                        if(inventvalueReportView.Qty > 0)
                            reportStagIns.SalesReturn             = inventvalueReportView.Qty;
                        else if(inventvalueReportView.Qty < 0)
                            reportStagIns.SoldQty                 = inventvalueReportView.Qty;
                        break;
                    case InventTransType::ProdLine ||  InventTransType::Production:
                        if(inventvalueReportView.Qty > 0)
                            reportStagIns.ProdInQty             = inventvalueReportView.Qty;
                        else if(inventvalueReportView.Qty < 0)
                            reportStagIns.ProdOutQty                 = inventvalueReportView.Qty;
                        break;
                    case InventTransType::InventLossProfit:
                        if(inventvalueReportView.Qty > 0)
                            reportStagIns.AdjInQty             = inventvalueReportView.Qty;
                        else if(inventvalueReportView.Qty < 0)
                            reportStagIns.AdjOutQty                 = inventvalueReportView.Qty;
                    break;
                    case InventTransType::BOMLine || InventTransType::BOMMain:
                    if(inventvalueReportView.Qty > 0)
                        reportStagIns.BOMInqty             = inventvalueReportView.Qty;
                    else if(inventvalueReportView.Qty < 0)
                        reportStagIns.BOMOutQty                 = inventvalueReportView.Qty;
                    break;
                case InventTransType::InventTransfer :
                    if(inventvalueReportView.Qty > 0)
                        reportStagIns.TransferInQty             = inventvalueReportView.Qty;
                    else if(inventvalueReportView.Qty < 0)
                        reportStagIns.TransferOutQty                 = inventvalueReportView.Qty;
                    break;
                case InventTransType::InventTransaction :
                    if(inventvalueReportView.Qty > 0)
                        reportStagIns.CountInQty             = inventvalueReportView.Qty;
                    else if(inventvalueReportView.Qty < 0)
                        reportStagIns.CountOutQty                 = inventvalueReportView.Qty;
                    break;
                }
           
                //For Cost Value
                switch(inventvalueReportView.ReferenceCategory)
                {
                    case InventTransType::Purch :
                        if(inventvalueReportView.AMount > 0)
                            reportStagIns.RecPurchAmount                = inventvalueReportView.AMount;
                        else if(inventvalueReportView.AMount < 0)
                            reportStagIns.IsuPurchReturnAmount          = inventvalueReportView.AMount;
                        break;
                    case InventTransType::Sales :
                        if(inventvalueReportView.Amount > 0)
                            reportStagIns.RecSalesReturnAmount             = inventvalueReportView.Amount;
                        else if(inventvalueReportView.Amount < 0)
                            reportStagIns.IsuSalesAmount                 = inventvalueReportView.Amount;
                        break;
                    case InventTransType::ProdLine ||  InventTransType::Production:
                        if(inventvalueReportView.Amount > 0)
                            reportStagIns.RecProdAmount             = inventvalueReportView.Amount;
                        else if(inventvalueReportView.Qty < 0)
                            reportStagIns.IsuProdAmount                 = inventvalueReportView.Amount;
                        break;
                    case InventTransType::InventLossProfit:
                        if(inventvalueReportView.Amount > 0)
                            reportStagIns.RecAdjAmount             = inventvalueReportView.Amount;
                        else if(inventvalueReportView.Amount < 0)
                            reportStagIns.IsuAdjAmount                 = inventvalueReportView.Amount;
                    break;
                    case InventTransType::BOMLine || InventTransType::BOMMain:
                    if(inventvalueReportView.Amount > 0)
                        reportStagIns.RecBOMAmount             = inventvalueReportView.Amount;
                    else if(inventvalueReportView.Amount < 0)
                        reportStagIns.IsuBOMAmount                 = inventvalueReportView.Amount;
                    break;
                case InventTransType::InventTransfer :
                    if(inventvalueReportView.Amount > 0)
                        reportStagIns.RecTransferInAmount             = inventvalueReportView.Amount;
                    else if(inventvalueReportView.Amount < 0)
                        reportStagIns.IsuTransferOutAmount                 = inventvalueReportView.Amount;
                    break;
                case InventTransType::InventTransaction :
                    if(inventvalueReportView.Amount > 0)
                        reportStagIns.RecCountAmount             = inventvalueReportView.Amount;
                    else if(inventvalueReportView.Amount < 0)
                        reportStagIns.IsuCountAmount                 = inventvalueReportView.Amount;
                    break;
                }
            //For total Received , Issued Total Qty, COst Amount
            reportStagIns.PurchasedQtyTotal       = reportStagIns.PurchQty + reportStagIns.SalesReturn + reportStagIns.ProdInQty
                                                            + reportStagIns.BOMInqty + reportStagIns.CountInQty + reportStagIns.AdjInQty + reportStagIns.TransferInQty;
            reportStagIns.SoldQtyTotal            = reportStagIns.SoldQty + reportStagIns.PurchReturn + reportStagIns.ProdOutQty
                                                        + reportStagIns.BOMOutQty + reportStagIns.CountOutQty + reportStagIns.AdjOutQty + reportStagIns.TransferOutQty;
            reportStagIns.TotalcloseQty           = reportStagIns.OnHandQty + reportStagIns.PurchasedQtyTotal + reportStagIns.SoldQtyTotal;
            reportStagIns.ReceivedCostAmount      = reportStagIns.RecPurchAmount   + reportStagIns.RecSalesReturnAmount
                                                        + reportStagIns.RecAdjAmount + reportStagIns.RecProdAmount + reportStagIns.RecCountAmount
                                                        + reportStagIns.RecBOMAmount + reportStagIns.RecTransferInAmount;
            reportStagIns.IssuedCostAmount        = reportStagIns.IsuSalesAmount   + reportStagIns.IsuPurchReturnAmount
                                                        + reportStagIns.IsuAdjAmount + reportStagIns.IsuProdAmount + reportStagIns.IsuCountAmount
                                                        + reportStagIns.IsuBOMAmount + reportStagIns.IsuTransferOutAmount;
            reportStagIns.TotalCostAmount         = reportStagIns.BeginCostAmount  + reportStagIns.ReceivedCostAmount + reportStagIns.IssuedCostAmount;
            reportStagIns.insert();
            j++;
        }
    }
    ttsCommit;
}
}

Get Worker to User Id in ax 2012

//Get Worker to User Id in ax 2012


public static UserID Worker2UserId(HcmWorkerRecId _WorkerRecId) // Added by ISYX
{
    DirPersonUser   personUser;
    HcmWorker       worker;
     select User from personUser
         exists join worker
            where worker.Person == personUser.PersonParty
                    && worker.RecId == _WorkerRecId;
   
    return personUser.User;
}

Table Data source Record marking in AX form

// Table Data source Record marking in AX form
myDataSource = myDataSource _DS.getFirst();
        while(myDataSource )
        {
            myDataSource _DS.findRecord(myDataSource );
            myDataSource _DS.mark(true);
            myDataSource  = myDataSource _DS.getNext();
        }

Rename Primary key field in AX 2012

//Rename Primary key field in AX 2012

//But is not advisable to do it from Backend
// Only for Code review purpose

void renamePrimaryKey()
{
    Dialog          dialog;
    DialogField     dialogField;
    int             i;
    str             oldValue;
    str             newValue;
    FieldId         fieldId;
    FormDataSource  formDataSource;
    formDataSource      = callerForm.dataSource();
    dialog = new Dialog();
    dialog.addText(strFmt("@SYS70880", common.(dictField.id())));
    // Ignore EDT validation as the rename scenario only requires
    // the type of the EDT and its label and help text.
    dialogField = dialog.addField(dictField.typeName(), '', '', true);
    dialogField.lookupButton(1);
    if (! dialog.run())
        return;
    if (dialogField.value())
    {
        oldValue = common.(dictField.id());
        newValue = dialogField.value();
        if (Box::yesNo(strFmt("@SYS70878",oldValue,newValue),
                       DialogButton::No,
                       strFmt("@SYS70879",dictField.label()),
                       strFmt("@SYS29047",dictField.label())))
        {
            //SIG - start
            if (isConfigurationkeyEnabled(configurationKeyNum(SIG)))
            {
                SIGBaseDocument::checkAndCacheRename(common,dictField.id(),newValue);
            }
            //SIG -end
            startLengthyOperation();
            fieldId = dictField.id();
            try
            {
                ttsbegin;
                common.(fieldId) = dialogField.value();
                common.renamePrimaryKey();
                if (common.TableId == tableNum(UserInfo))
                {
                    common.update();
                }
                ttscommit;
            }
            catch (Exception::Error)
            {
                ttsabort;
            }

            for (i=1; i <= callerForm.dataSourceCount(); i++)
            {
                formDataSource = callerForm.dataSource(i);
                if ( formDataSource.cursor() == formObjectSet.cursor() /*element.docCursor() */)
                {
                    while (formDataSource && formDataSource.joinSource())
                    {
                        formDataSource = this.findDataSource(formDataSource.joinSource());
                    }
                    if (formDataSource)
                    {
                        formDataSource.reread();
                        formDataSource.refresh();
                        formDataSource.active();
                    }
                    break;
                }
            }
        }
    }
    element.close();
}

Create Ledger dimension Account for Dynamics Account in ax 2012

//Create Ledger dimension for Dynamics Account in ax 2012


DimensionStorage::GetDynamicsAccount("001",LedgerActAccounttype::Project)

Printing dynamic parameters value in SSRS through RDP class

//Need to create new table with following fields
1) DataSourceNo
2) TableLabel
3) FieldLabel
4) RangeValue

public static ReportParmTmp rangesToSSRSReport(Query _query)
{
    QueryBuildDataSource    qbds;
    QueryBuildRange         queryBuildRange;
    ReportParmTmp           reportParmTmp;
    Str     250             tableLabel;
    int                     i,j;
    ;
    for (j = 1; j <= _query.dataSourceCount(); j++)
    {
        qbds = _query.dataSourceNo(j);
        if (qbds.enabled())
        {
            tableLabel = tableId2pname(qbds.table());
            for (i = 1; i <= qbds.rangeCount(); i++)
            {
                queryBuildRange = qbds.range(i);
                if (queryBuildRange.value() && queryBuildRange.status() != RangeStatus::Hidden)
                {
                    reportParmTmp.clear();
                    reportParmTmp.DataSourceNo = qbds.uniqueId();
                    reportParmTmp.TableLabel   = tableLabel;
                    reportParmTmp.FieldLabel   = fieldId2pname(qbds.table(), queryBuildRange.field());
                    reportParmTmp.RangeValue   = queryBuildRange.value();
                    reportParmTmp.insert();
                }
            }
        }
    }
    return reportParmTmp;
}

Outlook integration with AX Auto Sync for User Specific (Not in Batch)

static void AutoOutookSync(Args _args)
{
    smmOutlookSync  smmOutlookSync;
    TransDateTime _synchronizeFromDateTime = DateTimeUtil::minValue();
    TransDateTime _synchronizeToDateTime = DateTimeUtil::maxValue();
    smmOutlookSync = smmOutlookSync::construct(smmOutlookMappingTypes::Appointments);
    smmOutlookSync.init();
   
    smmOutlookSync.setSynchronizeFromDateTime(_synchronizeFromDateTime);
    smmOutlookSync.setSynchronizeToDateTime(_synchronizeToDateTime);
    smmOutlookSync.synchronize();
}

AX 2012 Import Master and Setup DATA through Excel Add ins

http://daxmusings.codecrib.com/2012/01/importing-data-to-ax-2012-using-excel.html

Dynamics 365 Import Excel Add ins

https://www.linkedin.com/pulse/dynamics-365-import-financial-dimension-values-sten-baumgarten

Checking Budget control is configured or not in ax 2012 R3

//Checking Budget control is configured or not in ax 2012 R3

private boolean isBudgetControlConfigured(LegalEntityRecId _legalEntityId, boolean _validateLineEntryConfiguration)
{
    SourceDocumentTypeIBudgetControl    localBudgetControlSourceDocumentType;
    LedgerRecId                         primaryLedgerRecId;
    boolean                             isConfigured;
    if (isLegalEntityBudgetControlConfiguredCache.exists(_legalEntityId))
    {
        isConfigured = (isLegalEntityBudgetControlConfiguredCache.lookup(_legalEntityId) == NoYes::Yes? true : false);
    }
    else
    {
        localBudgetControlSourceDocumentType = budgetSourceSourceDocumentType as SourceDocumentTypeIBudgetControl;
        if (localBudgetControlSourceDocumentType)
        {
            primaryLedgerRecId = Ledger::primaryLedger(_legalEntityId);
            isConfigured = Ledger::isLedgerBudgetControlEnabled(primaryLedgerRecId);
            if (isConfigured)
            {
                isConfigured = BudgetControlConfiguration::isSourceIntegratorEnabled(
                    primaryLedgerRecId,
                    localBudgetControlSourceDocumentType.parmBudgetControlSourceIntegrator());
            }
        }
        isLegalEntityBudgetControlConfiguredCache.insert(_legalEntityId, (isConfigured? NoYes::Yes: NoYes::No));
    }
    if (_validateLineEntryConfiguration)
    {
        if (isLegalEntityBudgetControlAtLineEntryConfiguredCache.exists(_legalEntityId))
        {
            isConfigured = (isLegalEntityBudgetControlAtLineEntryConfiguredCache.lookup(_legalEntityId) == NoYes::Yes? true : false);
        }
        else
        {
            primaryLedgerRecId = Ledger::primaryLedger(_legalEntityId);
            isConfigured =
                isConfigured &&
                BudgetControlConfiguration::doBudgetCheckOnEntryForSourceIntegrator(
                    primaryLedgerRecId,
                    localBudgetControlSourceDocumentType.parmBudgetControlSourceIntegrator());
            isLegalEntityBudgetControlAtLineEntryConfiguredCache.insert(_legalEntityId, (isConfigured? NoYes::Yes: NoYes::No));
        }
    }
    return isConfigured;
}

Dynamics 365 Project Service Automation

Command Directory for Dynamics 365 SDK

1) To install Microsoft Dynamics 365 SDK core assemblies
Cmd : Install-Package Microsoft.CrmSdk.CoreAssemblies

2) To install Microsoft Dynamics 365 SDK deployment assembly
Cmd : Install-Package Microsoft.CrmSdk.Deployment

3) To install Microsoft Dynamics CRM 2015 SDK client and portal assemblies
Cmd : Install-Package Microsoft.CrmSdk.Extensions

4) To install Microsoft Dynamics CRM 365 SDK workflow assembly
Cmd : Install-Package Microsoft.CrmSdk.Workflow

5) To install Microsoft Dynamics 365 SDK UII common assemblies
- Microsoft.Uii.AifServices
- Microsoft.Uii.Common
- Microsoft.Uii.Common.Configuration
- Microsoft.Uii.Common.Listeners
- Microsoft.Uii.Common.Logging
- Microsoft.Uii.Common.Logging.Providers
- Microsoft.Uii.Common.Providers
- Microsoft.Uii.Csr.Core
- Microsoft.Uii.Csr.Win32Api

Cmd : Install-Package Microsoft.CrmSdk.UII.CommonAssemblies

6) To install Microsoft Dynamics 365 SDK Xrm Tooling Package Deployment
Cmd : Install-Package Microsoft.CrmSdk.XrmTooling.PackageDeployment

7) To install Microsoft Dynamics 365 SDK core tools,
Cmd : Install-Package Microsoft.CrmSdk.CoreTools

8) To install Microsoft Dynamics 365 SDK Xrm Tooling WPF Controls
- Microsoft.Xrm.Tooling.CrmConnectControl
- Microsoft.Xrm.Tooling.Ui.Resources
- Microsoft.Xrm.Tooling.WebResourceUtility
Cmd : Install-Package Microsoft.CrmSdk.XrmTooling.WpfControls

9) To install Microsoft Dynamics 365 SDK UII desktop assemblies
- Microsoft.Uii.Desktop.Core
- Microsoft.Uii.Desktop.Cti.Core
- Microsoft.Uii.Desktop.SessionManager
- Microsoft.Uii.Desktop.UI.Controls
- Microsoft.Uii.Desktop.UI.Controls.Wpf
- Microsoft.Uii.Desktop.UI.Core
- Microsoft.Uii.Desktop.UI.Wpf
- Microsoft.Uii.Practices.CompositeUI
- Microsoft.Uii.Practices.CompositeUI.Windows
- Microsoft.Uii.Practices.ObjectBuilder
- Microsoft.Uii.Practices.CompositeUI.WinForms
Cmd : Install-Package Microsoft.CrmSdk.UII.DesktopAssemblies

10) To install Microsoft Dynamics 365 SDK Outlook client assembly
Cmd : Install-Package Microsoft.CrmSdk.Outlook

11) To install Microsoft Dynamics CRM 2016 SDK helper sample code
Cmd : Install-Package Microsoft.CrmSdk.WebApi.Samples.HelperCode


Sample code directory for Microsoft Dynamics 365

https://msdn.microsoft.com/en-us/library/gg309721.aspx

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...