• Nic 121
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 8
    Replies
Hey there,

We have built a (soon to be) public website using customly styled VF pages integrated with the SF backend.

Visitors to the site can view the custom VF pages as a Customer Community Guest user.  Users can also self register and become Customer Community users where they can follow products, certain users, post ideas, etc.  As a result, these objects must be visible to customer users.

Now the problem is, if a user types in www.thecommunitysite.com/003, for example, they will be able to access the SF CMS and see a complete list of contact names.  Our functionality relies on contacts being visible, yet we don't reveal actual user names in our system - just display names.  This list view being accessible destoys the privacy we need to have in place. 

Mitigations:
  • I can use JS to autoredirect users upon arrival.  This is not secure enough alone.
  • I can override the list view with a custom VF page that redirects users.  This is fine, except the user will still be able to access the list if they enter www.thecommunitysite.com/003?nooverride=1.
  • I can create a blank page layout for the page, so that even if they do select a contact, or enter a full contact ID, they will only be able to see the contact name.
The problem is that this is not enough.  The website deals with factors of a financial nature, and thus, users, locations, and products must remain private.  In the planning stage, we have hired architects and so forth from SF for $300p/h, and been told that all of this would be possible.  We have been been given the green light to build the site from SF, only to find everything they have said is not possible - it's been a disaster.  And now towards the end we have found that creating a secure product could be impossible, and this is a real hurdle.

Surely there must be a way of creating a secure VF Community website where the names of products, customers, and campaigns can be secure.

I appreciate any help you guys can give,

Cheers
Hey,

I'm building a site that consists of a customer community which is accessed only through custom visualforce pages.  Here I am trying to build a custom change password page.  I have built the page, set it as the change password page under community management, but I am unsure of how to actually change the password in the backend.

I cannot use setPassword(Id, newPassword) as that gives a 500 error when executed from a site.  I cannot use Site.changePassword(newPassword, verifyNewPassword, oldPassword) as the old password has been forgotten by the user.

I am using the standard forgot password functionality.  By this I mean, the user can select 'forgot password', enter their email, recieve the standard change password email, and then follow the link in the email which takes them to the change password page.  Following this link also appears to log the user in, which would suggest that the user has been given a temporary password.  Perhaps this password can be accessed for use with the changePassword method?  Is there a different method altogether?  How is this implemented in the standard change password page?

Cheers for helping
I was wondering if anyone has had any experience assigning a Topic to a record from the Question object before.

Some background
We are currently buiding a custom site using VisualForce and custom JS to essentially provide our own interface to the standard SF community functionality.

The page I'm currently working on is our Q&A page - specifically the page through which customers can post their own Questions to our customer community.

The Goal
The issue is, we need to be able to filter our questions by topic - not just by data category.  This must also be achieved purely in APEX without any standard apex components on the VF page.

What has been done so far
So far, I have enabled topics for the question object (under Topics for Objects in SF setup).  I have enabled system permissions for the appropriate profiles to create, edit, and assign topics.  Yet I keep running into an apex exception when I try to assign the topic to the question.

Attempt 1: Manually insert a record into the TopicAssignment object
In the code, I create and insert a question (and topic if required).  This works without any problems.  Then I run the following:
TopicAssignment a = new TopicAssignment(TopicId=t.Id, EntityId=q.Id, NetworkId=n.Id);
insert a;
This line will throw the following error:
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Entity ID: id value of incorrect type: 906N00000004EF7IAM: [EntityId]
Attempt 2:  Use the ConnectApi
I then found a new class in the ConnectApi called Topics which does not yet appear to be documented.
ConnectApi.Topics.assignTopic(networkId question.Id, topic.Id);
Using this instead yields the following error:
Failed to assign topic to 906N00000004EFC. Please ensure you have permissions to assign topics for this record.


Both of the above errors still occur if the class has sharing off - e.g.
public without sharing class ClassName {
}



I am hoping to achieve this without having to create a new object as a workaround.

So, I was wondering if anyone else has had this issue?  Has anyone succesfully assigned a topic to a question in pure APEX?  Can anyone help?

Thank you very much,

Nic



 
I was wondering if anyone has had any experience assigning a Topic to a record from the Question object before.

Some background
We are currently buiding a custom site using VisualForce and custom JS to essentially provide our own interface to the standard SF community functionality.

The page I'm currently working on is our Q&A page - specifically the page through which customers can post their own Questions to our customer community.

The Goal
The issue is, we need to be able to filter our questions by topic - not just by data category.  This must also be achieved purely in APEX without any standard apex components on the VF page.

What has been done so far
So far, I have enabled topics for the question object (under Topics for Objects in SF setup).  I have enabled system permissions for the appropriate profiles to create, edit, and assign topics.  Yet I keep running into an apex exception when I try to assign the topic to the question.

