Home

how to implement audience using CSOM?

%3CLINGO-SUB%20id%3D%22lingo-sub-54606%22%20slang%3D%22en-US%22%3Ehow%20to%20implement%20audience%20using%20CSOM%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-54606%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%26nbsp%3Btarget%20content%20based%20on%20audience%20feature%20of%20sharepoint.%20Requirements%20demands%20to%20customize%20the%20UI%20which%20includes%20attachment.%20%26nbsp%3BConent%20Query%20Web%20Part%20(CQWP)%20supports%20the%20audience%20but%20attachment%20link%20is%20not%20supported.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOnly%20option%20left%20is%20to%20write%20an%20CSOM%20code%20to%20pull%20the%20data%20and%20target%20content%20to%20audience.%20But%20I%20could%20not%20find%20any%20links%20related%20to%20this%20implementation.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20possible%20to%20implement%20audience%20using%20CSOM%20or%20JSOM%20or%20REST%20API%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-54606%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPI%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ECode%20Samples%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPatterns%20and%20Practices%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-55408%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20implement%20audience%20using%20CSOM%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55408%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F113%22%20target%3D%22_blank%22%3E%40Paul%20Schaeflein%3C%2FA%3E%26nbsp%3B-%20Thanks%20for%20the%20input.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20for%20missing%20that%20bit.%20I%20am%20using%20sharepoint%20online.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EServer%20side%20code%20webparts%20are%20deprecated%20recently%20in%20online%20version.%20I%20think%20only%20option%20left%20out%20is%20to%20implement%20using%20CSOM.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-55054%22%20slang%3D%22en-US%22%3ERe%3A%20how%20to%20implement%20audience%20using%20CSOM%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-55054%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20don't%20mention%20whether%20you%20are%20online%20or%20on-premises.%20For%20online%20deployments%2C%20the%20typical%20approach%20is%20to%20create%20a%20custom%20web%20part%20that%20inherits%20from%20the%20web%20part%20with%20the%20closest%20functionality.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20do%20not%20want%20server-side%20code%2C%20then%20you%20will%20need%20to%20code%20the%20audience%20functionality%20yourself.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Srinivas Narula
Contributor

I am trying to target content based on audience feature of sharepoint. Requirements demands to customize the UI which includes attachment.  Conent Query Web Part (CQWP) supports the audience but attachment link is not supported.

 

Only option left is to write an CSOM code to pull the data and target content to audience. But I could not find any links related to this implementation.

 

Is it possible to implement audience using CSOM or JSOM or REST API?

2 Replies
Highlighted

You don't mention whether you are online or on-premises. For online deployments, the typical approach is to create a custom web part that inherits from the web part with the closest functionality.

 

If you do not want server-side code, then you will need to code the audience functionality yourself.

@Paul Schaeflein - Thanks for the input.

 

Sorry for missing that bit. I am using sharepoint online.

 

Server side code webparts are deprecated recently in online version. I think only option left out is to implement using CSOM.

Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies