CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 How can I retrieve form field's value in afterInsert or afterExecuteInsert custom code?

Print topic Send  topic

Author Message
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.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.