Using html in a workflow email

Hi.
Does anyone know if there's a way to use html in a workflow email so the the html tags are rendered and not displayed literally? I'm trying to include an a href tag so that the email just displays the hyperlink in the email and not the big long ugly url that I'm referencing. I thought maybe there was a function that would allow the html to "execute" but I cannot seem to find one.
Thanks for any help you can offer!
Pam

Hi Taier,
For this issue, I recommend to verify the things below for troubleshooting this issue:
What are the OS used in your phone and tablet? Does this issue occur with all the phones or tablets? I recommend to check the email with another phone or tablets to narrow doen the issue scope.
What email client is used in your phone?
What HTML tags did you used in your email template?
Here is a link about some reasons about blank email in mobile for your reference:
http://www.emailonacid.com/blog/details/C13/5_reasons_why_the_mobile_version_of_your_email_might_not_be_displaying
Best regards.
Thanks
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • Unable to use HTML tags in the BPEL email component

    Hi,
    I am using BPEL email component to send mail notifications. I want the email should be in proper format.If I use HTML tags the workflow application build fails .It says invalid syntax for html tags.So, I removed the tags and just using the concat string operations as of now.To format i even tried '\n' like in java but it didnt help. Could you please let me know how do I achieve this?
    The JDeveloper version is 11.1.1.3 and SOA ,OIM both are 11.1.1.3
    The BPEL source code for the email content I configured is:
    <copy>
    <from expression="concat(string('AD Account access request has been rejected by manager.\n
    Here are some details about the request:\n
    Request ID : '), bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID'),string('\n'),
    string('Employee First Name : '),bpws:getVariableData('empFName'),string('\n'),
    string('Employee Last Name : '),bpws:getVariableData('empLName'),string('\n'),
    string('Manager Employee ID : '),bpws:getVariableData('manager'),string('\n\n\n'),string('Thanks,\n IDM Administration')
    )"/>
    <to variable="varNotificationReq"
    part="EmailPayload"
    query="/EmailPayload/ns15:Content/ns15:ContentBody"/>
    </copy>
    Please suggest .
    Thanks,
    Piyasa

    Hi
    Here is the sameple email from BEPL email component. See if this helps:
    "<html>&#x0A;<body>&#x0A;<p>This is an automated message from the <b>Identity Provisioning Solution</b>. Please don’t reply to this email.</p>&#x0A;&#x0A;<p>An access request has been successfully submitted for <%concat(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:FirstName'),' ',bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:BeneficiaryDetails/ns4:LastName'))%> to access <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:ObjectDetails/ns4:name')%>.</p>&#x0A;&#x0A;To view additional details of the request, login to the Identity Provisioning Solution.&#x0A;&#x0A;<br>Request ID: <%bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:RequestID')%>&#x0A;<br>&#x0A;<br>&#x0A;<br>&#x0A;<br>Thank you,&#x0A;<br>Identity and Access Management&#x0A;</body>&#x0A;</html>&#x0A;"
    Regards
    user12841694

  • MS SharePoint 2010 Designer Workflow Email - Enhanced Rich Text Field look-up values on HTML email have large spaces

    MS InfoPath 2010 form with RTF (Rich Text Fields)
    MS SharePoint 2010 Custom Library
    MS SharePoint 2010 Designer Workflow Send Email
    http://office.microsoft.com/en-us/sharepoint-designer-help/send-e-mail-in-a-workflow-HA010239042.aspx
    https://www.nothingbutsharepoint.com/sites/eusp/pages/creating-html-emails-with-spd-workflows.aspx
    Hi all of the above work, our question is how to control the RTF (Rich Text Field) look up values to the InfoPath 2010 form in the HTML email?
    How to FORMAT the RTF look up value? in the HTML email
    EXAMPLE
    we have a InfoPath 2010 form published in the SharePoint 2010 custom list library there are 5 RTF fields (Notes1, Notes2, Notes3, Notes4, Notes5) there are other plain text fields, date fields, and other field types in the form
    We use a HTML table to make the email look like the InfoPath form, so when the users fill out the form and they get the email notification everything looks the same.
    Our problem is the EXTRA LINE SPACE in the RTF look up values
    We want to remove any leading spaces, and line spaces between HTML table cells
    Our Workflow has the HTML in a Workflow variable, as you know it does not support remote CSS it has to be in-line style for any formatting we want all cells to have
    valign="top" the email should align at the top of the cell, all field types do except the RTF look up values they make the email look bad and they contain a lot of white space.
    Please test this in your enviroment 
    <table>
    <tr><td>Title:</td><td>[%Current Item:Title%]</td><td>[%Current Item:Notes1%]</td></tr>
    <tr><td>Created by:</td><td>[%Current Item:CreatedBy%]</td><td>[%Current Item:Notes2%]</td></tr>
    <tr><td>Date Created:</td><td>[%Current Item:Created%]</td><td>[%Current Item:Notes3%]</td></tr>
    <tr><td>Modified by:</td><td>[%Current Item:ModifiedBy%]</td><td>[%Current Item:Notes4%]</td></tr>
    <tr><td>Date Modified:</td><td>[%Current Item:Modified%]</td><td>[%Current Item:Notes5%]</td></tr>
    </table>
    I could not update the question below to the proper forum section. that is why i am asking again.
    http://social.technet.microsoft.com/Forums/en-US/a7918bfb-9166-4bdb-828c-132a0c7611e3/ms-sharepoint-2010-designer-workflow-emails-huge-lines-paces-in-rich-text-fields-values-from-ms?forum=sharepointcustomization
    -Isaack

    Hi IssackB,
    perhaps you may try this article:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f8fa2a11-9f74-4dd2-b277-21ce872fdcb2/can-we-add-rich-text-editor-to-the-sharepoint-designer-2010-workflow?forum=sharepointcustomizationprevious
    there are some notes that perhaps you may check:
    Use the same font for all the controls to ensure consistent spacing between rows.
    Choose Size from the Format menu, and then choose To Fit from the menu that appears. This adjusts the size of each control, depending on the font set for the data that appears
    in the control.
    NOTE: The Print Preview and Output To commands use different algorithms for calculating text width; therefore, the text may occupy more or less
    space in the RTF file.
    Reduce the amount of blank space above and below the report controls. Any vertical
    space between the controls is converted to whole lines
    in the RTF file. For example, a
    space of .02 inches can increase to .1667 inches in the
    RTF file.
    Make sure controls on the same output row are not too close to each other or overlapping. This can cause the Output To command to omit the controls or to align the columns incorrectly
    in the RTF file.
    Use the Align command from the Format menu to ensure that a row of controls is aligned properly on the report. If a row of controls is not aligned properly, the Output To command may place the controls
    in different rows, causing extra blank
    spacein the RTF file. 
    and please have a check there are updates for exchange 2013 and will be available with the upcoming release of CU4 for Exchange 2013, that stated the format rtf was saved instead HTML. http://support.microsoft.com/kb/2862739/en-us
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Sending workflow email in HTML format

    Hi Experts,
    I'd like to know if it is possible to send an HTML email using the workflow email step and HOW. Sample is displaying the simple table in HTML format:
    <table border="1">
    <tr> <th>Header 1</th> <th>Header 2</th> </tr>
    <tr>
    <td>row 1, cell 1</td>
    <td>row 1, cell 2</td>
    </tr>
    </table>
    Since the hyperlink (<A HREF="http://www.google.com">Google</A>) is working, I want to know if a table will work too.
    My last resort creating a separate program that uses SO_NEW_DOCUMENT_SEND_API1.
    Regards,
    Dexter

    Hello,
    Using SO_NEW_DOCUMENT_SEND_API1 is not a last resort; it's a necessity if you want to send anything but the simplest email from workflow.
    regards
    Rick Bakker
    hanabi technology

  • HTML button in the eMail notification sent by Workflow

    I have a workflow which send eMail notification to the users. I want to add 2 HTML buttons for approve and reject on this email notification.
    For this I have embedded the following HTML snippet in the advanced properties (Message Body) of the email action in the workflow -
    <!DOCTYPE html><HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word" xmlns:m = "http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE></TITLE> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 10.00.9200.17183"></HEAD> <BODY> <P><IMG style="TEXT-ALLIGN: left" src="../Site%20Assets/abc_icon.png"></P> <P><STRONG>******************************************<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Styled Workflow eMail<BR>******************************************</STRONG></P> <P><STRONG>Full Name: [%Current Item:FullName%]</STRONG></P><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas> <P></FONT></FONT></FONT><INPUT id=btnApprove type=button value=Approve>&nbsp;&nbsp;<INPUT id=btnReject type=button value=Reject></P></BODY></HTML>
    <!DOCTYPE html><HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word"
    xmlns:m = "http://schemas.microsoft.com/office/2004/12/omml"><HEAD><TITLE></TITLE> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 10.00.9200.17183"></HEAD>
    <BODY> <P><IMG style="TEXT-ALLIGN: left" src="../Site%20Assets/abc_icon.png"></P> <P><STRONG>******************************************<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    Styled Workflow eMail<BR>******************************************</STRONG></P> <P><STRONG>Full Name: [%Current Item:FullName%]</STRONG></P><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2
    face=Consolas><FONT color=#0000ff size=2 face=Consolas> <P></FONT></FONT></FONT><INPUT id=btnApprove type=button value=Approve>&nbsp;&nbsp;<INPUT id=btnReject type=button value=Reject></P></BODY></HTML>
    However when the user receives the mail, the buttons appear as plain text. Moreover the images are also missing.
    Am I  missing any specific configuration? Is there anything more that needs to be done to render a HTML button and images in an email generated from a workflow?
    I would appreciate, if anyone could please help me resolve this issue.

    Hi Arghadip Kar,
    Im glad you liked my name. )
    Anyhoo, you are correct. A Task is used. I checked in SWI1 and the task associated with the mail is TS90000101. (not a ws) Does this help at all?
    In the Business Process, it is the part where the system informs a Training coordinator that a training request by an employee have been approved by his/her manager.
    Do I still check the FM below or are there any other way given the info above?
    Thank you!
    Olekan

  • Successful Use of HTML Brand Template in Email?

    Has anyone been able to use Brand Templates in their email correspondence successfully?
    We have a template that should be the branding for our outgoing emails. In this template we have a placeholder specifically to fit the content of the email as "#Text#", which is said to be available for this Document-Based Template.
    However, anytime we are testing this through an email ticket, the content of the reply is missing, and we only see the branding and the placeholder. We have tried lowercase and all uppercase placeholders with no success.
    Any ideas or examples of this working would be great to see.
    Thanks,
    Josh
    "Available Placeholders for branding templates is listed below
    #Text#"

    Hi Josh,
    did you checked out the E-Mail Templates documentation (page 77ff) in the Administrator guide?
    The following example should help:
    <html>
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    </head>
    <body>
    <span class="variable">/FormCampaignExecutionPlaceholder/ContactPerson/FormattedName</span>
    <p>Please join us for the conference!</p>
    <p><a href="mailto:{/FormCampaignExecutionPlaceholder/MailingPermissionDenyMailToURI}">Click here to be removed from future marketing mailings.</a></p>
    <p><a href="http://{/FormCampaignExecutionPlaceholder/LinkTracking/TrackingURI}www.sap.com/HANA">News about SAP HANA</a></p>
    </body>
    </html>
    best regards, Janina

  • How can I keep My 2 email accounts and all other using HTML? It only lasts temporarily, i.e. for the day...

    (1) - when I open Firefox I recently have clicked on the hyperlink for HTML at the bottom of page, it works great for my gmail and yahoo accounts. However, it is not a permanent fix, as it apparently lasts just for the daily session. How can I keep my internet, et al. HTML permanently?
    (2) - Firefox v24.0 is said to be fast and faster! However, I am not finding it so. when I click on a link or open a tab, it is frustrating as the tab labors too long to open...I more than not click on reload, which appears to help somewhat. Any suggestions?
    (3) - I've just printed out the Mozilla Support Q&A on the error message from Firefox stating that it cannot load the website...how to I remedy this, as it occurs constantly with my Yahoo mail login?
    (4) Finally, several weeks ago I inadvertently popped the "HEALTH" Bookmark (I have a Bookmarks Toolbar), which is excellent (had it with WinXP also, now with Win7), but I seem to pop, double click, or something or other, that makes a bookmark folder jump into the wild blue yonder! I've posted for answers here and elsewhere, printed out and read all variable instructions to navigate and locate, all to no avail. More sage advice please?
    with appreciation and, thanks in advance.

    For #1, is the link to use HTML to simplify the interface?
    It may be that the site stores your preference in a cookie, and you might have set Firefox to delete the cookie when you exit the browser. There are a few built-in ways to do this:
    * Set Firefox to "Keep [cookies] until: I close Firefox" on the Privacy Options (you can create an exception for your mail sites)
    * Set Firefox to "Clear history when Firefox closes" on the Privacy Options
    * Use a private browsing window to visit your mail site
    It's also possible that add-ons or external software may clean out cookies, or that there is a problem with the database file Firefox uses the store cookies.
    For #2, did this problem just start recently? Do you notice any relationship with the type of site content (e.g., pages that use Flash or other media)?

  • Tabs or Collapsable view in Workflow Email

    Hi all,
    We have a requirement to have Tabs in mail sent by WF or to have collapsable view.
    Collapsable : Click on a word or so and it opens a section . On clicking again, it should close.
    We are using HTML language to send the Workflow Email.
    The mail would be sent to Lotus notes and / or Outlook.
    Let me know if this can be achieved.
    Regards,
    Siddhesh sanghvi

    I Have defined Workflow in SAP. The mail is sent to SOST and then to outlook or Lotus Notes.
    As you said you have defined workflow in sAP. mail is sent to SOST.
    am aware that this will be possible on receiving side i.e. Lotus Notes or Outlook.
    But I am not aware, how to create it in HTML or any other language for Workflow mail.
    Thank you for your inputs.
    Then you want to send mail again in HTML what is your excat requiremnt. You can get every thing in SAP itslef why do you want HTML.
    Regards
    vijay

  • User action in workflow email

    Dear All,
    I have a requirement, where user wants to do some action in the workflow email that goes into user's inbox.
    User wants to have the option of yes/no and  forcing an action on the basis of that.
    How can email from workflow have this type of functionality, please suggest.
    Regards,
    Neerja

    Hi Neerja,
    I have done this long Back. Customized the program RSWUWFML2 to send the mail with Approve/Reject button with the help of HTML code.
    If the user press approv/reject in outlook, called the HTML Mailto option. So it will come like as Reply mail.
    If the user press, send button the mail will be routed to SAP inbox - Always to the static SAP user with the details of Approver decision and work item ID.
    There is a class and it will be triggered when ever the particular SAP user receives the mail's. Using the class work item ID and approver decision will be extracted and the work item will be completed based on the approver decision.
    Thanks,
    Viji.

  • EPM Workflow Email Notifications

    I have inherited an EPM implementation that has EPM Workflow Email Notifications. The email text is not very informative and I want to customize this text to something more meaningful. I have been told this cannot be done, but find this very hard to believe.
    Does anyone know if this can be done? Many thanks, in advance.

    Hi,
    I am assuming these email notifications are sent when the project moves between workflow stages, approval etc.? The short answer is: yes, the text of the email notifications can be updated. However, it depends on how your workflows have been built, which
    tools have been used  (e.g. SharePoint Designer, Visual Studio, 3rd party tool etc.) and the project server version - 2010/2013.
    If you are using project server 2013, check if the workflows have been built using SharePoint Designed (open the PWA in SharePoint designer and check the site workflows)
    Hope this helps
    Paul

  • How can I add a link to an item within a workflow email - which will always find the item - even if it's status has changed?

    I've used the method within the SharePoint designer to add a link to the workflow context current item URL, but when the current item status changes then obviously this link will no longer work.
    How can I change this link so that it will always open the item, even if someone has changed it within the list, before I clink on the link?
    This is an important one as over 300 people will use the list and many of these will be emails about items on the list will be in different time zones.  I don't want to have lots of mails from people saying "this list doesn't work" as it's
    critical they keep using it.
    Please help.
    P.S.  I don't know if the <href> method will work, so if someone can confirm to me then that would be great.

    Hi,
    According to your post, my understanding is that add a link to an item within a workflow email.
    I’ m not very clear about the status you said. Please descript more detail which URL do you want to display.
    Per my knowedge, you can display the following url in your email body:
    [%Workflow Context: Current Item URL%]
    [%Workflow Context: Current Site URL%]
    [%Workflow Context: Workflow Status URL%]
    [%Current Item: Encoded Absolute URL%]
    Please start the workflow automatically when an item is changed and changed.
    No matter how you  edit the item or update the approve status, the URLs remains the same.
    Thank you for your understanding.
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to send HTML link in the email through BRFplus

    Hi All,
    I want to send an HTML link embedded into the email body , as shown below.
    Hello Friends,
    Please find below path for error occurred during triggering of materials.
    Http://documents/error/doc.htm
    Thanks & Regards
    Khushbu
    And when the user clicks on the HTML link , it should directly take user to the browser.
    Kindly suggest how to implement this functionality.
    Regards,
    Khushbu

    I have tried using HTML code for writing the email body, but its not working.Its not converting HTML code , its taking them as characters only.I know how pass HTML link in email from ABAP but here email are sent from SEND email action of BRFplus.

  • How to include time in [Today] in workflow email variable

    I want to add the date/time that an item was added to a library in the email body of a workflow email.  I created a variable and set the date value to Current date.  When the email comes though the date is correct, but the time is 12:00:00 a.m.  Why is that, and is there a way to get the time in the date/time stamp?

    Hi,
    This is one drawback in SharePoint. Whenever you write a field of type "Date and Time" in the workflow email, it will always show the time 12:00:00 AM no matter if you have selected "Date Only" option also. This not only happens in SharePoint Designer's "Send an Email" activity but also happens in Visual studio workflow. There is no inbuilt solution for this and if you are using SharePoint Designer then you cannot get rid of this.
    I was using Visual studio workflows and in order to remove this "12:00:00" part from date, i followed some logic. First i converted my date to a string variable and then used "Trim()" function to trim the "12:00:00 AM" part. Like this i made this working.
    Regards
    Ginni

  • Send HTML as attachment in email in Stored Procedure

    Hi Guys,
    I am writing a stored procedure to send HTML attachment. Below is my code but no html attachment sent in mail. Kindly advise.
    USE [CarsemERP]
    GO
    /****** Object: StoredProcedure [dbo].[DBA_CarsemERP_SQLBlocks] Script Date: 04/01/2015 15:14:15 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <THARMENDRAN>
    -- Create date: <2014FEB21>
    -- Description: TO CHECK ANY LOCKS MORE THN 20 SEC IN SQL SERVER
    -- =============================================
    ALTER PROCEDURE [dbo].[DBA_CarsemERP_SQLBlocks]
    AS
    BEGIN
    DECLARE @iCnt As Int
    DECLARE @ICnt2 As Int
    DECLARE @SendEmail AS VARCHAR(3)
    DECLARE @Temp_DetailReq1 TABLE (
    idx smallint Primary Key IDENTITY(1,1),
    DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
    LoginName varchar (30), HostName varchar (30))
    DECLARE @Temp_DetailReq2 TABLE (
    idx smallint Primary Key IDENTITY(1,1),
    DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
    LoginName varchar (30), HostName varchar (30))
    SET @SendEmail = 'NO'
    SELECT @iCnt= COUNT(*) FROM DBA_SQLBlocksViewTharmen
    IF @iCnt > 0
    BEGIN
    Insert Into @Temp_DetailReq1
    Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
    END
    WAITFOR DELAY '00:00:20'
    select @iCnt2= COUNT(*) FROM DBA_SQLBlocksViewTharmen
    IF @iCnt2 > 0
    BEGIN
    DECLARE @columnHeaders NVARCHAR(MAX)
    DECLARE @tableHTML NVARCHAR(MAX)
    DECLARE @body NVARCHAR(MAX)
    Insert Into @Temp_DetailReq2
    Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
    SET @SendEmail = 'YES'
    BEGIN
    SET @columnHeaders = 'DBName</th><th>RequestId</th><th>BlockingId</th><th>BlockedObjectName</th><th>LockType</th><th>RequestingText</th><th>BlockingText</th><th>LoginName</th><th>HostName'
    set @tableHTML =
    '<div><b>There is blocking in VERPSVR02-02.</b></div><br>' + -- This is the bold text at the top of your email
    '<table border="0" cellpadding="5"><font face="Calibri" size=2>' +
    '<tr><th>' + @columnHeaders + '</th></tr>' +
    convert(nvarchar(max),
    select td = [DBName], '', -- Here we put the column names
    td = [RequestId], '',
    td = [BlockingId], '',
    td = [BlockedObjectName], '',
    td = [LockType], '',
    td = [RequestingText], '',
    td = [BlockingText], '',
    td = [LoginName], '',
    td = [HostName], '' -- Here we put the column names
    from @Temp_DetailReq2
    for xml path('tr'), type)) +'</font></table>'
    END
    END
    IF @SendEmail = 'YES'
    BEGIN
    EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'MyDBMailProfileName',
    @recipients = '[email protected]',
    @body = 'Please refer the attachment' ,
    @body_format = 'HTML',
    @subject = 'Alert! Blocking On ERPSVR02-02 Live Server',
    @file_attachments = @tableHTML,
    @importance = 'High';
    END
    END

    Hi Guys,
    I need help on how to generated HTML as attachment to email. I have write below stored procedure but the html did not send as attachment. Kindly guide me on how to save the generated HTML as a file and send it as attachment.
    USE [CarsemERP]
    GO
    /****** Object: StoredProcedure [dbo].[DBA_CarsemERP_SQLBlocks] Script Date: 04/01/2015 15:14:15 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author: <THARMENDRAN>
    -- Create date: <2014FEB21>
    -- Description: TO CHECK ANY LOCKS MORE THN 20 SEC IN SQL SERVER
    -- =============================================
    ALTER PROCEDURE [dbo].[DBA_CarsemERP_SQLBlocks]
    AS
    BEGIN
    DECLARE @iCnt As Int
    DECLARE @ICnt2 As Int
    DECLARE @SendEmail AS VARCHAR(3)
    DECLARE @Temp_DetailReq1 TABLE (
    idx smallint Primary Key IDENTITY(1,1),
    DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
    LoginName varchar (30), HostName varchar (30))
    DECLARE @Temp_DetailReq2 TABLE (
    idx smallint Primary Key IDENTITY(1,1),
    DBName varchar(30), RequestId Int, BlockingId Int, BlockedObjectName varchar(30),LockType varchar(30), RequestingText varchar(max), BlockingText varchar(max),
    LoginName varchar (30), HostName varchar (30))
    SET @SendEmail = 'NO'
    SELECT @iCnt= COUNT(*) FROM DBA_SQLBlocksViewTharmen
    IF @iCnt > 0
    BEGIN
    Insert Into @Temp_DetailReq1
    Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
    END
    WAITFOR DELAY '00:00:20'
    select @iCnt2= COUNT(*) FROM DBA_SQLBlocksViewTharmen
    IF @iCnt2 > 0
    BEGIN
    DECLARE @columnHeaders NVARCHAR(MAX)
    DECLARE @tableHTML NVARCHAR(MAX)
    DECLARE @body NVARCHAR(MAX)
    Insert Into @Temp_DetailReq2
    Select DBName, request_session_id, blocking_session_id, BlockedObjectName,resource_type, RequestingText, BlockingTest, LoginName, HostName From DBA_SQLBlocksViewTharmen
    SET @SendEmail = 'YES'
    BEGIN
    SET @columnHeaders = 'DBName</th><th>RequestId</th><th>BlockingId</th><th>BlockedObjectName</th><th>LockType</th><th>RequestingText</th><th>BlockingText</th><th>LoginName</th><th>HostName'
    set @tableHTML =
    '<div><b>There is blocking in VERPSVR02-02.</b></div><br>' + -- This is the bold text at the top of your email
    '<table border="0" cellpadding="5"><font face="Calibri" size=2>' +
    '<tr><th>' + @columnHeaders + '</th></tr>' +
    convert(nvarchar(max),
    select td = [DBName], '', -- Here we put the column names
    td = [RequestId], '',
    td = [BlockingId], '',
    td = [BlockedObjectName], '',
    td = [LockType], '',
    td = [RequestingText], '',
    td = [BlockingText], '',
    td = [LoginName], '',
    td = [HostName], '' -- Here we put the column names
    from @Temp_DetailReq2
    for xml path('tr'), type)) +'</font></table>'
    END
    END
    IF @SendEmail = 'YES'
    BEGIN
    EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'MyDBMailProfileName',
    @recipients = '[email protected]',
    @body = 'Please refer the attachment' ,
    @body_format = 'HTML',
    @subject = 'Alert! Blocking On ERPSVR02-02 Live Server',
    @file_attachments = @tableHTML,
    @importance = 'High';
    END
    END

  • AIR apps developed using HTML+Javascript

    Hi…
    I am working on Adobe AIR.
    And now I have 3 options to develop AIR applications 1)Flex
    2) Flash 3) HTML+javascript.
    But can you please explain me when do I exactly use Flex Or
    HTML+JS Or Flash.
    One of the reason I know is Flex used for Rich UI
    applications
    Is there any list of requirements for which one of the 3
    option is most suitable to use.
    And I have some more questions.
    1) Can AIR applications(developed using HTML+Js) invoke a web
    service running on a different server
    2) Can AIR application(developed using HTML+Js) detect the
    connectivity of USB drive (I have developed 1 application that can
    detect the Network connectivity and periodically reports the status
    I want the same in case of USB(plug & play) connectivity)
    3) I have one AIR application that has one HTML form on click
    of button I am posting the form Data to Java Servlet using
    “air.sendToURL()” as shown
    <script src="AIRAliases.js" />
    <script>
    function sendURL()
    var url = "
    http://localhost:8080/InvokingServlet/Registration";
    var variables = new air.URLVariables();
    variables.username = document.f1.username.value;
    variables.password = document.f1.password.value;
    var request = new air.URLRequest(url);
    request.data = variables;
    air.sendToURL(request);
    alert("Data has been added to Remote DB...");
    </script>
    The data goes to Servlet and then Servlet thru Jdbc
    Connectivity adds the data to database “MySQL” database
    named “user”
    If I read the data from database and print in Servlet it
    displays that to “tomcat server window(log)” But I want
    the data from Servlet to send back to HTML page where I can display
    it on the same HTML page where user entered his details. So even if
    I put the result into some Scope like session or request, but Can I
    read that it in HTML+Javascript page .
    [email protected]

    quote:
    Originally posted by:
    pravinpatil23
    But can you please explain me when do I exactly use Flex Or
    HTML+JS Or Flash.
    This question gets asked about once a week. You
    can find my latest answer
    here
    and a little searching will dig up more opinions.
    quote:
    Can AIR applications(developed using HTML+Js) invoke a web
    service running on a different server
    An AIR application isn't hosted on a server, so all web
    servers are "foreign" to your AIR application. An AIR app does get
    downloaded from a server, most of the time, but it doesn't maintain
    some kind of special connection to that server.
    Because of this, there are no cross-domain restrictions in
    AIR like you have in a regular web browser.
    quote:
    Can AIR application(developed using HTML+Js) detect the
    connectivity of USB drive
    AIR does not allow low-level system access, and has very
    little in the way of platform-specific capabilities. So, you'd have
    to use a high-level, platform-agnostic way of checking for the
    drive, such as by looking around to see what files are available.
    Things like USB insert notifications are way outside the scope of
    AIR.
    quote:
    I want the data from Servlet to send back to HTML page where
    I can display it on the same HTML page where user entered his
    details.
    That question isn't on-topic here. Ask on a forum dealing
    with JSP servlets.

Maybe you are looking for

  • Error in cdr file

    hi, Today, when I was working with a file in Corel and wanted him to withdraw, I got the error " Out of memory" Then I tried to do the same with other Corel files and got the same error. I think that the problem is not in memory, because it also happ

  • HELP! i need to undo syncing of 2 Blackberry devices!!!!!!!!

    I had an OLD black berry (think the very first version) that i was using as a temporary phone while Bell sorted somethings out. Needless to say i got a Storm 2 9550 to replace that, however did not do a transfer sync right at once. So both phones end

  • IPad 1 : No SIM installed (after iOS5)

    It's all in the title. After I updated to iOS 5, my iPad 1st Gen started to loose the SIM after the code-lock had engaged, but a reboot fixed it. Since a couple of days (and after an iPad restore, which is indicated in Apple Support as the fix for th

  • Reporting problems in iTunes - going round in circles!!

    I'm trying to report a problem with an allowance purchase, but when I click on "report problem" from the list of past purchases in my iTunes account it just takes me back to the "how-to" help screen. I've tried several times to follow the instruction

  • The Chopping Block (sort of 2 questions)

    Logicians, I regularly import big sample files from digital audio workstations (mostly the korg D1600). The file will be one long waveform with a bunch of small recordings (words, notes, etc) that I want to turn into individual samples. Sometimes I h