• DocMagic
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 0
    Replies
I am attempting to create a custom button that passes in an array of solutions to a web webservice.  The code that I am using is:

{!REQUIRESCRIPT ("/soap/ajax/28.0/connection.js")}

var records = {!GETRECORDIDS( $ObjectType.Solution )};

if (records[0] == null) {
  alert("Please select at least one row.");
} else {
  alert("You have made a selection");
}

Unfortunately, with this code, when I click on the custom related list button (via the solution list in a case), I am always prompted that no rows are selected (even when checkboxes are checked). I have tested the three major browsers, and via multiple users, to no avail. Is there something that I am missing?

Any help is much appreciated! Thank you!!

When using auto-responders for email-to-case, the outbound emails are attached to the case. I'd like to perform the same action, when I am sending outbound emails via my own inbound email handler.

In my specific usage case (my custom inbound email handler), I am setting the 'targetObjectId' to a dummy contact (as a contact is required for emailing templates) and the 'WhatId' to the case id. There is no record of my email being sent out (though they are being sent, as can be seen when testing 'live').

I do have experience with creating an EmailMessage object and attaching it to a case (via parentId). I would think that an outbound message would 'magically' attach itself to a given object, but there is no method for specifying it as such.

Any help would be appreciated. Thanks!

Is creating 'batches' using the SOAP bulk API only available while using the Partner WSDL?    We've currently using the Enterprise WDSL but but we need to consider using 'batches' to reduce the API calls being made to salesforce.

 

Thanks

 

Jim

I'm able to successfully upload data as an attachment to salesforce.  These are all jpg images.  However, if I do not provide the 'ContentType', when viewing the attachment in a browser, I see the base64 encoded data.  If I use the 'image/jpg' tag, the image is broken and nothing displayed.

 

To confirm the base64 encoded data is valid, I copy that out of the brower and go to an independent decoder website and it creates the jpg correctly.

 

What am I not setting in the SOAP?

 

This is Delphi.

 

Jim

 

 

TheAttachment := Attachment.Create;
TheAttachment.ParentId := aCaseID; //required
TheAttachment.ContentType := 'image/jpg';
TheAttachment.IsPrivate := False;
FileData := ArrOfByte(aDataStream.GetAsString); //aDataStream is already base64 encoded.
TheAttachment.Body := FileData;
TheAttachment.Description := aName;
TheAttachment.Name_ := aName; //required
SetLength(AttachmentArray,1);
AttachmentArray[0] := TheAttachment;
cr := fBinding.create( AttachmentArray );
if not cr[0].success then
  ShowMessage(aName + ' not saved to SalesForce CaseID: ' + aCaseID);