Showing posts with label Activity. Show all posts
Showing posts with label Activity. Show all posts

Friday, January 31, 2014

How to get the Microsoft CRM “Closed Activities” Nav Bar Link Back (if you delete it)

Just export the solution of entity and add following relationship

<NavBarByRelationshipItem RelationshipName="Contact_ActivityPointers" Id="navActivityHistory" TitleResourceId="Tab_Label_History" Icon="/_imgs/ico_18_history.gif" ViewId="21E2B905-6FDB-470d-8517-AD69B4C01268" Sequence="20" Area="Info">
<Privileges>
     <Privilege Entity="" Privilege="ReadActivity" />
</Privileges>
<Titles>
<Title LCID="1033" Text="Closed Activities" />
</Titles>
</NavBarByRelationshipItem>

Here I have set the example of contact entity.

Monday, July 29, 2013

Default Activity ‘Filter on’ to ‘All’ Dynamics CRM 2011 UR12

//default the Activities 'Filter on' to 'All' for Account and Contact for rollup 12 

function filterAllActivities() {

    document.getElementById("navActivities").onclick = function () {
        Mscrm.Details.loadArea(this, "areaActivities");
        document.getElementById("areaActivitiesFrame").onload = function () {
            var entityName = Xrm.Page.data.entity.getEntityName();
            var entity = entityName.charAt(0).toUpperCase() + entityName.substr(1);
            var doc = this.contentWindow.document;
            var filterOn = doc.getElementById("crmGrid_" + entity + "_ActivityPointers_datefilter");
            filterOn.value = "All";
            var evt = document.createEvent("HTMLEvents");
            evt.initEvent("change", false, true);
            filterOn.dispatchEvent(evt);
        };
    };
}