I have to display user profiles along with their properties in a gridview in a Sharepoint application. Post that it should display results based on the search criteria being made.
I have tried using foreach loop using UserProfileeManager, but it seems very slow when a search is made for 3000 user profiles.
Is there any way to store all the user profile information somewhere in SQL database, or If any webservice can be used.
Kindly help!
Instead of going for seperate SQL DB.
Get the user profile details and store it in SharePoint list on your site.
Perform the search on that list so that it will increase the performance.
To display in gridview you can do it in lot of ways if the data in SharePoint List.
Hope it helps.
don't understand your platform clearly,since you already known store the info in DB,just store it,such as MySQL of windows,*nix and SQLite for android and iOS.Good luck. u wanna do some search,then if it is simple find ,the use sql 'select xxx,yyy from table where ....';that's ok.Good Luck.
Related
I have a page hosted on an external site and I would like to create a form on that page. The use of the form would be to collect data to create SO in Netsuite.
In the form itself, I would like to have an autopopulate functionality so that for e.g. when I put in "Kat" in End User contact, I see all contacts starting with "Kat". This will enable me to select a correct contact and also help prevent duplication of data. Can you please guide me on how to structure this flow. What Netsuite components should i be using? For the external site, it will use Django.
Thanks
You need to create a couple of RESTlets in NetSuite. One to perform a search to get the contacts and return them in the payload, and one to create sales order in NetSuite and populate it with the values provided in the payload.
How are you solving the issue with CORS?
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.
I am new to xPages and am working on a proof of concept app. We have hundreds of Notes Db's built from a template and the xPage app needs to access view and document data from any one of these databases. Currently in an xPage that contains a viewPanel I can connect to any of the databases and the view that contains the data to display using the static option. I can also go to the source and change the databaseName property and see the data from that database also.
xp:dominoView var="view1"
"viewName="site-lookup" databaseName="Studies\LUME\LUME2939.nsf
But when I try to access any of the databases using computed SSJS, not a static method I am not getting the data or I get errors and no page display.
The users would select a project from a listBox on a landing page and I then create session variables for the projectID and database path to the project database. I have confirmed this works just as expected.
I have tried some example code from xPagesCheatSheet.com (see below ) but nothing is working as I expect. I have spent several hours scouring the boards and other sites looking for an answer and have not found one yet. I am hoping someone here might be able to shed some light on my dim mind and point me in the right direction. Thanks for any assistance you might provide.
Code to change the databaseName for a view panel.
Is it possible to have a field in the current item be changed by clicking a URL? The field would be a choice field with predefined choices.
Such as if the item field is currently:
Status: 2
If a user clicks the link, the field would now be:
Status: 3
If not, is there any other way for a user to easily change a field in the current item without actually haveing to visit the item?
Thanks!
Not Out Of The Box (OOTB) - but you've a few options.
Write an ASPX page to do what you want
Use something like SPServices and javascript to update the list item via the web services.
Use the Client Object Model (2010 only)
By the way - changing stuff on a 'get' can be dangerous as you can do malicious things - for example imagine you have a page that deletes the users account without any prompting (exact example doesn't matter) - what if someone clicks on that link by mistake or even worse what about an email sent with an image with that page as source URL - simply viewing the email could delete the users account.
It's not possible by using a GET request, but SharePoint 2010 is offering a RESTful API to manage ListItems from any client
The REST API is located within the virtual WebServices folgder under each SharePoint Site.
http://YourSharePointSite/_vti_bin/ListData.svc.
To perform an update on SharePoint ListItems you have to create a PUT Request. For more information on SharePoints REST API you should have a look at this MSDN site, there are also a lot of samples linked from this article.
Thorsten
I am creating a form within InfoPath which is to be integrated into a SharePoint 2007 Portal. Within this form there will be a textfield into which a user can enter the Name of a Person.
How can I validate whether this Person exists or not?
Instead of validating the user, is there a way to fill a dropdown List with all usernames of the portal? (which of cause would be users from the Active Directory)
I haven't done this specifically, so there may be a better way, but I've been pulling a lot of data out of SharePoint and into an InfoPath Form (deployed to a SharePoint forms library and accessible through SharePoint Forms Service with MOSS Enterprise) and also going the other way using the SharePoint web services - very quick to use, and the person web service is right there.
Have you tried looking at the Contact Selector (an ActiveX control). Here is a MSDN-article describing how to add it as a control in InfoPath and this one describes how to make it work.
I have been using it in the majority of my infopath projects and it works flawlessly - also for browser-enabled forms.
When doing something similar in an ASP.NET application, I've used the Sharepoint search and searched the "People" Scope for the specific user. You can also search across profile information so you can pull back everyone with a certain Job Title, or in a specific Department.
I don't validate a person's existance, but I do determine a person's full name using their login and SharePoint. You should be able to modify this code for your purposes, it is below. For it to function you need a data connection in your InfoPath document called GetUsersFromSP. Configured as follows:
Location is - http://njintranet2/_vti_bin/usergroup.asmx?WSDL
Operation is – GetUserColectionFromSite (last one on list)
Automatically retrieve data when form is opened should be checked.
string ADName = System.Environment.UserName;
IXMLDOMDocument3 UserQuery = (IXMLDOMDocument3)thisXDocument.GetDOM("GetUsersFromSP");
UserQuery.setProperty("SelectionNamespaces",
"xmlns:dfs=\"http://schemas.microsoft.com/office/infopath/2003/dataFormSolution\" " +
"xmlns:tns=\"http://schemas.microsoft.com/sharepoint/soap/directory/\"");
((WebServiceAdapterObject)thisXDocument.DataAdapters["GetUsersFromSP"]).Query();
IXMLDOMNode Users = UserQuery.selectSingleNode("//dfs:myFields/dfs:dataFields/tns:GetUserCollectionFromSiteResponse/tns:GetUserCollectionFromSiteResult/tns:GetUserCollectionFromSite/tns:Users");
foreach (IXMLDOMNode current in Users.selectNodes("tns:User"))
{
string Login = current.attributes.getNamedItem("LoginName").text;
Login = Login.ToUpper();
if (Login.EndsWith(ADName.ToUpper()))
{
thisXDocument.DOM.selectSingleNode("my:root/my:config/my:User").text = current.attributes.getNamedItem("Name").text;
break;
}
}
Use this control:
http://blogs.msdn.com/infopath/archive/2007/02/28/using-the-contact-selector-control.aspx
Or if you want to build your own validator, you'll need to query the SharePoint profile database. I'd recommend this over querying AD directly. There's lots of articles online about working with the profile database.
Have a look at this Link, it explains how to populate a dropdown with the SharePoint Users
http://blueinfopath.blogspot.com/2008/10/how-to-populate-list-with-sharepoint.html
I you want to validate,
- Make a textbox
- Add a Button, name it ValidateUser
- Create a Receive Connection to the ......
- Att Rules to the ValidateUser
- Add the textbox to the field AccountName in the Secondary Datasource
- Execute the receive connection
- Get the value of the field Value with filter Name="PreferredName"
This work for Infopath Form Services
Test it and enter the UserLogin into the textbox and click on the Validate Button
Frederik