Thursday, 31 March 2016

allow opening of emails saved in sharepoint to directly open in outlook

Got a client request where they manually upload draft email to SharePoint so that team can work on it to provide extra info, for this they don't like the option to click on email and then get prompt to save the msg file first and then edit it and then manually overwrite it. This takes too much time.

they wanted the email to open directly in outlook/third part client when they click on msg in SharePoint.

$webApp = Get-SPWebApplication "<<web application url>>"            
$webApp.AllowedInlineDownloadedMimeTypes.Add("application/msg")            
$webApp.Update()






Also add MIME type to web application level i.e. windows -> Run -> InetMgr -> Go to application -> Go to MIME Types and then click Add


Enter
msg to "file name extension" to text field and
"application/vnd.ms-outlook" to text field MIME Types


Do IISReset


https://kerseub.wordpress.com/2012/04/23/add-new-file-type-in-sharepoint/






http://social.technet.microsoft.com/wiki/contents/articles/8073.sharepoint-browser-file-handling-deep-dive.aspx

Tuesday, 2 February 2016

Check user last login time when user last accessed CRM

http://mscrm-chandan.blogspot.co.uk/2013/04/get-last-log-in-datetime-of-crm-user_30.html

SELECT
 SU.SystemUserId
 ,SU.DomainName
 ,SU.FullName
 ,SUO.LastAccessTime
 FROM SystemUser SU
 INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserOrganizations] SUO ON SUO.CrmUserId = SU.SystemUserId
 INNER JOIN [MSCRM_CONFIG].[dbo].[SystemUserAuthentication] SUA ON SUA.UserId = SUO.UserId
 ORDER BY SUO.LastAccessTime DESC,SU.DomainName

Thursday, 10 December 2015

Using fiddler to auto respond

Scenario:

We have got something working in Live but not in test environment after the release of new version, we were using the knockout framework on one of the SharePoint portal page. I had to check if the knockout different version is causing issue with our script. In order to quickly see if the same version which we got on live would work against Test environment. I did following

Using Fiddler:

1. Download Fiddler
2. Make a request to the portal Page
3. In fiddler session listing find the script file you like to replace
4. Right click on file and select decode Selected Session
5. On the AutoResponder Tab
  Enable the 'Enable Rules' checkbox
  Enable  the 'Unmatched Requests Pass through' check box

6.  Drag and drop the file to AutoResponder Rule Area
7.  At a bottom under Rule Editor section
Select the second drop down list and select the option of select a file
8. Select the file which you like fiddler to use to mimic response from server by using local file
9. Click Save
10. Refresh page

Monday, 26 October 2015

Invalid Action

When trying to browse for CRM org, I started to get following Error


Invalid Action
The selected action was not valid.


When looking into event viewer got following information.


Current key (KeyType : CrmWRPCTokenKey) is expired. This can indicate that a key is not being regenerated correctly. Current Key : CrmKey(Id:4e1d5f40-4d60-e511-a481-00155dc1050c, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:09/21/2015 10:41:04, ExpiresOn:10/24/2015 10:41:04, CreatedOn:09/21/2015 10:41:04, CreatedBy:<domain>\<domain user name>.




Resolution:
Start the async service (this could be stopped for many reasons, running out of space/performace and developer thought to stop, service was configured to run under user account and the useraccount either expired or disabled and now async service no longer running). Once async service started restart IIS after 5 minutes, so that new generated keys can be used.



Monday, 12 October 2015

windows shortcut commands

Windows -> Run

1. inetcpl.cpl : opens internet options

2. iexplore.exe -extoff : opens internet explorer with addons as disabled

3. inetmgr : opens IIS manager