Showing posts with label Release Wave 1 2020. Show all posts
Showing posts with label Release Wave 1 2020. Show all posts

Tuesday, 7 April 2020

Status of the Activities on Timeline is back with Dynamics 365 2020 Wave 1 Release

Hi Everyone,

Today I was testing something on 2020 Wave 1 Release version of Dynamics 365 and you know, I am able to see the Status of the activities on the timeline. It was there on some older versions and suddenly disappeared. Not sure what happened and it was very hard to find what are the pending activities to take an action without status.

And, now it is back. Thanks for fixing it.
Hope this helps.

--
Happy 365'ing
Gopinath

Thursday, 26 March 2020

addOnLookupTagClick event in Dynamics 365 Release Wave 1 2020 - Restrict lookup record opening

Hi Everyone,

I was just going through Microsoft Docs to understand the new features that were released in Dynamics 365 Release Wave 1 2020 and found a new event introduced for lookups and I feel it is quite useful.

While working many of our customers might have clicked on a lookup value by mistake and the system might have redirected them to lookup record by loosing existing context of the working record. 

By using this addOnLookupTagClick event, we can control that. Here is the peice of the code for the same. Just put this code on the load event.


function onLoadOfCase(executionContext) {
    var formContext = executionContext.getFormContext();
    formContext.getControl('customerid').addOnLookupTagClick(function (e) {
        e.getEventArgs().preventDefault(); // disables the default behaviour of opening the record
        // Get the lookup record
        var lookupRecord = e.getEventArgs().getTagValue();
    });

}

The above code will prevent opening the lookup record when clicked. However if you want to open a record, we can use NavigateTo API and open the lookup record as a popup without disturbing/loosing the current context.

Here is the piece of the code for the same.


function onLoadOfCase(executionContext) {
    var formContext = executionContext.getFormContext();
    formContext.getControl('customerid').addOnLookupTagClick(function (e) {
        e.getEventArgs().preventDefault(); // disables the default behaviour of opening the record
        // Get the lookup record
        var lookupRecord = e.getEventArgs().getTagValue();
        // Open lookup record as a popup.
        Xrm.Navigation.navigateTo({
            pageType: "entityrecord",
            entityName: lookupRecord.entityType,
            formType: 2, // Only Edit Mode is supported now.
            entityId: lookupRecord.id
        }, {
            target: 2,
            position: 1,
            width: 900,
            height: 600
        });
    });
}


Hope this helps.

--
Happy 365'ing
Gopinath

Open Entity Record as a Modal Popup in Dynamics 365 CE Release Wave 1 2020

Hi Everyone,

Today I was testing new features of PowerApps Release Wave 1 2020 in trial instance and found that now we can open Entity record as a popup. 

Here is the piece of code and it is supported only for opening existing records in the system.


Xrm.Navigation.navigateTo({
        pageType: "entityrecord",
        entityName: "contact",
        formType: 2, // Only Edit Mode is supported now.
        entityId: "27f1a9f5-936d-ea11-a811-000d3a3e14c7"
    }, {
        target: 2,
        position: 1,
        width: 900,
        height: 600

    });


We can also open the record in a specific form by just providing the formId. Try below.


Xrm.Navigation.navigateTo({
        pageType: "entityrecord",
        entityName: "contact",
        formType: 2, // Only Edit Mode is supported now.
        formId: "293c878f-f068-40a0-ae48-4297e060871c",
        entityId: "27f1a9f5-936d-ea11-a811-000d3a3e14c7"
    }, {
        target: 2,
        position: 1,
        width: 700,
        height: 600

    });

Hope this helps.

--
Happy 365'ing
Gopinath

Monday, 17 February 2020

Email as a popup on Sales Hub - Dynamics 365 - 2020 Release Wave 1

Hi Everyone,

Today I was doing some testing Sales Hub and observed that there is a popup opening when we click on Email button from Activities View.

Not sure why it is applied only on Sales Hub and not on Customer Service Hub.

--
Happy 365'ing
Gopinath