Hello,
try to insert your code in the validate-method or in the modified-method of
the datasource-field.
using a lookup doesn't fire the modified-event on the formcontrols !
bxe,
SebDra
-----Original Message-----
From: Irving [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 07, 2004 4:30 PM
To: [EMAIL PROTECTED]
Subject: [development-axapta] Form lookup for date result in error
In SalesTable I have a date field 'Delivery Date'. Whenever the user changes
the date, I have to update a new logtable If the user agrees to that.
Modified på control 'SalesTable_DeliveryDate':
public boolean modified()
boolean ret;
SalesLine salesLine;
;
ret = super();
if (ret)
{
if (Box::okCancel("Skal leveringsdato rettes på alle linier",
DialogButton::Ok) == DialogButton::Ok)
{
ttsbegin;
while select forupdate salesline
where salesline.SalesId == SalesTable.SalesId
{
salesLine.ConfirmedDlv = SalesTable.DeliveryDate;
salesLine.update();
newLogTable::CreateLogRecord();
}
ttscommit;
}
}
return ret;
Whenever I use the lookup control, it runs the method modified twice, and
thereby generates two log records. If I enter a new date manually using my
keyboard, it runs the method modified one time and thereby generates one log
record.
How do I solve this problem? I only want one log record no matter how I
enter the new date.
--
-
Dipl.Ing. (BA) Sebastian Draese
[EMAIL PROTECTED]
[EMAIL PROTECTED]
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++
Yahoo! Groups Sponsor |
Get unlimited calls to U.S./Canada |
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.