Community Id from IPSRequestContent

I was trying to read the value of community Id from IPSRequestContext, just like I read other values like DBActionType, sys_title, sys_contentid etc.

This read is happening in a custom workflow action we wrote.
The code is as follows:

String communityId=ipsrequestcontext.getParameter(“sys_communityid”);

However, I always get null. Any clue what wrong I am possibly doing?


The community id is a “session private object” (attached to the session) not an HTML parameter attached to the request.

You can use this IPSRequestContext.getSecurityToken().getCommunityId(); to retrieve the community id.


Thanks Dave…this call worked out fine and I got the community Id.