Wednesday, January 24, 2024

Update environment admin

Update environment admin in d365 fo


Update environment admin in d365 fo


Prerequisite for Update environment admin in d365 fo

To Update environment admin in d365 fo, you must be a project owner in the LCS project roles.


Steps to Update environment admin in d365 fo:

In LCS, go to your project, and open your environment details page.

Select Maintain > Update environment admin.

In the dialog box that appears, select another Project Owner or Environment Admin user from your LCS project.

Select Save.

All steps are completed Update environment admin in d365 fo


Please Note:

To Update environment admin in d365 fo would cause downtime in the target finance and operations apps environment. Therefore, use this capability in the appropriate way and only after you schedule the downtime in your organization. The new administrator account must be a member of the same tenant that the environment belongs to.


Microsoft Reference:

Update the environment administrator


I hope this blog on Update environment admin in d365 fo was helpful

Friday, January 19, 2024

Deserialize json list

Deserialize JSON list Dynamics 365 FO

JSON:

{

    "data": [

        {

            "BuyerEmail": "6x7n35tz50m0byz@marketplace.amazon.co.uk",

            "AmazonOrderId": "204-1744774-4556347"

        },

        {

            "BuyerEmail": "hnfgtmnkrgfh3v7@marketplace.amazon.co.uk",

            "AmazonOrderId": "204-4589988-8749964"

        }

    ]

}



Class LSAPIINTSPAPIOrderOrderCallResponseDataContract:

[DataContract]

class LSAPIINTSPAPIOrderOrderCallResponseDataContract

{

    List subList;

    [DataMemberAttribute('data'),

        DataCollectionAttribute(Types::Class, classStr(LSAPIINTSPAPIOrderOrderCallResponseContract)),sysoperationdisplayorderattribute('1')]

        public List parmSubList(List _subList = subList)

    {

        subList = _subList;

        return subList;

    }

}



Class LSAPIINTSPAPIOrderOrderCallResponseContract:

[DataContract]

class LSAPIINTSPAPIOrderOrderCallResponseContract

{

    str BuyerEmail;

    str AmazonOrderId;

    [DataMemberAttribute('BuyerEmail')]

    public str parmBuyerEmail(str _BuyerEmail = BuyerEmail)

    {

        BuyerEmail = _BuyerEmail;

        return BuyerEmail;

    }

    [DataMemberAttribute('AmazonOrderId')]

    public str parmAmazonOrderId(str _AmazonOrderId = AmazonOrderId)

    {

        AmazonOrderId = _AmazonOrderId;

        return AmazonOrderId;

    }

}





Below code for deserialize:

LSAPIINTSPAPIOrderOrderCallResponse             LSAPIINTSPAPIOrderOrderCallResponseLocal;

        LSAPIINTSPAPIOrderOrderCallResponseDataContract LSAPIINTSPAPIOrderOrderCallResponseDataContract;

        List                                            listValues = new List(Types::Class);

        ListEnumerator                                  listEnumerator;

        LSAPIINTSPAPIOrderOrderCallResponseDataContract = FormJsonSerializer::deserializeObject(classNum(LSAPIINTSPAPIOrderOrderCallResponseDataContract), _record);

        listValues = LSAPIINTSPAPIOrderOrderCallResponseDataContract.parmSubList();

        listEnumerator = listValues.getEnumerator();

        while(listEnumerator.moveNext())

        {

                LSAPIINTSPAPIOrderOrderCallResponseContract _Contract = listEnumerator.current();

                LSAPIINTSPAPIOrderOrderCallResponseLocal.POAmazonOrderId        = _Contract.parmAmazonOrderId();

                LSAPIINTSPAPIOrderOrderCallResponseLocal.POBuyerInfoBuyerEmail  = _Contract.parmBuyerEmail();

                LSAPIINTSPAPIOrderOrderCallResponseLocal.insert();

        }