I need to update some cases from command-line. I know that "Internal Comments" is not a field of Cases and that it is connected to the Object Case Comments.

The problem is that I want some people external to the SF platform upserting those cases adding a Case Comment. I have some problem to do it both with the Data Loader and the Workbench. Is it possible to do it? And from command-line?


You cannot do it directly from command-line, but neither from the Data Loader. There is some problem with the ExternalID you have to map.

There a very simple workaround for this:

  1. Create a field on the Case Object named "commentCL" (with api name "commentCL__c) such that the field is Visible from all the profiles but on no page layouts (users in Salesforce don't need to see it).
  2. Create the following very very simple trigger that creates CaseComments related to the updated Cases with the "commentCL" as body: trigger CreazioneCaseComment on Case (after insert, after update) {
    for(Case c : Trigger.new){ if(c.commentoCL__c != ''){
    CaseComment cc = new CaseComment(); cc.commentBody = c.commentoCL__c; cc.ParentId = c.Id; // insert cc;
    } } }

Pay attention: in the .csv you're inserting you have to change the column "Comments" with "commandCL".

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.