Sunday, 30 August 2020

DATABASE SYNCHRONIZATON IN D365

 HOW TO SYNCHRONIZE DATABASE IN D365


There are multiple ways to synchronize database in dynamics 365 fno.

1) FULL synchronization


You should always do full synchronization in case you have the below points.
a) any updates
b) after get latest
c) any major customization import.
However this should also be done along with the builds of the model.

As shown in the below screenshot.
Select Dynamics 365 > Build Models > 

DATABASE SYNCHRONIZATON IN D365,db sync in d365,database syncronisation with build,build and database sync in d365,ax 2012 synchronize database,



for Full build you can click on Synchronize database and then click synchronize.
However I would suggest you to click on Full build and then on the other tab Options select Synchronize database.

build in d365,DATABASE SYNCHRONIZATON IN D365,db sync in d365,database syncronisation with build,build and database sync in d365,ax 2012 synchronize database,


Now click on Options and select Sync


 Now click BUILD.


2)Synchronization only database

you can just sync database with the below option.

select sync database and select sync.

SYNC DB WITH PROJECT BUILD.
SET THE PROPERTIES OF THE SYNC DATABASE IN THE SOLUTION EXPLORER TO YES AS HSOWN BELOW.



tHANKS,
VIKAS MEHTA.

GET CURRENT LANGUAGE IN D365

 GET CURRENT LANGUAGE IN D365

Below code is used to get the current language of the system.


static void main(Args _args)
{

//get company's language
info(companyinfo::languageId());

// get user language (user setup)
    info(new xInfo().language());
    

// get the system language id 
info(SystemParameters::getSystemLanguageId());

}


Thanks,

Vikas Mehta.

HOW TO GET THE BARCODE FROM CODE IN D365

 HOW TO GET THE BARCODE FROM CODE IN D365

With the below code you can pass the text and get the corresponsing barcode value in Dynamics 365.

 public str getBarcode(str _barCodeText)
    {
        BarcodeCode128 barcode;

        barcode = Barcode::construct(BarcodeType::Code128);
        barcode.string(true, _barCodeText);
        barcode.encode();

        return barcode.barcodeStr();
    }


THANks,
Vikas Mehta.

How to get exception error in info

 Exception error in info

D365 exception message 

public  str getErrorStr()
    {
        SysInfologEnumerator enumerator;
        SysInfologMessageStruct msgStruct;
        Exception exception;
        str error;
        enumerator = SysInfologEnumerator::newData(infolog.cut());
        while (enumerator.moveNext())
        {
            msgStruct = new SysInfologMessageStruct(enumerator.currentMessage());
            exception = enumerator.currentException();
            error = strfmt("%1 %2", error, msgStruct.message());
        }
        return error;
    }


Thanks,

Vikas Mehta.

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++

Blog Post 6: Bonus – Building Your First Custom Copilot Plugin in X++  Introduction In our previous posts, we explored what Copilot can do o...