• Satyo Iswara
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies
I tried this code for a simple redirection from custom page to record page, but it seems I kept getting cross domain error.
Anybody encounter this?  If yes, is there any known workaround beside using Apex Class?
<apex:page showHeader="false" sidebar="false">
	<script type="text/javascript">
   		window.onload = init;
    
    	function init(){
    		var button = document.getElementById('testButton');
    		button.addEventListener('click',redirectFunct);
    	}
    	function redirectFunct(){
            window.location.href = '/' + '{!$CurrentPage.parameters.id}';
            return false;
        }
	</script>

    <input type="button" value="hello world 2!" onclick="redirectFunct()"/>
	<button id="testButton">
        hello world
    </button>
</apex:page>

 
My goal is to restrict certain commuity user to view certain topic in community builder.  Is this even possible?
It seems to me that the trend where Salesforce is going with article is to assign it to topic instead of refrering to the data category.
Do anyone feels the same way about this?  Is there any salesforce representative can comment on this?