Find email with DataView filter

Why is this so hard?
in SQL I simply state, Email = @Email, and everything works fine when I send it a value such as [email protected]
So why can't I get something to work with the statement?
New DataView(Contacts, "Email = " & strEmail,"", DataViewRowState.CurrentRows) returns errors with the . and the @ and all this other stuff.  Is there any sane reason why I can't get a verbatim search?
Please help, I'm going crazy over this.
jvj

You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. Yvan Koenig has written an AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip.

Similar Messages

  • Use smart mailbox to find email with specific text in attached pdf

    Does anyone known if a smart mailbox can be created to find emails with specific text within a pdf attached document. I know that spotlight can do this and it works fine but it would suite me better to be able to do this in mail.

    After some digging, I found that Spotlight returns the pdf attachment (found within the library/mail/download folder), but not the actual email. The only time it returns the email is if the search text or numerics are coincidentally within the written contents or subject line.
    Yes, i have tried setting up smart mailbox search criteria using the entire message contents but this does not find emails where the text exist within the pdf.
    I've checked spotlight pref.'s and all categories are checked off.
    Essentally, i need the smartbox search criteria to return results where the search text is found within the pdf attachment if possible. If this is not possible, i'll continue using spotlight searches outside of mail.
    I appreciate any help you can offer.

  • New computer trying to redownload program student edition cant find email with serial number

    Here is the issue old computer broke so got it replaced. Now Im having issues locating the email with the serial number to redownload cs5 student edition. Is there a way to get a new one issued? how would I go about getting this working?
    thanks

    You should have an account with Adobe and in that account there should be a record of your programs and the serial numbers used to activate them.
    The student edition should not be any different from any other, so you should just need to download the trial version of the software and then activate it using your serial number.
    You can download the trial version of the software using the link below and then use your current serial number to activate it.
    Be sure to follow the steps outlined in the Note: Very Important Instructions section on the download pages at this site or else the download will not work properly.
    CS5: http://prodesigntools.com/all-adobe-cs5-direct-download-links.html
    If you should have any problems with the serial number or activation, you need to contact Adobe Support either by chat or via phone.
    Here are some links to help make contact:
    http://www.adobe.com/support/chat/ivrchat.html
    http://www.adobe.com/support/download-install/supportinfo/

  • Can't find email with serial number for Pages, how can I find the number?

    Purchased Pages on 9th September following iWork09 trial, however I must have trashed the email containing serial number
    in error. Does anyone know how to find the serial number. Thanks in advance for any reply...

    You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. Yvan Koenig has written an AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip.

  • I can isolate a bookmark with the filter, but how can I "find" a bookmark in the hierarchy of the ShowAllBookmarks window?

    I want to find a bookmark in its location in the hierarchy of bookmarks, but all I can do with the filter is isolate a bookmark[s]; either using the filter of the bookmarks sidebar, or in the ShowAllBookmarks window. For instance, I know I have a certain bookmark, but I want to move it into a new "folder" and rename it, perhaps; for this I need to be able to *see* it in the hierarchy, as in the Finder of a Mac, when the filter turns up a file, then "Show Original" of "Open Enclosing Folder."

    I'm just trying to understand how to use these add-ons, having just added them on, to borrow a phrase, but have now found a comment re Go Parent Folder, "This extension does not seem to work in MacOS X. " <http://forums.mozillazine.org/viewtopic.php?t=659690>. Sadly [altho I really like Snow Leopard] I'm running OS X.6.7. Nonetheless a contextual menu mousing down on a "found" bookmark indeed does give the working option of "Go to Parent Folder" from the found list of the ShowAllBookmarks window, *or* the that of the sidebar window. Bravo!!
    Just a question again, how would I have learned this had I not bothered the entire forum, and taken cor-el's time/effort?

  • I work for a retailer who sends out e-receipts as pdf attachements.  When the email arrives on any apple product, i see the email with the paperclip icon showing that there is an attachment but i cannot ever see or find the actual attachment.  Any ideas?

    i work for a retailer who sends out e-receipts as pdf attachements.  When the email arrives on any apple product, i see the email with the paperclip icon showing that there is an attachment but i cannot ever see or find the actual attachment.  Any ideas?

    i have scrolled left, right, up and down on iphone4, iphone5 and ipad and the attachment simply does not exist.  It has to be something with the apple mail client setup because for any mail client, if they go to the webemail thru safari, the attachment is there and it can be viewed without issue.
    I know there are plenty of people out there with this issue with the mail clients set up that you access thru the email icon on the iphone and ipad but i cannot find anyone with a resolution.  I cannot find any settings in the mail client setup that has anything to do with attachments or for what attachments can or cannot be read or seen.
    Hopefully someone out there has figured something out because this is an odd one.

  • System cannot find the path specified when sending emails with attachments

    I've had an on going issue for some time on one of my clients whereby users will intermittently get this error "The System cannot find the path specified." when they try to send an email with an attachment.
    The issue seems to arise generally (though reportedly not only when) when someone creates an email and attaches a file but leaves it for some time before finishing and sending.
    The staff run in a Windows 2008 R2 full Terminal Server desktop environment on Office 2010 (32-bit 14.0.7140.5002) and several staff have reported the same issue.
    I have been able to replicate the issue in their environment by creating an email and leaving it for some time.
    After a fair bit of scouting around I found that if I monitor the temp directory that the attachments get placed into (content.outlook under Temporary Internet Files on user profile) and found that the directory with the attachments would disappear after
    a period of time which would then cause the error where obviously Outlook could not find the file that had now gone.
    I don't know of any Outlook settings that would cause this and the issue isn't related to temporary Internet files filling up as I've recreated the error on a user account where there is nothing else stored in the Temporary Internet Files.
    To work around the issue I have changed the reg file that tells Outlook where to place these files (HKCU/Sofware/Microsoft/office/14.0/outlook/security - OutlookSecureTempFolder) to a location in the users home drive.
    This appears to resolve the problem however I am noticing 1 issue with this.  Unlike the temp folder which gets purged after a file is no longer required, the location I've changed it to does not clear out old files.
    While it shouldn't be too difficult to add a script that can clear the files at log off it would be good to see if anyone may know what the cause of the problem in the first place is.  I would rather it work as it should than have to bodge around changing
    the folder and scripting file deletes.
    Does anyone know of what maybe causing the attachments and content.outlook folder to disappear?
    thanks

    Do you have any redirected folder in your environment? Is the original Temporary Internet Files folder stored on a server?
    Basically, the attachments remain in the Outlook Secure Temporary File folder if we exit Microsoft Outlook while email attachments are open. See:
    http://support.microsoft.com/kb/817878
    Flynn

  • How to find by email with JPA?

    How to find by email with JPA? My this but not worked
    public WnUser findUser(WnUser email) {
    return (WnUser) em.createQuery
    ("SELECT object(u.email) FROM entities.WnUser u WHERE u.email =:email").setParameter("email", email.getEmail()).getSingleResult();
    javax.ejb.EJBException: javax.persistence.NoResultException: No entity found for query
    12:23:44,843 ERROR [STDERR]      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
    12:23:44,843 ERROR [STDERR]      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)

    First off, you are not really doing:
    GWAccount->GWAddressBook->GWAddressBookEntrie->
    get_EmailAddress,get_DisplayName()
    are you?
    If you enter the full line, it will read in all
    of the entries each time it is called.
    You should break each part into an object:
    gwAccount
    gwBook
    gwEntries
    I'm not sure what you are doing.
    Are you trying to compose an email?
    If so, why are you not using Recipients.Resolve()?
    Are you trying to get the recipients from an email?
    Preston
    >>> On Friday, April 16, 2010 at 1:26 AM,
    hillp<[email protected]>
    wrote:
    > as title,
    > i can get the display name from the to, cc, bc edit box,
    > then i need to get the email address,
    > current i use object API to query:
    >
    GWAccount‑>GWAddressBook‑>GWAddressBookEntrie >get_EmailAddress,get_Di
    splayName
    > but i find it is really slow when there are many contacts, example
    > 10000.
    >
    > so is there any other effective method to get the email address?

  • New email with attachment action disappeared from Finder

    Does anybody know what might have happened? I've been using this action for some time, and after upgrading to Mountain Lion it stopped working. Then after some time I discovered that the action is no longer available in the Finder context menu.
    Note: I'm using Bitcasa, and the Bitcasa client added some actions of its own under an option called "services".The action "new email with attachment appeared under "services" as well.
    I don't think it's a Bitcasa problem as it's been working just fine for several months now. It crapped out after upgrading to ML.

    Nevermind, figured it out elsewhere on the suport forum.
    https://discussions.apple.com/thread/4139642?start=15&tstart=0
    Aruk
    Do this from in the mail app. Change it to Mail 6.0.
    "Hey, mine seems to be working now, what i did; i change the email preferences>general the first options reads: "default email reader" mine used to read "google chrome", after i changed the preferences the "share" button now shows all the options including "email". hope this helps in some way:D"

  • I get a weekly email with a PDF attachment and when I open it it's to large to print. To date I'm not able to find a way to shrink or adjust the size. The doc was created on M/S Office-excell

    I get a weekly email with a PDF attachment and when I open it it's to large to print and I know of no way to shrink or resize the doc. It's created in M/S excel. Can anymore assist....TX

    From: Test Screen Name [email protected]
    Sent: Sunday, August 04, 2013 11:32 AM
    To: gunner0490
    Subject: I'm not able to open PDF files in Adobe Reader XI.
    Re: I'm not able to open PDF files in Adobe Reader XI.
    created by Test Screen Name <http://forums.adobe.com/people/TestScreenName>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/5565198#5565198

  • Camera filters, exporting with the filter..

    I just bought my first iPhone about 2 weeks ago, i like it, but today, I took some photos with the built-in filters and i use dropbox to atutomatically save the photos, BUT my issue is, when exported to dropbox. The photo is not in black/white it is in the normal setting.. I am not a computer software wizard(photoshop or other) so I cannot just apply the filters that I want, if I want to use them outside of the iPhone
    Is there a way for the filters to be saved to the image file in some way?.. please help, this is quite annoying because I like the filters!
    I hope some apply genious will assist me!
    Lots of xo's to the person who gives me the answer.. no workarounds, or emailing photos and such, i just want it to save the file WITH the filter, if this is not possible, then I urge apple to make it an option in their next update because, why else have filters? :S
    Thaaaank you!
    - Sway
    Please please please please please make it possible!!!

    Hello,
    I am sorry to hear this has occurred  to you, I am very glad to hear you are enjoying your new iPhone. As for Dropbox, there could be a feature built in, but not being a Dropbox user I am not 100% sure? Try to check for an in app feature, if not I would plug your phone into your computer and log into iTunes, go onto the tab that says iPhone or similar and look for 'on this iphone' then try to find and drag the image to your computer, then use Dropbox from there. Hope that helped.
    Thanks,
    Dan

  • IPad continually only receives emails WITH attachments

    I have been experiencing something really bizarre lately with my iPad (3rd generation). Every now and then, the email seems to get 'stuck' and will ONLY fetch emails from the server that have attachments. It's really quite strange. If I check the email via the provider's (Comcast's) website, I can see many new emails that have arrived, but unless they have an attachment, they will not get pulled down from the server to my iPad.
    Things I have done:
    - Completely removed my email accounts and started over
    - Verified the settings on the other clients I use to ensure that it is not set to delete messages on the server.
    I have read previous solutions that suggested the problem may be related to some kind of 'corrupt' email on the server which is preventing other messages from being retrieved. The recommended solution there was to take all of the emails that were currently on the server and 'quarantine' them by putting them in a different folder. That seemed to work for a while, but it keeps recurring.
    I don't actually think this is a problem with the iPad, as it is reproducable on my Kindle Fire, my Android tablet, and my iPod Touch, so I feel pretty sure the problem lies on the mail server. But it is only ONE account. I have approximately 7 Comcast email accounts and it is only that one particular account that is experiencing the issue. So, yeah, you may be asking yourself why am I posting this here if I'm pretty sure it's not the iPad that's the problem... well, you guys are pretty smart, and perhaps someone has run into this kind of issue before with their provider. I know that calling Comcast is absolutely useless, and they'll just tell me to use their app, but that's really frustrating and inconvenient.
    Any suggestions?

    Found what I was doing wrong.
    First, finditems retrieves items and not just emails, so I had to switch the schema to ItemSchema.  This one has a HasAttachments property on it, that when set to true will cause the filter to find only items that have one or more attachments. 
    Setting it to false finds items that have no attachments.
    SearchFilter.IsEqualTo sfEmailsWithAttachments = new SearchFilter.IsEqualTo(ItemSchema.HasAttachments, true);
    Also, found that finditem is designed to only return summary information that can then be used to decide whether to retrive the full item in a getitem command.  This was done by Microsoft to expidite searches on Exchange.  So, even though finditem
    will find only emails with attachements, the returned items may not neccesarily have things like counts for the attachments.  You would have to retrieve the whole email with getItem using the retrieved item's ID to do manipulations on any lower level
    fields.

  • Deleting emails with a specific subject from a single user mailbox

    we are exchange 2007 on SP1. we do not have an edge server, only a hub server.
    A user mailbox was flooded with 11000 "Undeliverable:" emails in the last 2 days, the source being "DSA". I am still finding out why this has happened. As for now, I have set up a rule to silently drop all emails with this specific subject.
    now the user wanted our team to delete all of these 11000 emails from his mailbox.
    we gave the appropriate permission to the users mailbox by running the command
    Get-Mailbox -Identity “[email protected]” | Add-MailboxPermission -User [email protected] -AccessRights FullAccess -InheritanceType all
    Then I ran the below command
    Get-Mailbox -Identity “[email protected]” | Export-Mailbox -SubjectKeywords "Undeliverable:" -IncludeFolders "\Inbox" -StartDate "09/22/2014" -EndDate "09/23/2014" -DeleteContent -Confirm:$false
    The command ran for a while, showing it was deleting 19000 odd emails with the below summary
    [PS] C:\Windows\System32>Get-Mailbox -Identity "[email protected]" | Export-Mailb
    ox -SubjectKeywords "Undeliverable:" -IncludeFolders "\Inbox" -StartDate "09/22/
    2014" -EndDate "09/23/2014" -DeleteContent -Confirm:$false
    TargetMailbox                    :
    TargetServer                     :
    TargetDatabase                   :
    MailboxSize                      : 733800KB
    IsResourceMailbox                : False
    SIDUsedInMatch                   :
    SMTPProxies                      :
    SourceManager                    :
    SourceDirectReports              :
    SourcePublicDelegates            :
    SourcePublicDelegatesBL          :
    SourceAltRecipient               :
    SourceAltRecipientBL             :
    SourceDeliverAndRedirect         :
    MatchedTargetNTAccountDN         :
    IsMatchedNTAccountMailboxEnabled :
    MatchedContactsDNList            :
    TargetNTAccountDNToCreate        :
    TargetManager                    :
    TargetDirectReports              :
    TargetPublicDelegates            :
    TargetPublicDelegatesBL          :
    TargetAltRecipient               :
    TargetAltRecipientBL             :
    TargetDeliverAndRedirect         :
    Options                          : DeleteSourceContent
    SourceForestCredential           :
    TargetForestCredential           :
    TargetFolder                     :
    PSTFilePath                      :
    RsgMailboxGuid                   :
    RsgMailboxLegacyExchangeDN       :
    RsgMailboxDisplayName            :
    RsgDatabaseGuid                  :
    StandardMessagesDeleted          : 0
    AssociatedMessagesDeleted        : 0
    DumpsterMessagesDeleted          : 19020
    MoveType                         : DeleteOnly
    MoveStage                        : Completed
    StartTime                        : 9/23/2014 7:29:01 PM
    EndTime                          : 9/23/2014 7:32:19 PM
    StatusCode                       : 0
    StatusMessage                    : Messages have been deleted from the source m
                                       ailbox.
    ReportFile                       : C:\Program Files\Microsoft\Exchange Server\L
                                       ogging\MigrationLogs\export-Mailbox20140923-
                                       192900-8103154.xml
    However, when I open the user's mailbox all of the emails still exist. kindly help me understand where I am going wrong and how I can delete all these emails.
    Thank You
    Philip

    Are they still specifically in the Inbox?
    I was thinking that the account might have "Deny" permissions to the user's mailbox but it looks like it can access the mailbox and delete items.
    StandardMessagesDeleted          : 0
    AssociatedMessagesDeleted        : 0
    DumpsterMessagesDeleted         : 19020
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • CRM ONLINE 2013: On Approval Of Quotation, Run Report, Generate PDF and Send an Email With PDF as attachment

    Hi,
    I am using CRM ONLINE 2013.
    How to automate below process?
    1. On Approval Of Quotation, Run Report.
    2. Generate PDF.
    3. Send an Email With PDF as attachment.
    As i have gone through many forums for this topic, but creating a plugin code for generating Report PDF is not possible in CRM ONLINE.
    So, What is the alternate way to do this..?
    Thanks.

    This is my entire code mentioned below:-
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
        <script type="text/javascript">
            if (typeof (SDK) == "undefined")
            { SDK = { __namespace: true }; }
            SDK.JScriptRESTDataOperations = {
                _context: function () {
                    if (typeof GetGlobalContext != "undefined")
                    { return GetGlobalContext(); }
                    else {
                        if (typeof Xrm != "undefined") {
                            return Xrm.Page.context;
                        else { return new Error("Context is not available."); }
                _getServerUrl: function () {
                    var serverUrl = this._context().getServerUrl()
                    if (serverUrl.match(/\/$/)) {
                        serverUrl = serverUrl.substring(0, serverUrl.length - 1);
                    return serverUrl;
                _ODataPath: function () {
                    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
                _errorHandler: function (req) {
                    return new Error("Error : " +
      req.status + ": " +
      req.statusText + ": " +
      JSON.parse(req.responseText).error.message.value);
                _dateReviver: function (key, value) {
                    var a;
                    if (typeof value === 'string') {
                        a = /Date\(([-+]?\d+)\)/.exec(value);
                        if (a) {
                            return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
                    return value;
                Create: function (object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 201) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Retrieve: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                Update: function (id, object, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "MERGE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send(JSON.stringify(object));
                Delete: function (id, type, successCallback, errorCallback) {
                    var req = new XMLHttpRequest();
                    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.setRequestHeader("X-HTTP-Method", "DELETE");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 204 || this.status == 1223) {
                                successCallback();
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
                    if (filter != null) {
                        filter = "?" + filter;
                    else { filter = ""; }
                    var req = new XMLHttpRequest();
                    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
                    req.onreadystatechange = function () {
                        if (this.readyState == 4 /* complete */) {
                            if (this.status == 200) {
                                successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
                            else {
                                errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
                    req.send();
                __namespace: true
        </script>
        <script type="text/javascript">
            //Create Email and link it with Order as Regarding field
            var Xrm;
            var email = new Object();
            var ownerID = "";
            var CustomerId = "";
            if (window.opener) { Xrm = window.opener.Xrm; }
            else if (window.parent) { Xrm = window.parent.Xrm; }
            //Get ownerid who send email of quotation to customer
            function GetOwnerID() {
                var owner = Xrm.Page.getAttribute("ownerid").getValue();
                ownerID = owner[0].id;
                var ownerName = owner[0].name;
                var entityType = owner[0].entityType;
                GetToEmailGUID();
            //Get customerid who receive email of quotation from owner
            function GetToEmailGUID() {
                var Customer = Xrm.Page.getAttribute('customerid').getValue();
                CustomerId = Customer[0].id;
                var CustomerName = Customer[0].name;
                var entityType = Customer[0].entityType;
                //if CustomerId is type of "Account" then get Primary Contact id of that account
                if (entityType == "account") {
                    var contact = Xrm.Page.getAttribute("customerid").getValue();
                    if (contact === null) return;
                    var serverUrl = Xrm.Page.context.getClientUrl();
                    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
                    var req = new XMLHttpRequest();
                    req.open("GET", oDataSelect, false);
                    req.setRequestHeader("Accept", "application/json");
                    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
                    req.onreadystatechange = function () {
                        if (req.readyState === 4) {
                            if (req.status === 200) {
                                var retrieved = JSON.parse(req.responseText).d;
                                CustomerId = retrieved.PrimaryContactId.Id;
                            else {
                                alert(this.statusText);
                    req.send();
            function CreateEmail() {
                GetOwnerID();
                email.Subject = "Email with Report Attachment";
                //Set The current order as the Regarding object
                email.RegardingObjectId = {
                    Id: Xrm.Page.data.entity.getId(),    //Get the current entity Id , here OrderId
                    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
                //Create Email Activity
                SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
            // Email Call Back function
            function EmailCallBack(result) {
                email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
                var activityPartyFrom = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyFrom.PartyId = {
                    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "contact"
                // Set the "activity" of the ActivityParty
                activityPartyFrom.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).
                activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
                // Create the from ActivityParty for the email
                SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
                var activityPartyTo = new Object();
                // Set the From party of the ActivityParty to relate an entity with Email From field
                activityPartyTo.PartyId = {
                    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238",  // id of entity you want to associate this activity with.        
                    LogicalName: "systemuser"
                // Set the "activity" of the ActivityParty  
                activityPartyTo.ActivityId = {
                    Id: result.ActivityId,
                    LogicalName: "email"
                // Now set the participation type that describes the role of the party on the activity).    
                activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
                // Create the from ActivityParty
                SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
            //ActivityParty From Callback
            function ActivityPartyFromCallBack(result) {
            //ActivityParty To Callback
            function ActivityPartyToCallBack(result) {
                GetReportId('ABM_Infotech_SalesQuote');
            //Create attachment for the created email
            function CreateEmailAttachment() {
                //get reporting session and use the params to convert a report in PDF
                var params = getReportingSession();
                //Email attachment parameters
                var activitymimeattachment = Object();
                activitymimeattachment.ObjectId = Object();
                activitymimeattachment.ObjectId.LogicalName = "email";
                activitymimeattachment.ObjectId.Id = email.ActivityId;
                activitymimeattachment.ObjectTypeCode = "email",
                    activitymimeattachment.Subject = "File Attachment";
                activitymimeattachment.Body = encodePdf(params);
                activitymimeattachment.FileName = "Report1.pdf";
                activitymimeattachment.MimeType = "application/pdf";
                //Attachment call
                SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
            //ActivityMimeAttachment CallBack function
            function ActivityMimeAttachmentCallBack(result) {
                var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
                var width = "800px";
                var height = "600px";
                window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
                // To open window which works in outlook and IE both
                //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width,
    height, features);
            //This method will get the reportId based on a report name that will be used in            getReportingSession() function
            function GetReportId(reportName) {
                var oDataSetName = "ReportSet";
                var columns = "ReportId";
                var filter = "Name eq '" + reportName + "'";
                retrieveMultiple(oDataSetName, columns, filter, onSuccess);
            function retrieveMultiple(odataSetName, select, filter, successCallback) {
                var serverUrl = Xrm.Page.context.getServerUrl();
                var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
                var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
                if (select) {
                    odataUri += "$select=" + select + "&";
                if (filter) {
                    odataUri += "$filter=" + filter;
                $.ajax({
                    type: "GET",
                    contentType: "application/json; charset=utf-8",
                    datatype: "json",
                    url: odataUri,
                    beforeSend: function (XMLHttpRequest) {
                        XMLHttpRequest.setRequestHeader("Accept", "application/json");
                    success: function (data) {
                        if (successCallback) {
                            if (data && data.d && data.d.results) {
                                successCallback(data.d.results);
                            else if (data && data.d) {
                                successCallback(data.d);
                            else {
                                successCallback(data);
                    error: function (XmlHttpRequest, errorThrown) {
                        if (XmlHttpRequest && XmlHttpRequest.responseText) {
                            alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
            function onSuccess(data) {
                reportId = data[0].ReportId.replace('{', ").replace('}', ");
                CreateEmailAttachment(); // Create Email Attachment
            //Gets the report contents
            function getReportingSession() {
                var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
                var retrieveEntityReq = new XMLHttpRequest();
                var Id = Xrm.Page.data.entity.getId();
                var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
                quotationGUID = quotationGUID.replace('}', "");
                var reportName = "ABM_Infotech_SalesQuote"; //set this to the report you are trying to download
                var reportID = "751089AA-74B8-E211-B52F-D8D3855B253B"; //set this to the guid of the report you are trying to download
                var rptPathString = ""; //set this to the CRMF_Filtered parameter
                var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition
    attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
                retrieveEntityReq.open("POST", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName="
    +
                                reportName + "&isScheduledReport=false&p:ABMFilteredQuote=" + strParameterXML;
                //remove the part starting from &p:salesorderid if your report has no parameters
                retrieveEntityReq.send(rptPathString);
                var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
                var ret = new Array();
                ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
                x = retrieveEntityReq.responseText.indexOf("ControlID=");
                ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
                return ret;
            var bdy = new Array();
            var bdyLen = 0;
            function concat2Bdy(x) {
                bdy[bdyLen] = x;
                bdyLen++;
            function encodePdf(params) {
                bdy = new Array();
                bdyLen = 0;
                var retrieveEntityReq = new XMLHttpRequest();
                var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
                "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
                "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
                retrieveEntityReq.open("GET", pth, false);
                retrieveEntityReq.setRequestHeader("Accept", "*/*");
                retrieveEntityReq.send();
                BinaryToArray(retrieveEntityReq.responseBody);
                return encode64(bdy);
            var StringMaker = function () {
                this.parts = [];
                this.length = 0;
                this.append = function (s) {
                    this.parts.push(s);
                    this.length += s.length;
                this.prepend = function (s) {
                    this.parts.unshift(s);
                    this.length += s.length;
                this.toString = function () {
                    return this.parts.join('');
            var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            function encode64(input) {
                var output = new StringMaker();
                var chr1, chr2, chr3;
                var enc1, enc2, enc3, enc4;
                var i = 0;
                while (i < input.length) {
                    chr1 = input[i++];
                    chr2 = input[i++];
                    chr3 = input[i++];
                    enc1 = chr1 >> 2;
                    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
                    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
                    enc4 = chr3 & 63;
                    if (isNaN(chr2)) {
                        enc3 = enc4 = 64;
                    } else if (isNaN(chr3)) {
                        enc4 = 64;
                    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
                return output.toString();
        </script>
        <script type="text/vbscript">
        Function BinaryToArray(Binary)
               Dim i
               ReDim byteArray(LenB(Binary))
               For i = 1 To LenB(Binary)
                     byteArray(i-1) = AscB(MidB(Binary, i, 1))
                     concat2Bdy(AscB(MidB(Binary, i, 1)))
             Next
              BinaryToArray = byteArray
       End Function     
        </script>
    </head>
    <body>
        <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>

  • My Safari will not allow me to open my Google calendar with Google Apps. I have to open my email with the older version of Google Apps. This happened after I installed 5.1.4. I tried to use the fix of changing to 64 bit by unchecking the 32 bit box no go

    My Safari will not allow me to open my Google calendar with Google Apps. I have to open my email with the older version of Google Apps. This happened after I installed 5.1.4. I tried to use the fix of changing to 64 bit by unchecking the 32 bit box but that didnt help.

    I assume that there are legal restrictions on the way in which iTunes can get artwork automatically from any source apart from the iTunes Store (which is what the right-click > Get Album Artwork function uses).  For example, even though the Gracenote service that iTunes uses to match CDs and retrieve metadata (artist, album, track titles, etc.) also has artwork functions, iTunes does not make use of these.
    For manual addition of artwork, there are three cases where the image you select may not be correctly embedded in your media files:
    your media are in a format that doesn't accommodate embedded artwork - typically WAV files.  To embed artwork you'll need to convert to another format - Apple Lossless or AIFF if you want to preserve lossless quality, AAC or MP3 otherwise.
    your media files are read only - to fix this, use Windows Explorer to find the folder that contains your files, right-click and select Properties.  On the General tab there's a check box labeled "Read-only" - if this is checked, or is grey (sometimes blue), click the box so that the flag is unchecked and the box is white.  Click OK, and then OK again when the "Apply changes to this folder, subfolders and files" option selected.  Now try adding the artwork again.
    Windows permissions issues are preventing iTunes from updating your media files (there's some anecdotal evidence of a change in this behavior in iTunes 12).  See turingtest2's notes on Repair security permissions for iTunes for Windows for advice on fixing this, then try adding the artwork again.

Maybe you are looking for

  • Loading a DLL without JNI

    I'm new to java, but I've been programming for a long time, and I'm looking for a way to load a DLL into java. I see a lot of places online that talk about using JNI, but I'm terrible with C++, so that's not really an option for me. I also see variou

  • IPad 1 gives error message -54 when sync music  it won't sync songs

    It gives error -54 when sync music

  • Can't bring out the video control penal

    When playing the video, the control penal is not displayed. Tried all settings but can't bring it out. Pl. help.

  • DB02 empty space overview

    Hello Experts, We are facing issue after implementing master note for Db correction 1456402 latest version, Db02 is showing zero values. Component level SAP-Basis 731. Data collector not updating the data. Searched SDN and performs all workaround but

  • I can't attach Word file to mail on iCloud

    I want to send my resume to a recruiter, but it does not work. I click on the icon to attach a file (paperclip icon) i wait for a moment but nothing happens, so i don't know if the file is attached or not. My resume is only 57Kb so the file size is n