How to get data between connecting web part in Sharepoint 2013 - sharepoint

are there any ways that in the eventreceiver of one of the two connected lists, i can get the filter value between 2 connected list web parts.
BR
Kelvin

Event receiver will not help you as it triggers item related events like create, update, delete. Event receiver cannot reach data sent from one webpart to another. You can create your own webpart that can receive data and connect it to task webpart same way as webpart with document library. I created webpart that can get data from another webpart via data connection. You can find it here including sources: https://spgooglemappart.codeplex.com

Related

How to create Remote Event receiver for GroupUserAdded event

I have a specific situation where, I need to perform some activity when a new user is added to a SharePoint Group. I am trying to achieve this by using Remote event receivers but i am unsuccessful so far. I couldn't find any reliable resources explaining how the GroupUserAdded event type can be attached to the Remote event receiver.
I know it is possible to attach these event types using the farm solution in SharePoint on premise. but i am specifically looking for Remote event receivers as we don't want to write a farm solution and also we want to extend this to SharePoint online.
Problem : Unable to attach Security related Event types such as GroupUserAdded to Remote event receivers
Sharepoint versions : Sharepoint 2013/2016 and Sharepoint Online.
Please note that, I am able to attach the basic event types such as ListItemAdded,ListItemUpdated etc. So i am not looking for a general steps about how to setup a Remote event receivers, but i am trying to solve a specific issue about why it is not possible to attach GroupUsersAdded event type to the Remote event receivers in Sharepoint Online or Sharepoint 2013/2016.
here's a C# code snippet from my solution which does work (SP Online):
var eventReceiverUserAdded =
new EventReceiverDefinitionCreationInformation
{
EventType = EventReceiverType.GroupUserAdded,
ReceiverName = "GroupMembershipChanged", // can be anything
ReceiverUrl = url, // supply your own
SequenceNumber = 1000
};
web.EventReceivers.Add(eventReceiverUserAdded);
web.Context.ExecuteQuery();
Just supply the url of your handler as url. I used an Azure Function for that.

Display SharePoint Documents Sub Grid on the MS Dynamics 365 form

I have a requirement to display SharePoint Documents Sub Grid on the MS crm Dynamics 365 Custom Entity Form.
Can anyone let me know, how to achieve this using Supported or unsupported way?
You can find solution here:
You may use the below line of code to set the Iframe url to display the subgrid in iframe:
Xrm.Page.getControl("IFRAME_Documents").setSrc(Xrm.Page.context.getClientUrl() + "/userdefined/areas.aspx?formid=" + CurrentFormId + "&inlineEdit=1&navItemName=Documents&oId=%7b" + recordId + "%7d&oType=" + oTypeCode + "&pagemode=iframe&rof=true&security=852023&tabSet=areaSPDocuments&theme=Outlook15White");
Where:
“IFRAME_Documents” is the Iframe name.
“CurrentFormId”= Is the Current selected form id which you can get using Xrm.Page.ui.formSelector.getCurrentItem().getId().replace("{", "").replace("}", "");
“recordId” = Record’s GUID
“oTypeCode” = Entity Type Code which you can get using Xrm.Page.context.getQueryStringParameters().etc;
This is how I did in D365. (Using Chrome made it easier)
Enable document management for the entity
When Documents tab shows
for the entity record open it.
Then open Chrome dev console (F12)
Grab the panel (which is actually an iframe) source. The URL is of format:
/userdefined/areas.aspx?appid=...........&formid=.......&inlineEdit=1&navItemName=Documents&oId=.....&oType=.....&pagemode=iframe&rof=true&security=......&tabSet=areaSPDocuments&theme=Outlook15White
Replace the dotted values in the source URL with appropriate values
and make the URL fully qualified prefixing with the root.
Just ensure not using any hardcoded GUIDs or IDs in the values. In this way this can be reused easily wherever needed.
Latest: Recent version has direct OOB customization to achieve this.
Dynamics 365: Related Documents Now Display on Record’s Main Form
Add or remove the SharePoint documents tab to the main form for any table
In short: Server to Server integration approach shows physical documents in crm grid. No need of iframe solution.
Old school List component integration has a limitation, it shows document location crm records in crm grid, so you need iframe solution to show physical docs from Sharepoint.
[Applicable to Server based Integration] - It will show Documents in the grid.
Open an Entity Web form where you want to display SharePoint document library.
Click on the Insert-tab, click on Sub-Grid, specify a name to sub-grid
In “Data Source” section select “Only related Records” from Records dropdown
Select “Document Location (Regarding)” in Entity dropdown
Select “Active Document Location” from Default View section [shown in Below Image]
Click on Set. Click on save then publish the customization
Reference
Update: [Applicable to List component Integration]
Associated view will show what we want but subgrid is not working as expected. Upon research, this is product limitation. Read more
sometimes it is desirable to have an “at a glance” view of documents associated with a record. In order to view the documents in SharePoint that are related to a record, the user must navigate to a related entities area outside of the form. (Similar to Connection, or other related entities)
For most related entities, a sub-grid can be used in the form to display the relationships immediately on the form, but there is no simple workaround for the Documents.
Another alternative is showing Associated view in IFRAME.
EDIT:
In latest Dynamics 365, CRM + Sharepoint integration using List component is deprecated. Only way is Server to Server (S2S) based CRM + Sharepoint integration is possible. This S2S approach shows documents in the associated grid & subgrid, not the doc location like in List component. CRM - Sharepoint wrapper taking care of conversion from CRM FetchXML to SP CAML query & give us the result we want.
The great thing about having the documents queried by CRM is that you
can create custom views of documents in the same way you would with
any other entity in CRM. When using the list component the default
view in SharePoint was rendered in the IFRAME meaning that to get new
columns you had to have list customisation privileges on SharePoint
such that all users would see the changes. With the new server to
server integration you can select SharePoint columns to include in
your own views and even add in your own filters using the CRM advance
find interface.
Read more.

