• sravan36
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 6
    Replies

Hi All,

We are trying to do Seriolize and Deseriolize for list of attachments using JSON. But we came across some issue while deseriolizing attachments list the error is like Cannot deserialize instance of base64 from START_OBJECT value . Is it possible to Deseriolize list of attachments? Is there any problem with Blob data to deseriolize?

Below is the JSON code snippet.

list<Attachment> Attchmentslist = [select name,id,Body from Attachment where ParentId =: CId];
String JSonserlz = JSON.serialize(Attchmentslist);
list<Attachment> deserializedAttchmts = (list<Attachment>)JSON.deserialize(JsonSerlz, list<Attachment>.class);

Thanks in Advance!!!

Hi I am testing my triggers and getting problems to write test method for triggers as i am new to test methods. Here is my trigger. the problem that i facing is due to three different objects are used in my trigger. Please review this code for trigger that i wrote. Thanks in advance.

Trigger Code:

 

 trigger RiskConvInsert on JunctionRiskRiskSearch__c (after insert)
  {
          List<JunctionRiskSearchConvJunc__c> juncRRSCJ = new List<JunctionRiskSearchConvJunc__c>();
          for(JunctionRiskRiskSearch__c jrsc: Trigger.New)
          {
              List<Risk_Conversation__c> riskConv = [Select Id from Risk_Conversation__c where Risk_Search__c =: jrsc.Risk_Searches__c];
              for(Risk_Conversation__c riskConvRec: riskConv)
              {
                  JunctionRiskSearchConvJunc__c junRec = new JunctionRiskSearchConvJunc__c();
                  junRec.Risk_Conversations__c = riskConvRec.Id;
                  junRec.JunctionRiskSearch__c = jrsc.Id;
                  juncRRSCJ.add(junRec);
              }
              insert juncRRSCJ;
          }
      }

Hello.

 

I am writing a Visualforce controller that creates a custom object.  The controller is for a page in a Sites site.

 

The code compiles ok, but when I run it, I get the error "Field is not writeable".

 

When I go to the Sites user profile, all the fields are visible and the object has all the permissions (read/create/edit/delete/view all/modify all)

 

Any thoughts?

 

Carl

Hi All,

I am trying to retrieve Case attachments along with case records as part of my client requirement. But i am getting an error like Binary fields cannot be selected in join queries. Is there any way to get Case and related attachments within a single query . Below is my query

[SELECT Status,casenumber,(SELECT id,name,Body FROM Attachments)  FROM Case]

Note: "Body" is must in attachments.

Thanks in Advance!!
Sravan.

I seriously need to be able to create a Roll-up field on Accounts for the Assets object, but it doesn't display as an option in the "Summarize Object" drop down when I go to create the field.

 

Can anyone tell me how to get Assets as an object there?

 

Thanks!

i want to dispaly the popup for the field value when i doubleclick on that particular field value............example plz(Using javascript or Vf)

 

 

 

thanks

=============

 

VenkatSforce89