ccsnewbie
|
Posted: 01/05/2006, 2:20 AM |
|
Hi All,
I'm new to Java and CCS. I'm trying to do the following: when the user submits a record, I'd like to create an additional record in a different table, to link the just created record to something else. For this, I would need to get the newly created PK value for the record.
Two questions:
It seems that this code should go to the afterExecuteInsert event. This event has one parameter, which is DataObjectEvent type. Where does one find the documentation for this? I couldn't find any reference to this in the CCS help.
Also, is it possible to get back the newly created PK through the DataObjectEvent object or Event Object.
I have tried all these methods, but none is work.
-afterInsert( Event e )
e.getRecord().getControl("certno").getFormattedValue();
e.getPage().getHttpPostParameter("certno");
--afterExecuteInsert(DataObject e)
String.valueOf(e.getParameter("certno").getObjectValue());
The snippet below from ccs manual also do not work .
String host = "mysmtphost.com";
String subject = "New task for you";
String body = "The following task was submitted:<br><br>" +
"Task ID:" + DBTools.dLookUp("max(task_id)", "tasks", "user_id_assign_by=" + uid, "IntranetDB") +
"<br><br>" + e.getRecord().getControl("task_desc").getFormattedValue();
Does anybody have a solution? Thank in advance, if you can share your idea with me.
|
|
|
ccsnewbie
|
Posted: 01/06/2006, 1:59 AM |
|
My mistake,it is all about upper/lower case of variable.
I have fixed by myself.
|
|
|
ccsnewbie
|
Posted: 01/06/2006, 1:59 AM |
|
My mistake,it is all about upper/lower case of variable.
I have fixed by myself.
|
|
|
|