You need to sign in to do that
Don't have an account?
EscTeam
Adding case comments 'as' the self service portal user
Hi,
I'm building a portal (webapp) for our internal users to be able to log cases and then add case comments. The portal serves as a front end to SFDC's cases. There are several reasons we're not using the built-in self service portal.
Our internal users (who will be using this portal) are defined as self service portal contacts in SFDC. I would like to be able to have their ID be the CreatedById when they add a case comment. Currently the only way I can find to add a case comment is through a SFDC User ID that has enough priviledges to do so (a NON-self service portal id such as Administrator).
There are two things I've tried:
1. I've tried binding with an Administrator id and then attempted to use the setCreatedById method on the CaseComment object but it appears that the CreatedBy field is always readonly (which begs the question, why is there an api to set it if it can't be set). My hope is that even bound as an admin I could force the createdbyid to reflect any user I chose to put in the method.
2. I've also tried to first login as the contact and then add the case comment based on that users binding but that gives me the error that a self service portal user isn't authorized to use the API.
Is there a way that I can
- create cases
- log case comments
- attach files
that will reflect the CreatedById of the self service portal user that is doing these actions?
Thanks
Ken
I'm building a portal (webapp) for our internal users to be able to log cases and then add case comments. The portal serves as a front end to SFDC's cases. There are several reasons we're not using the built-in self service portal.
Our internal users (who will be using this portal) are defined as self service portal contacts in SFDC. I would like to be able to have their ID be the CreatedById when they add a case comment. Currently the only way I can find to add a case comment is through a SFDC User ID that has enough priviledges to do so (a NON-self service portal id such as Administrator).
There are two things I've tried:
1. I've tried binding with an Administrator id and then attempted to use the setCreatedById method on the CaseComment object but it appears that the CreatedBy field is always readonly (which begs the question, why is there an api to set it if it can't be set). My hope is that even bound as an admin I could force the createdbyid to reflect any user I chose to put in the method.
2. I've also tried to first login as the contact and then add the case comment based on that users binding but that gives me the error that a self service portal user isn't authorized to use the API.
Is there a way that I can
- create cases
- log case comments
- attach files
that will reflect the CreatedById of the self service portal user that is doing these actions?
Thanks
Ken
I'm trying to set the createdbyid via the api specfiically. Sorry, just wanted to be sure what you are suggesting applies to the api as well.
Thanks
Our loads were via the Data Loader, which also leverages the API. I did a quick search through the online help and found this explanation of the audit feature. Based on the description below, it looks like this should solve your problem.
Approval for turning on Insertable System Audit Fields
It is possible to set system fields through the 7.0 (or higher) API. When migrating data from an external system, the 7.0 API lets customers set the CreatedBy, CreatedDate, LastModifiedByID, LastModifiedDate, and a number of other fields on most objects that were previously read-only for most objects. By setting these fields, records will appear to have been created at their original created time from your old system. For example, you could use the data loader to insert values into these system modifiable audit fields on record creation.
The objects that you can edit these fields on are:
- Account
- Opportunity
- Contact
- Lead
- Case
- Task
- Event
In general, salesforce.com recommends that this feature only be enabled while you are doing data migration. In certain cases (such as routinely copying new data from an external system to salesforce.com) this can be enabled permanently.
Administrators considering enabling this functionality should note that once this feature is turned on, system fields are mutable by System Administrators. This can have an effect on the integrity of your data. Additionally, the fields no longer have the same value in an audit.
If you are interested in turning on this feature, email a request to Salesforce Support with the date you would like this feature enabled until.
Hi, I'm a dev working on migrating our data to another version of SF. I need to find a way to modify the CreatedDate system field in accounts, leads, opps, and contacts. I cannot locate how to enable the feature to override this date field in the SF UI.
Can you point me, please?
Thx,
Paul
Please let me know how others have got around this issue.
Thanks
Brian
Message Edited by BrianO'Halloran on 01-04-2008 06:47 AM