Check list merge code retail
CHECK LIST MERGE CODE RETAIL        
Song Nghia - Technical Consultant

Thanks Phuoc Dinh - Technical Consultant for document

1.     CRT
a.       Request
b.       Response
c.       Service
d.       Entity
Example:

2.     Retail Server

a.       EdmModelExtender.cs
b.       CustomizedEdmModelFactory.cs
c.       Controller class

Example:
3.     Retail Proxy
a.       Manager class

Example:

4.     POS
a.       Dataservice
                                       i.            DataServiceEntities.g
                                     ii.            DataServiceRequests.g
b.       Entities (if have)
c.       Handler (if have)
d.       Operations (if have)
e.       RequestHandlers (if have)
f.        TriggerHandlers  (if have)
g.       Resources (if have)
h.       ViewExtensions (if have)

Example



5.       SQL scripts 


6.       After build CRT & Retail Server copy and pasted dll into 2 folder in RetailServer as below:

a.       K:\RetailServer\WebRoot\bin

b.       K:\RetailServer\WebRoot\bin\Ext

7.       Setup CRT DLL into CommerRuntime.Ext.config


8.       Setup CRT & RetailServer DLL into web.config


9.       After build Retail package update DLL into web.config





Get log screen D365 FO
Get log screen D365 FO
Song Nghia - Technical Consultant


private str getLogScreen()
    {
        SysInfologEnumerator    sysInfologEnumerator;
        SysInfologMessageStruct infoMessageStruct;
        ErrorMsg                logMessage;
        str                     logString;
        int                     i;
        #Define.NewLine('\n')
    
        sysInfologEnumerator = SysInfologEnumerator::newData(infolog.infologData());
    
        while (sysInfologEnumerator.moveNext())
        {
            i = 1;
            infoMessageStruct = SysInfologMessageStruct::construct(sysInfologEnumerator.currentMessage());
            while (i <= infoMessageStruct.prefixDepth())
            {
                logString = logString + infoMessageStruct.preFixTextElement(i) + '. ';
                i++;
            }
            logString = logString + " " + infoMessageStruct.message();
        }
        infolog.clear();
        return logString;
    }
Get Customer Account Intercompany
Get Customer Account Intercompany
Song Nghia - Technical Consultant



private CustAccount getCustAccountInterCompany(RetailStoreTable retailStoreTable)
    {
        CustAccount  custAccount;
        InterCompanyTradingPartner interCompanyTradingPartner;
        RecId tradingPartnerVendRecId, tradingPartnerCustRecId;
        CustTable  custTbl;
        changecompany(retailStoreTable.inventLocationDataAreaId)
        {
            VendTable vendTable =  VendTable::find(retailStoreTable.LAW_DefaultVendor);
            RecId partyId = vendTable.Party;
            tradingPartnerVendRecId = InterCompanyTradingPartner::findVendor(partyId,retailStoreTable.inventLocationDataAreaId).RecId;
        }

        select interCompanyTradingPartner
            where interCompanyTradingPartner.RecId == tradingPartnerVendRecId;

        tradingPartnerCustRecId = InterCompanyTradingRelation::getRelatedTradingPartner(interCompanyTradingPartner).RecId;

        custAccount= InterCompanyTradingRelation::getRelatedTradingPartner(interCompanyTradingPartner).custTable().AccountNum;
        
        return custAccount;
    }