Attempt 1: Manually insert a record into the TopicAssignment object
In the code, I create and insert a question (and topic if required).  This works without any problems.  Then I run the following:
TopicAssignment a = new TopicAssignment(TopicId=t.Id, EntityId=q.Id, NetworkId=n.Id);
insert a;
This line will throw the following error:
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Entity ID: id value of incorrect type: 906N00000004EF7IAM: [EntityId]
Attempt 2:  Use the ConnectApi
I then found a new class in the ConnectApi called Topics which does not yet appear to be documented.
ConnectApi.Topics.assignTopic(networkId question.Id, topic.Id);
Using this instead yields the following error:
Failed to assign topic to 906N00000004EFC. Please ensure you have permissions to assign topics for this record.


Both of the above errors still occur if the class has sharing off - e.g.
public without sharing class ClassName {
}



I am hoping to achieve this without having to create a new object as a workaround.

So, I was wondering if anyone else has had this issue?  Has anyone succesfully assigned a topic to a question in pure APEX?  Can anyone help?

Thank you very much,

Nic



 
Hey,

I'm building a site that consists of a customer community which is accessed only through custom visualforce pages.  Here I am trying to build a custom change password page.  I have built the page, set it as the change password page under community management, but I am unsure of how to actually change the password in the backend.

I cannot use setPassword(Id, newPassword) as that gives a 500 error when executed from a site.  I cannot use Site.changePassword(newPassword, verifyNewPassword, oldPassword) as the old password has been forgotten by the user.

I am using the standard forgot password functionality.  By this I mean, the user can select 'forgot password', enter their email, recieve the standard change password email, and then follow the link in the email which takes them to the change password page.  Following this link also appears to log the user in, which would suggest that the user has been given a temporary password.  Perhaps this password can be accessed for use with the changePassword method?  Is there a different method altogether?  How is this implemented in the standard change password page?

Cheers for helping
I was wondering if anyone has had any experience assigning a Topic to a record from the Question object before.

Some background
We are currently buiding a custom site using VisualForce and custom JS to essentially provide our own interface to the standard SF community functionality.

The page I'm currently working on is our Q&A page - specifically the page through which customers can post their own Questions to our customer community.

The Goal
The issue is, we need to be able to filter our questions by topic - not just by data category.  This must also be achieved purely in APEX without any standard apex components on the VF page.

What has been done so far
So far, I have enabled topics for the question object (under Topics for Objects in SF setup).  I have enabled system permissions for the appropriate profiles to create, edit, and assign topics.  Yet I keep running into an apex exception when I try to assign the topic to the question.

Attempt 1: Manually insert a record into the TopicAssignment object
In the code, I create and insert a question (and topic if required).  This works without any problems.  Then I run the following:
TopicAssignment a = new TopicAssignment(TopicId=t.Id, EntityId=q.Id, NetworkId=n.Id);
insert a;
This line will throw the following error:
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Entity ID: id value of incorrect type: 906N00000004EF7IAM: [EntityId]
Attempt 2:  Use the ConnectApi
I then found a new class in the ConnectApi called Topics which does not yet appear to be documented.
ConnectApi.Topics.assignTopic(networkId question.Id, topic.Id);
Using this instead yields the following error:
Failed to assign topic to 906N00000004EFC. Please ensure you have permissions to assign topics for this record.


Both of the above errors still occur if the class has sharing off - e.g.
public without sharing class ClassName {
}



I am hoping to achieve this without having to create a new object as a workaround.

So, I was wondering if anyone else has had this issue?  Has anyone succesfully assigned a topic to a question in pure APEX?  Can anyone help?

Thank you very much,

Nic



 
I have a VisualForce page.  When it completes, I want to redirect the user to a new object.  In desktop, I'd just use "/" and the record ID.

When using one/one.app, that doesn't appear to work correctly.  I end up back on the record from where the VF page launched.

Looking at a record in SF1 using Chrome, I see the URL --

https://hmhco--sb5.cs15.my.salesforce.com/one/one.app#/sObject/006e0000007sgOaAAI/view?t=1420466929144

I could construct that URL except I don't know what the "t" parameter is.  The 006e0000007sgOaAAI is the record ID.  But if I don't put on the "t" parameter, I just get the recent list, not the record.  I have no idea what the 1420466929144 is on the "t" parameter.  I'm thinking if I knew where that came from, maybe I could construct that URL.

Any ideas?

I submitted a case to have this feature enabled. They have enabled the feature.  Prior to the feature being enabled the is-modified field was null. 

 

Request: https://na15.salesforce.com/services/data/v27.0/chatter/feeds/news/me?sort=CreatedDateDesc

 

Response: {"feedItemsUrl":"/services/data/v27.0/chatter/feeds/news/005i0000000qJX7AAM/feed-items","isModifiedUrl":"/services/data/v27.0/chatter/feeds/news/005i0000000qJX7AAM/is-modified?since=2%3A1368707238000"}

 

Request:

https://na15.salesforce.com/services/data/v27.0/chatter/feeds/news/005i0000000qJX7AAM/is-modified?si...

 

Response: 

[

  {

    "message" : "Invalid feed modified token: 2%3A1368707238000",

    "errorCode" : "INVALID_FIELD"

  }

]