Hot answers tagged audiences
3
Step 1
The AudienceLoader class is just a cache of the user's audience information and so it can sometimes give some misleading results. Try using the Audience.IsMember function instead:
Audience audience = audienceManager.GetAudience("Testing");
SPUser currentUser = SPControl.GetContextWeb(Context).CurrentUser;
if ...
3
AudienceID is an internal field set by SharePoint. You can't set it, but you can retrieve it if it has been saved to the db.
What is your requirement that means you have to control the audience ID? Typically you would retrieve Audience by name. If you need to you can then access the AudienceID value.
Hope that helps.
3
The only out-of-box WebPart that supports audience filtering by content item is the Content Query Web Part. It is part of the Publishing Infrastructure Site Collection feature and requires SharePoint Server edition (not included with Foundation).
Add a CQWP to your page, wire it up to your linked list, and then click the checkbox to enable Audience ...
2
Please refer link below link Mr. Raju
http://social.technet.microsoft.com/Forums/da/sharepoint2010programming/thread/181fdb91-b16d-4e51-a9a4-454c8ad1c374
You will find that it is not possible because SharePoint manages GUID internally. so you can not assign it. in some cases it is possible but in your case it is not possible.
2
To my knowledge you do not add User to an Audience, but rather build rules that would include the respective user to an audience.
Creating rule based Audiences is available here http://msdn.microsoft.com/en-us/library/ms498178
Then you could check is user is part of an Audience in a particular Web, see here http://msdn.microsoft.com/en-us/library/ms500775
2
AudienceLoader objAudLoader = AudienceLoader.GetAudienceLoader();
AudienceManager.IsCurrentUserInAudienceOf(objAudLoader, audience, false)
The AudienceLoader belongs to Microsoft.Office.Server.Audience namespace and documented here: http://msdn.microsoft.com/en-us/library/microsoft.office.server.audience.audiencemanager.iscurrentuserinaudienceof.aspx
...
2
You may get some errors while running this script but you will find that its worked too :)
URL FIX
$hubUrl = "NEW_NAME_OF_WEBAPP"
$find = "OLD_NAME_OF_WEBAPP"
"Installing..."
Add-PSSnapIn Microsoft.SharePoint.PowerShell
if ([Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") -eq $null) { throw "Unable to load Microsoft.SharePoint.dll!"; ...
1
Unfortunately, only solution 2 will satisfy your needs. Like "teylyn" said, audience targeting will only stop you from either seeing the form or not.
You will have to apply security trimming based on the user's department and relevant SP group to which they belong too (assuming that's how you have it structured, each department would have their own ...
1
I was able to do this. I created a custom stored procedure (by copying and modifying the one used by the API to create audiences) to create the audience with the GUID I needed. Look at the ORGLE procs inside the Profile DB to see how this is done.
Anyways, once I created the audiences with the proc. I used central admin to configure the rules.
In general, ...
1
I love how "This doesn't quite seem complicated enough to me." is the typical response from most SharePoint folks when presented with a 5 step process to get some basic out of the box thing to work. I'm constantly astonished by the sheer amount of unnecessary complexity in this product. Anyway...
Not that this will be that helpful but; I ran into a similar ...
Only top voted, non community-wiki answers of a minimum length are eligible