• Dinesh Voonna 17
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hi,
I am getting this Error "String length exceeds maximum: 6000000" while I am converting Body of an attachment to String.
Please find my code and Screen shot.
Please help me, how to fix this error.
 
Code:-
reportAttachment = [SELECT Id, Name, Body, ContentType FROM Attachment WHERE ParentId = :idReport];
    public string getReportBody() {
        return reportAttachment.get(0).Body.toString();
    }
Screen Shot:-

 User-added image
Can anyone answer to this question with an explination.
 
​Universal containers is migrating from a legacy system to the service cloud. The company currently tracks entidements an agreements in its legacy system. The legacy system will be archlved and unavallable after go-live. Agents will need easy access case information for the last one year.
A) Migrate closed cases with milestones and entitlements.
B) Migrate open and closed cases with milestones and entitlements.
C) Migrate open and closed cases without milestones and entitlements.
D) Migrate closed cases to a custom read-only object.

Thanks,
Dinesh
 
Hi,
I am getting this Error "String length exceeds maximum: 6000000" while I am converting Body of an attachment to String.
Please find my code and Screen shot.
Please help me, how to fix this error.
 
Code:-
reportAttachment = [SELECT Id, Name, Body, ContentType FROM Attachment WHERE ParentId = :idReport];
    public string getReportBody() {
        return reportAttachment.get(0).Body.toString();
    }
Screen Shot:-

 User-added image

Hi All,

i want to create an opportunity with description and account field are mandatory. the selected account's contacts object field(Description) need to be update.
Ex. Creating opportunity like JPJN and selected account IBM and Description like JPJN is fortune company.
now we need to retrieve all IBM contacts and then in every contact Description field is there. We need to update that description field value as Description filed value of JPJN(means JPJN is fortune company).

i was tried code and it works successfully. but not Bulkify code.
Please suggest or write code with bulkifying.

trigger DesUpdate on Opportunity (after insert) {
List<Contacts> con = new List<contacts>();
if(trigger.isafter){
        for(opportunity opp : trigger.new){
            if(opp.AccountId != null){
              contact c = [select id,name,accountid,Description from contact where accountid =: opp.AccountId];
              c.Description = opp.Description;
              update c;
            }
        }
        update con;
    }
}
 

Thank you.