• Mark Crooksy
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Mr

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 8
    Replies
This query returns results in record id order:
FIND {word*} IN Name FIELDS RETURNING contact (contact.Id, contact.Salutation, contact.FirstName, contact.LastName, contact.Title, contact.Email);

What I would like to achieve is something like:
FIND {word*} IN Name FIELDS RETURNING contact (contact.Id, contact.Salutation, contact.FirstName, contact.LastName, contact.Title, contact.Email) ORDER BY LastName ASC

Would anyone know if this is possible?
Thanks,

Mark
When sending an email using the Salesforce API via AIR I can successfully send a HTML email like this:

var message:SingleEmailMessage = new SingleEmailMessage();
message.senderDisplayName = "SenderName";
message.replyTo = "sender@name.com";
message.saveAsActivity = true;
message.targetObjectId = recipientID;
message.subject = _emailSubject;
message.htmlBody = _htmlBody;
var messages:Array = [message];
airConnection.sendEmail(messages, new AsyncResponder(

But if I try to set a template ID the sending fails with no obvious error

var message:SingleEmailMessage = new SingleEmailMessage();
message.senderDisplayName = "SenderName";
message.replyTo = "sender@name.com";
message.targetObjectId = recipientID;
message.templateId = "Sample_HTML_Mail";
var messages:Array = [message];
airConnection.sendEmail(messages, new AsyncResponder(

The template does exist and the ID I'm specifying is the Template Unique Name specified in Salesforce.

Would anyone have any ideas why this is happening and how I might fix it?

Thanks,

Mark
Hi,

I seem to be experiencing a delay of around 5-6 minutes between adding a new record and it appearing in the API queries that I'm calling in the AIR app that I'm developing.

If I add a new record, either through the app or through a browser the record is successfully inserted into the database immediately. 

If I then try to find the record using Salesforce in the browser it appears OK. 

If I try to find the record using a search query (within the app) I have to wait around 5-6 minutes before the record can be found.
i.e. I keep performing a query every 30 seconds.
Each time I peform a search query within the app the Salesforce database is successfully queried and results sent back more or less immediately so it's not a connection issue.

Would anyone have any idea what's going on and how to fix this?

Thanks in advance,

Mark
This query returns results in record id order:
FIND {word*} IN Name FIELDS RETURNING contact (contact.Id, contact.Salutation, contact.FirstName, contact.LastName, contact.Title, contact.Email);

What I would like to achieve is something like:
FIND {word*} IN Name FIELDS RETURNING contact (contact.Id, contact.Salutation, contact.FirstName, contact.LastName, contact.Title, contact.Email) ORDER BY LastName ASC

Would anyone know if this is possible?
Thanks,

Mark
When sending an email using the Salesforce API via AIR I can successfully send a HTML email like this:

var message:SingleEmailMessage = new SingleEmailMessage();
message.senderDisplayName = "SenderName";
message.replyTo = "sender@name.com";
message.saveAsActivity = true;
message.targetObjectId = recipientID;
message.subject = _emailSubject;
message.htmlBody = _htmlBody;
var messages:Array = [message];
airConnection.sendEmail(messages, new AsyncResponder(

But if I try to set a template ID the sending fails with no obvious error

var message:SingleEmailMessage = new SingleEmailMessage();
message.senderDisplayName = "SenderName";
message.replyTo = "sender@name.com";
message.targetObjectId = recipientID;
message.templateId = "Sample_HTML_Mail";
var messages:Array = [message];
airConnection.sendEmail(messages, new AsyncResponder(

The template does exist and the ID I'm specifying is the Template Unique Name specified in Salesforce.

Would anyone have any ideas why this is happening and how I might fix it?

Thanks,

Mark