Dynamics CRM 2011 - Custom form with duplicate checking - c#

I need to create a custom opportunity form which will almost mirror the out of box one but would like to add a section for checking duplicate records.
The overall goal is that when the form is filled out that section should populate with possible duplicate records to merger with.
I know there is out of box duplicate checking but not sure if it can be implemented this way.
Thanks,
Jon

You should be able to build a Web Resource in an IFrame that uses javascript to call the RetrieveDuplicatesRequest message. Here's a link that should help:
http://crm-edinburgh.com/2011/08/crm-sdk-using-detect-duplicates-settings-in-code/
This assumes that you already have Duplicate Detection set up and running.

Related

Recognize record created from outlook/email in plugin

I'd like to perform some operation in mscrm plugin, if a new record is created automatically by CRM client for Outlook. Eg. it can be a contact or an incident created from an email.
Is there way to check this condition?
We have contact's first name and last name filled oppositely and incident without the caseorigincode field filled, when created from an email in Outlook. Maybe there is a better workarround to solve these two issues. But still I am wondering about the original question.
According to the sources available online, there is really no reliable way to solve this.
There was property CallerOrigin until CRM 4. Then it got deprecated, but continued working for some time, as state in another answer (https://stackoverflow.com/a/14812885/1474519). But it doesn’t seem to be working anymore in CRM 2015.
I found couple advices with IsExecutingOffline and IsOfflinePlayback, but it is really not solving the problem.
I also found a tip to check this code HttpContext.Current.Request.Url.ToString();. This doesn’t work for me.
I found the most complete information here: http://blog.simpletrees.com/2012/03/executioncontextcallerorigin-in.html
According to this article, I am sending a value in a hidden field from my form (or thru API, from plugin, from workflow). As this field is not set when a record is created from outlook, I can recognize the record being created from Outlook. There is of course problem, this field might not be set when importing records or when using mobile app. But I don’t see a better way to go.
Therefore, I started request on Microsoft Connect to add this functionality. You can vote for it here: https://connect.microsoft.com/dynamicssuggestions/feedback/details/1776771
You could add an attribute to the contact and incident to save the origin of the creation.
Then you add a plugin that listens to the Create event of the entities and register it only for client side (offline) execution.
Or you check the PluginExecutionContext for the IsExecutingOffline and IsOfflinePlayback properties to check if the creation was initiated from outlook and store the appropriate value.
https://msdn.microsoft.com/en-us/library/microsoft.xrm.sdk.ipluginexecutioncontext_members.aspx

Get user detailed activity on Documents in Sharepoint 2010

I currently have a client that needs to generate a report on the user's changes on the documents on every Document Library on every site collection.
I know I can use the Audit module OOB, but it doesn't show enough detailed data on the changes made on each item.
I was thinking about the detailed version history on the documents, but I would have to populate through every item of every list on every site collection. Something like this.
I was thinking about doing a custom page that combines both. I can filter the audit info of a particular user on a particular date range, and use the ItemId to get it's versioning details up to the audit date.
What do you think? could that be possible? is there a better way?
Thank you!
I recommend you develop a EventReceiver implemented in sitecollection level, so you can save "custom-made" any changes in elements of lists or libraries. So you can have your custom audit log in alternate database.
See also: http://msdn.microsoft.com/es-ec/library/ee231563.aspx
The EventReceiver is a good feature to keep high control in SharePoint Functionality.
Sorry for my bad english.

Sharepoint retrieving data from WebPart containing custom fields

I've got a site with WebPart containing custom fields.
http://wsscg.blob.core.windows.net/resources/forum/front/aa432.PNG .
My goal is following: I want to add a button below this form and after click, data from it goes to a custom list.
So far I've managed to add a button and a code inline with Sharepoint Designer. It adds some data (like 1,2,3,4,5) to the list that I want. But the problem (probably last) is how to retrieve data from the form.
I would highly appreciate any help.
I recommend you to search here: http://sharepointjavascript.wordpress.com/
I've found there many useful client-side gotchas.
Site seems down today, but take a look at cached version of dynamic js sp form:
http://webcache.googleusercontent.com/search?q=cache:j97GDCJkwsYJ:sharepointjavascript.wordpress.com/2012/01/19/dynamic-forms-for-sharepoint/+&cd=2&hl=en&ct=clnk&gl=en
where getFieldValue function used.
Hope that can help.

Wizard in asp.net, client vs serverside

Im going to make a wizard in asp.net. Step one will be about 7 radiobuttons, leading to different steps. Each step will have some dropdown lists or similar, leading to a final page. The final page will be the same no matter which "route" you take. What i would like to know is: Do i solve this by creating an asp:wizard, or maybe just show/hide some asp:placeholders? Or do i make the steps on the clientside, using a generic handler to save to my database, generate json results to populate dropdowns etc? Thanks
If you have know-how of jQuery and other stuff then you must to use jQuery/jQuery plugins.
Wizard plugins
http://thecodemine.org/
Stackoverflow Thread

SharePoint most clicked links

I am trying to make a web part that will display what links got clicked/viewed the most across the whole site collection. These links come from a SharePoint list.
Is there a mechanism in the object model that can be used to accomplish this?
Any thought would be helpful.
If the links all go to SharePoint pages within your portal, then you might be able to gather the information in your Site Usage Report, then query that in a custom web part. If the links point to places outside your portal, I am not aware of any out-of-the-box record of which links are getting clicked on in a SharePoint list. You could possibly make some javascript to add special code to the list interface so that, whenever a link is clicked, it first records to a database, then takes the user to the destination.

Categories