• desmoquattro
  • NEWBIE
  • 39 Points
  • Member since 2010
  • Collaboration Architect
  • Salesforce.com


  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 25
    Replies
I am implementing a pixel level customized Salesforce Community. To be able to have the forms, divs and fields we want, I am using a Visualforce + Tabs template and writing Visualforce code for all the pages and forms I need.

Now I'm starting to implement pages and forms to list questions and answers, post questions, vote for questions and best replies, etc. To be able to display all the fields and categories the way we want, I'm gonna have to query Salesforce object using SOQL. What is not clear to me is what objects to use. From what I've read in forums and Salesforce Communities documentation, the right way to do it is to work with Chatter Answer objects (Question, Reply, QuestionDataCategorySelection), etc. Another option I see for that is using API objects like Topic, TopicAssignment, FeedItem and FeedComment.

I have two questions:
1- What is the right approach to implement a question form and list in a Salesforce Community from the scratch? Although I feel like the right way to do it is using Chatter Answers objects, I tried a Napili template community before and the questions and topics I created were saved in FeedItem, FeedComment, Topic and TopicAssignment objects.
2- As I can use only one CategoryGroup per Community (zone), if I use Question, Reply and QuestionDataCategoryObjects, am I restricted to only one category per question?
If you're using #SalesforceCMS and Experience Cloud, you won't want to miss these new open-source components for your portal, site, forum, or B2B Commerce Storefront!

Get the components for your Salesforce instance here: https://lnkd.in/dTJRJxf

Get the source code here: https://lnkd.in/d5F5_Rc
 
