Skip to content

henliu86/ConnectionGraph

Repository files navigation

ConnectionGraph

####1. Create a Canvas App in Visualforce page

<apex:page showHeader="false" controller="GraphMyFollowerCtrl">
    <apex:canvasApp developerName="Graph_Connection" 
    				applicationName="Graph Connections" 
    				maxWidth="750" 
    				scrolling="true"
    				parameters="{'sourceUserId':'{!myUserId}','targetUserId':'{!currentFocusUserId}'}"/>
</apex:page>

####2. With the following controller

public class GraphMyFollowerCtrl
{
    public String myUserId {get;set;}
    public String currentFocusUserId {get;set;}
    public GraphMyFollowerCtrl()
    {
        myUserId = UserInfo.getUserId();
        currentFocusUserId = ApexPages.currentPage().getParameters().get('sfdc.userId');
        //this is so we get id with last 3 characters
        currentFocusUserId = [select id from user where id = :currentFocusUserId limit 1].id;
    }
}

###3. Create Connected App in Salesforce

###4. Add to Subtab Setup->Create->Apps->Subtab for others-> add "Graph User Connections"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors