8

Is there a way to determine what the aid parameter is for a given event relation record?

We would like to add Invitee's to events and send a custom email notification to them allowing for the standard accept / decline process.

In the email the link includes an aid parameter which I assume is a hash of the event relation record?

Any help would be appreciated either with that or if someone has a better solution to send the invites via apex would be greatly appreciated.

Here si what the link looks like in the event invite sent by default from salesforce

https://cs7.salesforce.com/m/eventResponse.apexp?oid=00DM0000001xX25&aid=zKYSizeIGyMQKW33nan1bHtM1STDTQpGRjvDOv8h10A%3D

  • I've never heard of an aid. As you're obviously aware, with many Events, the AccountID is the WhatID. You might want to look at the EventRelation object in the ObjectReference to see if that might help you. – crmprogdev Apr 2 '15 at 20:58
  • @crmprogdev - See updated question with link posted – Eric Apr 3 '15 at 12:16
  • 1
    I would query that Opp Id the string begins with and then see if the characters that come after &aid=zKYSize don't possibly contain either the 15 or 18 digit AccountID associated with that Opp Id or some other relationship like perhaps the AccountID plus either the User, Event Owner or Contact ID's. – crmprogdev Apr 3 '15 at 16:10
1

A bit late to the game but you can force salesforce to automatically send out the accept / decline email by setting the proper DML options when you insert the event relation (Invitee) records:

Database.DMLOptions dmo = new Database.DMLOptions();
dmo.EmailHeader.triggerUserEmail = true;
dmo.EmailHeader.triggerOtherEmail = true;

Database.insert(new EventRelation(EventId = e.Id, RelationId = user.Id), dmo);
| improve this answer | |
  • Long since moved on, I will take your word for it....Appreciate the answer to the old question – Eric Mar 28 '19 at 22:16

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.