How to fire a Alert Message in a table format
Hi friends,
Currently im performing an Alert. My requirement is i need to display the alert message to the user in the mail in a table format.
But i couldnt perform that, as the alert is not displaying in a properly aligned table format.
Can you friends propose me a right way to bring the alert in a table format with two columns.
Thanks in Advance..
Regards,
Saro
I agree w 936671, do this in PL/SQL. Much, much easier.
However, I will recommend a different approach using PL/SQL.
1) Create a package to send the emails. Sample code:
create or replace package cust_fnd_utilities as
procedure send_email( p_sender in varchar2,
p_recipient in varchar2,
p_subject in varchar2,
p_message in varchar2);
end cust_fnd_utilities;
create or replace package body cust_fnd_utilities as
procedure send_email( p_sender in varchar2,
p_recipient in varchar2,
p_subject in varchar2,
p_message in varchar2)
is
v_mail_host varchar2(30);
v_crlf constant varchar2(2):= chr(13)||chr(10);
v_message varchar2(10000);
v_mail_conn utl_smtp.connection;
begin
v_mail_host := 'localhost';
v_mail_conn := utl_smtp.open_connection(v_mail_host, 25);
v_message := 'Date: ' ||
to_char(sysdate, 'dd Mon yy hh24:mi:ss') || v_crlf ||
'From: <'|| p_sender ||'>' || v_crlf ||
'Subject: '|| p_subject || v_crlf ||
'To: '||p_recipient || v_crlf || '' || v_crlf || p_message;
utl_smtp.ehlo(v_mail_conn, v_mail_host);
utl_smtp.mail(v_mail_conn, p_sender);
utl_smtp.rcpt(v_mail_conn, p_recipient);
utl_smtp.data(v_mail_conn, v_message);
utl_smtp.quit(v_mail_conn);
exception
when others then
utl_smtp.close_connection(v_mail_conn);
end send_email;
end cust_fnd_utilities;
2) Build the email, then call the package from step #1. Sample code:
create or replace package cust_fnd_monitoring as
procedure profile_options_build_email ( p_errbuf out varchar2,
p_retcode out varchar2,
p_sender in varchar2,
p_recipient in varchar2);
end cust_fnd_monitoring;
create or replace package body cust_fnd_monitoring as
procedure profile_options_build_email ( p_errbuf out varchar2,
p_retcode out varchar2,
p_sender in varchar2,
p_recipient in varchar2)
is
v_subject varchar2(100) := 'erpgamd1 - Recent Profile Option Changes';
v_mime_type varchar2(100) := 'Content-Type: text/html';
v_body varchar2(10000);
v_line_feed varchar2(1):=chr(10);
cursor profile_cur is
select p.user_profile_option_name,
u.user_name,
u.description,
r.responsibility_name,
v.last_update_date
from fnd_profile_option_values v,
fnd_profile_options_vl p,
fnd_user u,
fnd_responsibility_vl r
where p.application_id = v.application_id
and p.profile_option_id = v.profile_option_id
and v.last_updated_by = u.user_id
and v.level_id = 10003
and v.level_value = r.responsibility_id
and v.level_value_application_id = r.application_id
and r.creation_date <= '01-NOV-2010'
and v.last_update_date >= sysdate-7
and u.user_name != '204020779'
union all
select p.user_profile_option_name,
u.user_name,
u.description,
'Site' responsibility_name,
v.last_update_date
from fnd_profile_option_values v,
fnd_profile_options_vl p,
fnd_user u
where p.application_id = v.application_id
and p.profile_option_id = v.profile_option_id
and v.last_updated_by = u.user_id
and v.level_id = 10001
and v.last_update_date >= sysdate-7
and u.user_name != '204020779'
order by 5 desc,4;
profile_rec profile_cur%rowtype;
begin
open profile_cur;
<<profile_loop>>
loop
fetch profile_cur into profile_rec;
exit when profile_cur%notfound;
if profile_cur%rowcount = 1 then
-- We need to confirm that we fetch at least one row. Once we have confirmed, we want to generate
-- the email body heading only during the first pass through the loop.
v_body := '<html>' || v_line_feed;
v_body := v_body || '<body style="font-family:arial;font-size:10pt">' || v_line_feed || v_line_feed;
v_body := v_body || '<table cellspacing="5">' || v_line_feed;
-- table heading
v_body := v_body || '<tr>' || v_line_feed;
v_body := v_body || '<td align="left"><u>profile option name</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>responsibility name</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>last update date</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>SSO #</u></td>' || v_line_feed;
v_body := v_body || '<td align="left"><u>user name</u></td>' || v_line_feed;
v_body := v_body || '</tr>' || v_line_feed;
end if;
-- table detail
v_body := v_body || '<tr>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.user_profile_option_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.responsibility_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.last_update_date || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.user_name || '</td>' || v_line_feed;
v_body := v_body || '<td>' || profile_rec.description || '</td>' || v_line_feed;
v_body := v_body || '</tr>'|| v_line_feed;
end loop profile_loop;
if profile_cur%rowcount =0 then
-- The cursor fetched no rows.
-- send email using utl_smtp
cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || '. No exceptions found.','No exceptions found.');
else
-- Generate the end of the email body if we fetched at least one row.
v_body := v_body || '<table>' || v_line_feed || v_line_feed;
v_body := v_body || v_line_feed || '</body>' || v_line_feed;
v_body := v_body || '</html>' || v_line_feed;
-- send email using utl_smtp
cust_fnd_utilities.send_email(p_sender,p_recipient,v_subject || v_line_feed || v_mime_type,v_body);
end if;
close profile_cur;
end profile_options_build_email;
end cust_fnd_monitoring;
3) In your alert, do not use an email action. Rather, your action should be a SQL*Plus script that calls the package from step #2.
Similar Messages
-
How to configure an Alert message if communicationChannel(JMS) stops
All,
Is there a way how to configure an alert when the communication channel stops.
<b>Scenario:</b>
In the path Runtime workbench->Component Monitoring->Adapter Engine->Communication Channel monitoring, if we see that a communication channel has stopped(RED traffic light as Status), then can we trigger an alert notification for same.
Currently we have alrerts configured for any message/s failure in the JMS Adapter Framework. So can we trigger simmilar alerts when a comm channel stops(for whatever reason).
Thanks in advance
RKHi Sreeram,
Thanks for the quick reply.
We have a scenario where we activate individual channels at a given time. So in this case, Adapter will always be in RED as all queues are never running in our scenario.
So we need an ALERT to be triggered for individual comm channels. Is theer any way that you can think of ?
Thanks and regards
RK -
How to display an alert message on click of link in tableview
Hi,
Following is the code for a tableview in layout section of a BSP( i have specified only one tableview column here). The requirement is to display an alert message on click of link in the first column that is "evbeg". Can anyone please help me how to achieve this? Appreciate quick response on this.
CREATE OBJECT lr_dateiterator TYPE cl_lso_bsp_it_trdates
EXPORTING im_application = application
im_tform = trainingform.
<htmlb:tableView id = "dates"
table = "<%= dates %>"
iterator = "<%= lr_dateiterator %>"
width = "100%"
rowCount = "<%= lp_len %>"
footerVisible = "FALSE"
sort = "SERVER" >
<htmlb:tableViewColumn columnName = "evbeg"
type = "user"
title = "<%= otr(LSO_FRONTEND/schedule) %>"
tooltipHeader = "<%= otr(LSO_FRONTEND/schedule) %>"
sort = "TRUE" >
</htmlb:tableViewColum>
Thanks and Regards,
Archana.you have to code in the iterator for this.
in the render_cellstart method of the iterator you need to code.
this is for a column.
when 'MATNR'.
data: text type string.
text = 'disp_alert()'. "this java script i placed in the page
data: lo_link type ref to cl_htmlb_link.
create object lo_link.
lo_link->id = p_cell_id.
lo_link->onclientclick = text.
lo_link->text = <fs>-matnr.
p_replacement_bee = lo_link.
below is the java script i added in my page..
< sc ri pt type="text/javasc ript" >
f u n ction disp_alert()
a l e rt("helloworld");
< /s c ript > -
How to convert javascript alert message into an Inline message in Apex Page
Hi All. Im new to Apex.
Present Approach -
I have a dynamic report region developed using API's like APEX_ITEM etc. I am using java scripts to validate these dynamic items and popup alert messages as shown below -
function ValidateNotObservedCB(p_row_num)
var v_row_num = p_row_num;
var v_not_observed_cb_status = document.getElementById('f_notobserved_'+v_row_num).checked;
var v_not_in_district_cb_status = document.getElementById('f_notindistrict_'+v_row_num).checked;
var v_program_code = document.getElementById("f_program_code_"+v_row_num).value;
if ( (v_program_code.length>0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true ))
bold alert("You have already entered a program code.") bold
document.getElementById('f_notobserved_'+v_row_num).checked=false ;
document.getElementById('f_notobserved_'+v_row_num).value='N';
} else if ( (v_program_code.length==0)&& ( document.getElementById('f_notobserved_'+v_row_num).checked==true )) {
document.getElementById('f_notobserved_'+v_row_num).value='Y';
document.getElementById('f_notobserved_'+v_row_num).checked=true ;
} else
document.getElementById('f_notobserved_'+v_row_num).checked=false ;
document.getElementById('f_notindistrict_'+v_row_num).checked=false;
document.getElementById('f_notindistrict_'+v_row_num).value='N';
document.getElementById('f_notobserved_'+v_row_num).value='N';
Question/Issue - How can I convert these alert messages into Inline messages to show on the page, similar to what appears when we do Item Validations in APEX.
Waiting for responses as this is an urgent requirement.
Thanks in Advance,
MadhuHi,
I did with jQuery small sample
http://apex.oracle.com/pls/otn/f?p=40323:36
Page HTML header is
<script type="text/javascript">
$(function(){
var lImg = $('<img alt="" class="pb" style="float: right;" src="/i/delete.gif"/>');
var lMesg = $('<div id="MESSAGE" style="border-top: 1px solid rgb(142, 170, 142); border-bottom: 1px solid rgb(142, 170, 142); padding: 5px; background: rgb(235, 241, 235) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 450px;" class="t14notification"></div>');
$('.pb').live('click',function(){
$x_Remove("MESSAGE");
$('#SUBMIT').click(function(){
if($('#MESSAGE').length == 0){
$('#t14Messages').children().append($(lMesg));
$(lMesg).append($(lImg));
$(lImg).after($('#P36_NOTIFICATION').val());
}else{
$('#MESSAGE').text('');
$('#MESSAGE').append($(lImg));
$(lImg).after($('#P36_NOTIFICATION').val());
</script>I do not know does it help. Using this depend much on theme, defined class and IDs.
Br, Jari -
How to verify JavaScript alert message display on page with C#?
Hi All,
I have a question about verify the JavaScript alert message on page. For example, I input the script in browser address like: "javascript:onmouseover=alert('popup windows')" . How to verify there's a alert message displayed on page with C#?
ThanksAre you trying to use some automation or ? What the previous solution is they have put the text in the dom for you to pull out with C# or other languages.
if you are trying to automate this through a browser maybe look into WebDriver
WebDriverWait wait = new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert = driver.switchTo().alert(); var alertText = alert.Text;
alert.accept(); -
Hi, what steps must I take to add an alert message that reminds the Adobe Reader end user to Print their form if they wish to keep a record of their form data.
Also, where should such an alert appear, when and upon which event type?
HarryThanks Jimmy, unfortunately it doesn't work on my Submit button (which is where I do want it).. Here's what I have on the standard Submit button.
----- form1.SF_P8.SF_print-submit.EmailSubmitButton::click - (JavaScript, client) ------------------
xfa.messageBox("Please ensure you also print a copy for your records", Warning, 1, 1);
this makes my button do nothing at all, not even submit. I think it's because there are 2 events associated with it, the invisible "submit" and the new warning. Any suggestions?
Harry -
How to position all alert messages in a particular position?
Hi All,
I have developed a Application where it contains so many Alert Messages and i want display All Alert messages in a particular position of respected screen. I have tried the following code but it works for individual alert messages. I don't want to set x and y properties individually, i want set x and y properties globally. Is there any way that i can apply for all the alert messages in my application.
myAlert = Alert.show('Hello World');
PopUpManager.centerPopUp(myAlert);
myAlert.x = 0;
myAlert.y = 0;
Thanks in AdvanceYou could override the Alert class. This would like something like:
public class MyAlert extends Alert {
public get x():void {
return 0;
public get y():void {
return 0; -
How to disable the alert message that comes in older browsers while loading
Hi!
I'm testing the ADF Rich faces app on Firefox 2.0.01.
It's working fine, but still I get the Error "" You are using unsupported Gecko Browser,the Supported Gecko browsers are 2.0.02 and higher".
I don't want that message to be displayed to the user, though he may be using older browsers..
I Suppose the application developer can handle it according to the demands of the of the situation...
Can you suggest a way to disable that alert message which is very annoying to the user , every time a page is loaded ?
Thanking you in advance,
SambaI filed your complaint as an ER. For tracking purposes the ER number is 6160631.
--RiC -
How to disable Security Alerts message in IE10 via GPO
I'm trying to disable annoying Security Alert message "You are about to view pages over a secure connection" in IE10 via GPO.
I tried different GPO settings but neither of them did the trick.
Any advice\suggestion would be appreciated.
Thx. Boris Hi,
You can try going to Tools > Internet Options > Advanced and uncheck the box next to "Warn if changing between secure and not secure mode".
And via the GP setting:
Computer Configuration\Administrative Templates\Windows Components\Internet Explorer\ Turn off the Security Settings Check feature.
Regards,
Ada Liu
TechNet Community Support -
How to display an error message after validation in Formatted Search?
Hi SBO experts,
if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
Thanks & Regards,
Raghu Iyeri created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
if $[$38.11.0] > 50
begin
select @error = 1
select @error_message = 'Vendor code cannot begin to X sign.'
end
the system throws the error : Internal error (8180) occurred [Message 131-183]
actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0]) > 0
begin
select @error = 1
select @error_message = 'Error in Quantity.'
end
but, this expression to get the remainder itself seems to have some error
$[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode] = $[$38.1.0])
i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
Regards,
Raghu Iyer -
How can I convert my css code into table format?
Wasn't sure how to word the title, but what I am trying to do is post my html code generated with Dreamweaver CS4 into craigslist for an advertisement I designed. Craigslist seems to only accept "TABLE FORMAT". I just learned enough to design this AD using css, now do I have to go back and learn table cell coding? Is there something I am not aware of like a conversion or something that will work?
Thank you very much for any help, I am very anxious to get my ad placed.Example of the accepted code:
<table border="0" cellpadding="5" cellspacing="0" width="100%" id="table4" align="center">
<tr><td width="125"><b><font size="2" face="Verdana">Contact Name:</font></b></td><td><font face="Verdana" size="2">Patrick</font></td></tr>
You must have an old HTML editor because that isn't INLINE CSS CODE. It's deprecated HTML code. It might work OK on Craig's List... but <font> tags won't pass W3C validation in XHTML doc types.
To express what you have above using inline CSS styles without tables would like this:
<p style="font:16px Verdana, Arial, Helvetica, Sans-serif; text-align:center"><strong>Contact Name:</strong> Patrick</p>
http://www.w3schools.com/CSS/css_howto.asp
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
How to fire an alert when a particular fileds are updated
Hi,
We have requirement in which an alert need to fire only when two of the columns of per_All_assigments_f table
gets updated
Can any one please let me know how to capture and compare the old and new values of any columns in the table in alert.
Thanks
SKHi;
You can create trigger than when related filed updated you can get email.
Check below googling:
http://www.google.co.uk/search?hl=en&q=update+trigger&meta=
Regard
Helios -
How to get theoutput of classical report in table format
hi all,
i am new to this forum.i want the help from experts over here.for example if we create the program in classical report for employee details.how to get the output in tabular column format.pls reply to me.
Thanks in advanceHI all,
I am new here. Currently I am trying to create a program which is able to compare and validate key fields from different tables.
my code looks like this:
*~Internal Tables
DATA:
LT/RAB/KPI_CONF TYPE STANDARD TABLE OF /RAB/KPI_CONF,
LT/RAB/KPI_MAPP TYPE STANDARD TABLE OF /RABL/KPI_MAPP,
LT/RABL/KPI_HEAD TYPE STANDARD TABLE OF /RABL/KPI_HEAD.
DATA:
/RAB/KPI_CONF_NEW TYPE SORTED TABLE OF /RAB/KPI_CONF WITH UNIQUE KEY XX100011 XX100004 XX100022 XX100010,
/RAB/KPI_MAPP_NEW TYPE SORTED TABLE OF /RAB/KPI_MAPP WITH UNIQUE KEY XX100009 XX000197 XX100007 XX100014,
/RAB/KPI_HEAD_NEW TYPE SORTED TABLE OF /RAB/KPI_HEAD WITH UNIQUE KEY XX100004.
DATA: GWA_/RAB/KPI_CONF TYPE /RAB/KPI_CONF,
GWA_/RAB/KPI_MAPP TYPE /RAB/KPI_MAPP,
GWA_/RAB/KPI_HEAD TYPE /RAB/KPI_HEAD.
*Fill the internal table with database values
PERFORM get_existing_records.
FORM GET_EXISTING_RECORDS.
SELECT *
FROM /RABL/KPI_CONF
INTO TABLE LT/RAB/KPI_CONF.
SELECT *
FROM /RAB/KPI_MAPP
INTO TABLE LT/RAB/KPI_MAPP.
SELECT *
FROM /RAB/KPI_HEAD
INTO TABLE LT/RAB/KPI_HEAD.
LOOP AT LT/RAB/KPI_CONF INTO GWA_/RAB/KPI_CONF.
READ TABLE LT/RAB/KPI_HEAD INTO GWA_/RAB/KPI_HEAD with key XX100004 = GWA_/RAB/KPI_CONF-XX100004.
IF SY-SUBRC <> 0.
WRITE: 'No header id found in formula'.
ENDIF.
LOOP AT LT/RAB/KPI_HEAD INTO GWA_/RAB/KPI_HEAD.
READ TABLE LT/RAB/KPI_MAPP INTO GWA_/RAB/KPI_MAPP with key XX100009 = GWA_/RAB/KPI_HEAD-XX100012.
IF SY-SUBRC <> 0.
WRITE: ' no selection ID found in table'.
endif.
ENDLOOP.
ENDLOOP.
ENDFORM.
I would like to have a output report in which the results from my above statement are displayed.
Any advise is welcome
Thanks.
Rabie -
How To Disable Verify Database Message Alert
How To Disable Verify Database Message Alert?
I have a VB6 open Crystal Reports using Crystal Reports XI R2 (SP5) and almost every time I open a report, I get an alert message about the table has been changed and I have to click "Ok" to make it goes away. Is there a way to disabled this alert or set default to "Ok" so I do not have to click this message every report. Thank you very much.Hello,
You must verify if the database has changed so you can't disable the message. CR must match what the DB is using or the reports will fail or return wrong data.
It's odd that even after verifying the DB in the designer your app still needs it to be verify the report. You did save the report correct?
Also:
Dim CRApplication As CRAXDDRT.Application
Dim Report As CRAXDDRT.Report
Is the report creation engine and you should be using craxdrt.dll. You need to be licnesed to use craxddrt.dll and this may cause problems for you later when deploying.
Use:
Dim CRApplication As CRAXDRT.Application
Dim Report As CRAXDRT.Report
The mapping is not a switch you can turn on or off but it is Event driven. You need to add code to the viewer section to capture the event if the mapping event fires. Then you can set it to the way you want to use it.
I suggest you purchase a case on line and get to the Report Design team to figure out why when you verify the report your app still thinks it needs to be verified. Something going on in your report that the forum makes it difficult to debug the problem. You can't attach files to forums.
Link to Single Case purchase:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
Thank you
Don -
Check File Existence and display alert message
Hi,
I have a servlet which uploads file to server. Below is my code and is working file. Now, I want to check if the file uploading by the user is already exists. If so , I have to display a message to user "The file you are trying to upload already exists. Do you want to overwrite" with YES or NO actions.
How can I display this alert message from user.
//item.write(tosave);
FileItemFactory factory = new DiskFileItemFactory();
boolean isMultipart = FileUpload.isMultipartContent(request);
System.out.println(isMultipart);
Map fileDetails = new HashMap();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
while (iter.hasNext()) {
item = (FileItem) iter.next();
if (item.isFormField()) {
String fieldName = item.getFieldName();
String fieldValue = item.getString();
fileDetails.put("fileName",item.getString());
else {
fileDetails.put("path",item.getName());
cfile=new File(item.getName());
onlyFileName = cfile.getName();
if (! folder.exists()) folder.mkdirs();
if(cfile.exists()){ //THIS CHECK THE FILE EXISTENCE. HOW CAN I DISPLAY ALERT MESSAGE TO USER HERE.
System.out.println("File Already Exists Path is ");
Can anyone suggest me on this.It won't work like that because JavaScript will run either before the form is submitted or after the page has been generated. In either case, you can't really communicate between the server side code and client side code.
What you can do is use Ajax to communicate with a servlet that checks for the duplicate file and responds accordingly. You can then perform the appropriate action on the page. This should be very simple to setup, take a look at this basic tutorial [1].
[1] http://www.w3schools.com/ajax/default.asp
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://www.catb.org/~esr/faqs/smart-questions.html
----------------------------------------------------------------
Maybe you are looking for
-
How can I play multiple episodes of a podcast in iTunes 11?
Hi there - I'm subscribing to a number of podcasts in iTunes 11. I would like to play multiple episodes of a podcast one after the other without having to start each one separately, and preferably without having to create a playlist each time. Any id
-
Rendering of bug report broken
Hi I just reported http://scn.sap.com/thread/3583863 I also got IE10 installed by SAP IT today ,see Now, the rendering of Tiny Link to SCN Wiki pages can not be used from non-SAP networks looks bad , e.g.
-
Counting Lines/Char/Words in a txt file
I created this method that counts the mount of lines/words/ and char in a file. But for somereason, its not working correctly. Its giving me numbers that are a little off. // Method countLineWordChar counts the number of lines, words, and chars,
-
Hi, i have installed oemgc in linux platform.while starting up gc from startup the oracle management server is showing status as failed.It was working fine till there was a reboot.All the other services are working.I have the db in the same server wh
-
Safari won't let me log into ATT wireless on my iMac
I can get through on windows explorer but not safari. It goes into a loop. My # is already in the wireless box and I add password and it thinks for a minute and then returns with an error message to add phone number? any help would be welcome