Thursday 21 March 2019

Recent Items on the Lookup - D365 UCI


Hi,

We all know that with UCI we are getting number of good features and one of them in that is showing up the recent items on the lookup. Yes, it is a good feature for sure and sometimes we might have written our own filters and this recent items will not honor those rules.

The simple solution for this is we can disable this from the Lookup Properties.


Hope this helps

--
Happy CRM'ing
Gopinath

Wednesday 20 March 2019

Refresh IFrame in Dynamics 365 UI or UCI

Hi,

We all very used to write the piece of the code from this link whenever we need to refresh the IFrame in CRM.

Very unfortunately, the same code is not working in Dynamics 365 UI version 9.x on wards. No need to worry on that, we have the work around for the same.

We have to pass the WebResource name if it has the full URL and vice versa. Here is the piece of the code for the same. I know, it is little confusion but we have live with it until the PG Team fixes the issue.


                var src = null;
                var newsrc = null;
                var url = Xrm.Utility.getGlobalContext().getClientUrl() + "/WebResources/";
                var iFrameName = "IFramControlName";
                var IFrameControl = formContext.getControl(iFrameName);
                src = IFrameControl.getSrc();
                IFrameControl.setSrc(null);
                if (src.indexOf(url) != 0) {
                    newsrc = url + src;
                }
                else {
                    newsrc = "abc.html";
                }

                IFrameControl.setSrc(newsrc);

Hope this helps.

--
Happy CRM'ing
Gopinath

Tuesday 19 March 2019

Hide Timeline on Mobile Client on Dynamics 365

Hi, 

As we all know that Timeline is a new control introduced from Version 9.x of Dynamics 365. It is a section on Web UI but on the Mobile it appears as a Tab.

Sometimes as per Business requirement we might have to show and hide the timeline. On the web, it is easy to do as it is a section and the same appears as a Tab on Mobile client and show/hide code written for the section doesn't work here. Technically, it is a tab on the mobile. Here is the code that works on the Mobile. We just need to get the timeline tab name to do this.

        var tabObj = formContext.ui.tabs.get("TIMELINEWALL_TAB_SYSTEM_GENERATED");
        tabObj.setVisible(false);

So we have to show/hide section for Web UI and tab for mobile client.

Hope this helps.

--
Happy CRM'ing
Gopinath