Hi folks. Trying to share something on Code Share per these instructions (https://developer.salesforce.com/page/Creating_a_Code_Share_Project?state=id), but despite being logged in I still don't get an option to post a new project. What gives?
Hey folks! Anyone who has worked with Salesforce Community Cloud has likely seen that there are several tiers of licenses (for both portals and community cloud) that can be used to create community users from a Contact or Person Account record. Some of those licenses have roles, and others do not. The breakdown of licenses looks a bit like this:
User-added image
Role-based licenses use traditional Salesforce sharing rules: role-based sharing rules, criteria-based sharing rules, and manual/Apex sharing to get users access to records. But role-based licenses can only scale so far, so for communities with large numbers of users (several hundred thousand or more), there are High Volume licenses that use Sharing Sets (http://help.salesforce.com/apex/HTViewHelpDoc?id=customer_portal_sharing_set.htm&language=en_US) instead of roles to grant access to records. These licenses scale to even greater heights, into the millions of users.

But if you've ever tried to take an existing user with, say, a high volume license and tried to move them to a role-based license (because they may need dashboards or delegated administration, for example) you may have noticed that you cannot simply edit the user and change the license:
User-added image
The underlying licensing system prevents you from doing this because the two licenses are so fundamentally different. To move someone from a high volume license to a role-based license, you need to disable and re-create the user from the contact record. Here's what doing that manually looks like:
User-added image
NOTE: Doing this will simply create a new user. It will not move record ownership, nor will it migrate chatter posts to this new user. It simply recreates the user under the Contact (or Person Account) record.

Scaling The Migration
Doing this for a few users usually isn't too difficult, but when there are many users, some form of automation would be useful. I realized the other day that this might be painful for customers, so I thought I'd try my hand at writing an Apex utility class that does this in an automated manner. The results are downloadable in the Success Community here:
UserProvisioningUtils (Zip) (https://success.salesforce.com/06930000005LVBL)

This class is sample code only, and is not guaranteed to work in all environments, but I've successfully used it to disable and re-create an individual user on a certain license type.

Using the Code
I've tried to make this code easy to use. You basically need the Salesforce Id of the existing portal or community user (who should be on a high volume license), as well as the Salesforce Ids of the new role and profiles you'd like the new user to have. 
String existingUserId = '00515000005bjHr';
String newProfileId = '00e150000019PBD';
String newRoleId = '00E15000001BINl';
UserProvisioningUtils utils = new UserProvisioningUtils(existingUserId, newProfileId, newRoleId);
That's it...simply running this code (as part of another Apex class or in the execute anonymous window of the Developer Console) should do the following:
  • Disable the existing user.
  • Copy the appropriate values for user Id, nickname, etc
  • Create the new community user on the designated profile and role. 
It would seem like a fairly simple thing to do, but there were some interesting nuances around the number of DML operations one can do in a single Apex statement. For those inspecting the code, you'll see the use of the @future annotation to get around that.

Hope this helps folks!











 

Hey folks. I'm writing a Visualforce page that will act as a custom console component in the Service Cloud Console, and I'm seeing some odd behavior when using apex:outputLink. Net-net: the outputLink tag intelligently renders differently when in the console vs outside the console (fantastic) but for some reason, the Javascript function it calls when operating *in* the console cannot be found...even if I import the Console Integration Toolkit.

 

Here's the VF page in question:

<apex:page standardController="Case" extensions="MyExt" showHeader="false" sidebar="false">
<script src="/support/console/28.0/integration.js" type="text/javascript"></script>
 <apex:pageBlock rendered="{!initiated}" title="Users">
  <apex:pageBlockTable value="{!portalUsers}" var="user">
   <apex:column title="Username">
    <apex:outputLink value="/{!user.Id}">{!user.Username}</apex:outputLink>
   </apex:column>
   <apex:column title="Name" value="{!user.Name}"/>
  </apex:pageBlockTable>
 </apex:pageBlock>
</apex:page>

 

Even when including the console toolkit js file (using both manual <script> tags and <apex:includeScript>) I get the following error when clicking on the rendered link in the console:

Timestamp: 6/23/13 6:31:29 PM
Error: ReferenceError: srcUp is not defined
Source File: javascript&colon;srcUp('%2F005i0000000poJdAAI%3Fisdtp%3Dvw');
Line: 1

 Any thoughts on what I may be missing?

 

 

 

 

 

Hi everyone. I'm using the standard page layout (e.g. no VisualForce) with Contact records. I'm tracking email and a custom field for an external application's username. When someone creates a new Contact record and enters the contact's email address, I'd like that action (e.g. Javascript OnBlur()) to cause the username field to be pre-populated with the email address. I know how to do this with Javascript, but I'm wondering where the best place to put it is?

 

On the face of it, I thought I might write a VisualForce page containing the Javascript and add it to the standard layout in a section. But that would lead to wasted space on the page.

 

How have people handled this before? Are there any best practices?

 

Thanks!

Hey folks! Anyone who has worked with Salesforce Community Cloud has likely seen that there are several tiers of licenses (for both portals and community cloud) that can be used to create community users from a Contact or Person Account record. Some of those licenses have roles, and others do not. The breakdown of licenses looks a bit like this:
User-added image
Role-based licenses use traditional Salesforce sharing rules: role-based sharing rules, criteria-based sharing rules, and manual/Apex sharing to get users access to records. But role-based licenses can only scale so far, so for communities with large numbers of users (several hundred thousand or more), there are High Volume licenses that use Sharing Sets (http://help.salesforce.com/apex/HTViewHelpDoc?id=customer_portal_sharing_set.htm&language=en_US) instead of roles to grant access to records. These licenses scale to even greater heights, into the millions of users.

But if you've ever tried to take an existing user with, say, a high volume license and tried to move them to a role-based license (because they may need dashboards or delegated administration, for example) you may have noticed that you cannot simply edit the user and change the license:
User-added image
The underlying licensing system prevents you from doing this because the two licenses are so fundamentally different. To move someone from a high volume license to a role-based license, you need to disable and re-create the user from the contact record. Here's what doing that manually looks like:
User-added image
NOTE: Doing this will simply create a new user. It will not move record ownership, nor will it migrate chatter posts to this new user. It simply recreates the user under the Contact (or Person Account) record.

Scaling The Migration
Doing this for a few users usually isn't too difficult, but when there are many users, some form of automation would be useful. I realized the other day that this might be painful for customers, so I thought I'd try my hand at writing an Apex utility class that does this in an automated manner. The results are downloadable in the Success Community here:
UserProvisioningUtils (Zip) (https://success.salesforce.com/06930000005LVBL)

This class is sample code only, and is not guaranteed to work in all environments, but I've successfully used it to disable and re-create an individual user on a certain license type.

Using the Code
I've tried to make this code easy to use. You basically need the Salesforce Id of the existing portal or community user (who should be on a high volume license), as well as the Salesforce Ids of the new role and profiles you'd like the new user to have. 
String existingUserId = '00515000005bjHr';
String newProfileId = '00e150000019PBD';
String newRoleId = '00E15000001BINl';
UserProvisioningUtils utils = new UserProvisioningUtils(existingUserId, newProfileId, newRoleId);
That's it...simply running this code (as part of another Apex class or in the execute anonymous window of the Developer Console) should do the following:
  • Disable the existing user.
  • Copy the appropriate values for user Id, nickname, etc
  • Create the new community user on the designated profile and role. 
It would seem like a fairly simple thing to do, but there were some interesting nuances around the number of DML operations one can do in a single Apex statement. For those inspecting the code, you'll see the use of the @future annotation to get around that.

Hope this helps folks!











 
Hi, 
I am working on creating a visual workflow, which is launched via button on oppty record.  When a user clicks the button, a chatter group is created with all deal team members automatically become chatter group members.  Until this step it's working just fine. But my boss asked me to add Oppty description in that pop up screen along with the Chatter group and Group members.  
My question is my flow is based on Oppty team members, how do i pull in one field (oppty descrption) from opportunity object.  I am really stuck.  

Any help is appreciated.  
I am implementing a pixel level customized Salesforce Community. To be able to have the forms, divs and fields we want, I am using a Visualforce + Tabs template and writing Visualforce code for all the pages and forms I need.

Now I'm starting to implement pages and forms to list questions and answers, post questions, vote for questions and best replies, etc. To be able to display all the fields and categories the way we want, I'm gonna have to query Salesforce object using SOQL. What is not clear to me is what objects to use. From what I've read in forums and Salesforce Communities documentation, the right way to do it is to work with Chatter Answer objects (Question, Reply, QuestionDataCategorySelection), etc. Another option I see for that is using API objects like Topic, TopicAssignment, FeedItem and FeedComment.

I have two questions:
1- What is the right approach to implement a question form and list in a Salesforce Community from the scratch? Although I feel like the right way to do it is using Chatter Answers objects, I tried a Napili template community before and the questions and topics I created were saved in FeedItem, FeedComment, Topic and TopicAssignment objects.
2- As I can use only one CategoryGroup per Community (zone), if I use Question, Reply and QuestionDataCategoryObjects, am I restricted to only one category per question?
I created a community user in my Developer Org. Now I am trying to login using python. I am getting an error. If I try the same code with a Partner Portal User, then I am able to login. I have the api enabled on the Customer Community permission set.

Here is my code:
 
from simple_salesforce import Salesforce
sf = Salesforce(username='rose.gonzalez@edge.com.space', password='*****', security_token='', sandbox=False)

What other permissions do I need?

Thanks,
Abhijit
Hi,

I build a lightning App for customer support and added this in SF1 mobile app. It is accessible by the internal user but when I logged in using community users it is not showing the Lighting app and error "URL not found" coming up. Any way to add this app for community users?

Thanks,
Rajan
 
Hi,

I'm currenty trying to master this use case:
Lets say we have an object and on the page we have the option to delete this object. Now the delete button gets clicked and a bootstrap modal pops up asking if this object really should be deleted. By clicking yes the object gets deleted.

My problem is to remember this clicked object so I know which one has to be deleted by clicking the modal yes button. 
So in a nutshell ... how can I pass the object id to a component parameter when the delete button gets clicked?

Thank you!
Does anyone know what would be the best way to go as develop a page for a customer portal. Wheather to go with Sites.com or Force.com sites or Customer portal. I want to develop a client page in which allows the client to access a limited amount of information for example their client name, job orders etc.

Hello All,

Please help me out with suggesting that how i need to proceed with Apex Trigger for creating new task on successful creation of new Account.

 

Regards,

RudrAbhishek

Hello All,

Anyone has ideas around how can i create an opportunity automatically on web to Lead OR can i use Lead as an Opportunity to attach Line Items and price list...I basically want users to book a table in Restaurant from website form page and on submit an opportunity will be created and a table No field  from the Table object will be auto populated in the opportunity..I can then add the menu selection to the Opportunity.

Many Thanks in advance 
Hi All ,

I have test class where I am providing all the required data when I run the test class , my soql query in class is fetching the data from database instead of test class 

How to avoid this ? and how to get my quey only test class data 

Hey folks. I'm writing a Visualforce page that will act as a custom console component in the Service Cloud Console, and I'm seeing some odd behavior when using apex:outputLink. Net-net: the outputLink tag intelligently renders differently when in the console vs outside the console (fantastic) but for some reason, the Javascript function it calls when operating *in* the console cannot be found...even if I import the Console Integration Toolkit.

 

Here's the VF page in question:

<apex:page standardController="Case" extensions="MyExt" showHeader="false" sidebar="false">
<script src="/support/console/28.0/integration.js" type="text/javascript"></script>
 <apex:pageBlock rendered="{!initiated}" title="Users">
  <apex:pageBlockTable value="{!portalUsers}" var="user">
   <apex:column title="Username">
    <apex:outputLink value="/{!user.Id}">{!user.Username}</apex:outputLink>
   </apex:column>
   <apex:column title="Name" value="{!user.Name}"/>
  </apex:pageBlockTable>
 </apex:pageBlock>
</apex:page>

 

Even when including the console toolkit js file (using both manual <script> tags and <apex:includeScript>) I get the following error when clicking on the rendered link in the console:

Timestamp: 6/23/13 6:31:29 PM
Error: ReferenceError: srcUp is not defined
Source File: javascript&colon;srcUp('%2F005i0000000poJdAAI%3Fisdtp%3Dvw');
Line: 1

 Any thoughts on what I may be missing?

 

 

 

 

 

I'm hoping people can think me through a bit of a pickle I've gotten myself into. I have a custom controller for a relatively non-standard Visualforce page that simply iterates through HTTP POST or GET parameters and looks for specific patterns. In a nutshell, the action in question looks like this:

      public PageReference reconcile() {
            // get request parameters
            Map<String, String> parameters = ApexPages.currentPage().getParameters();
            for (String pName: parameters.keySet()) {
                    String pVal = parameters.get(pName);
                    System.debug('PARAM NAME: ' + pName + ' PARAM VAL:' + pVal);
                    
                    // parse the Assessment ID out of the parameter name
                    if (pName.contains('reconcile')) {
                        String assesmentId = pName.replace('reconcile', '');
                        System.debug('RECONCILING ASSESSMENT ID: ' + assesmentId);
                        
// ...work gets done here
                        }                                    
                    }
            }
}

 

So rather than storing state in the controller, I work iteratively. But now I'm having trouble achieving code coverage. My unit test looks something like this:

 

 

       PageRef pageRef = Page.ReconcilePayments; // this is the page my controller is attached to
       Test.setCurrentPage(pageRef);
       ReconcilePaymentController recController = new ReconcilePaymentController();
       System.assert(recController != null);

Now, I can call the reconcile() action directly, but in order to achieve test coverage (and, more importantly,  a good meaningful test) I need to include the parameters and I don't see a way to do that in the pageRef methods...pageRef seems to represent the result of invoking a page, and does not include the request.

 

How would you approach getting this unit test done?

 

 

 

It has been 8 days since we adjusted the CNAME record and our domain is still not resolving. We keep getting the error "Salesforce.com can't validate the domain. The CNAME record may still be processing (which can take up to 24 hours), or the domain may not belong to you. Ensure the domain name www.example.com uses www.example.comlive.siteforce.com as its CNAME target and try again later."

 

Our IT department has the CNAME set up properly in the DNS.

 

Any suggestions? I have a case opened already but it's taking too long.