Can i get the event about file operation on OneDrive?

As we know, we can add remote event receiver to the list. then if there is a item added or updated in this list, we can get the event send by sharepoint 2013 online.
This is the info about event in sharepoint:
[https://msdn.microsoft.com/en-us/library/Microsoft.SharePoint.SPItemEventReceiver_methods.aspx]
So can we have this kind of method in OneDrive(skydrive) too?
It means when there is a file added in the OneDrive, then my App can get this event and take some action on this file.
thanks.
The OneDrive API does not (yet!) support subscriptions to events. Please visit the OneDrive user voice and make/vote up topics that you'd like to see implemented.
To question #2 the view.changes api allows for applications to easily know which changes have happened since the application last queried OneDrive might be just what you need without subscriptions.

Custom E-Mail Event for Sharepoint Upon InfoPath Form Submit

A customer wants an e-mail notification sent to a select group of people when a new InfoPath form is submitted to a particular Document Library on their SharePoint 2007 setup.
Easy, right? Use a custom set of rules for an e-mail submission in InfoPath, plop in the addresses, use a fancy equation to construct a useful e-mail subject line... and done. Worked like a charm. Problem solved in just a few minutes...
However, the customer doesn't want the whole form e-mailed out or even attached to the e-mail. They only want a few select fields from the form in a very simple message.
I've tried writing an ItemAdded event handler from the SPItemEventReceiver base class, but it doesn't seem to do anything. Yes, I added the event handler to the GAC and created a Feature.xml and Elements.xml to register the event handler with SharePoint. But, I'm not sure if this is even the right event to customize. Is an item in a Document Library the same as an item in a List?
Has anyone had luck doing a similar e-mail notification event? Is there an easier way to accomplish what I'm attempting? Perhaps there's a way to do this easily through the SharePoint interface or edit the contents of the e-mail submission rule to be a simplified version of the form?
Any advice is greatly appreciated!
How about a very simple SharePoint Designer workflow that is triggered when the form is uploaded. From there you send an email and include content of the (exported) columns in an email body.

connecting web parts in sharepoint

I am trying to connect to simple webparts in my sharepoint team site, i need one of the webparts to filter its information based on what it recieves from another webpart
I am using the query string filter webpart and the a list view webpart but no matter how i connect them always i am getting this error
"Web Part Error: This page has exceeded its data fetch limit for connected Web Parts. Try disconnecting one or more Web Parts to correct the problem."
What should I do and what am I doing wrong
update:
i can connect to web parts on some other pgae, but getting this error on the DispForm.aspx page of a certain item , is webpart connections not allowed there ??!!
There is an issue with creating QueryString filter webparts in sharepoint, when you're not using the Web UI (I'm making an assumption that you aren't).
This fella here has a post about it and how he hacked around the issue.
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/0328f1b2-20cd-427f-887a-e2925bd695e3/
Another option is not using the QueryString filter web part at all, and just passing querystrings to a regular web part.
http://mo.notono.us/2008/04/moss-filter-views-through-url-query.html
Me too,you look this url
http://blogs.msdn.com/sharepointdesigner/archive/2008/03/26/sharepoint-conference-building-a-sharepoint-designer-mashup-part-1.aspx
I have fixed this issue.
Problem
In the sharepoint list, filtered column name in query strng fitlter has been deleted and added new column with same name.
Solution: Remove filter and Set current view again in webpart properties. It works fine.
With Regards,
Marees
The page 'DispForm.aspx' usually is a form of a SharePoint list and different rules apply to list-form pages than on pages that do not belong to a Sharepoint list (and the differences are hardly documented). I solved the problem by workarounds; you could use not a ListViewWebPart, but a DataViewWebPart (Using Query String and Data view WebPart), or you could avoid the QueryStringFilterWebPart by using URL parameters that the ListViewWebPart understands (ListViewWebPart Filter Param).

Resources