there are many ways of refreshing the source datasource form the
destination datasource one of the way is as below
==========================
In form1 write a method
void bookrefresh()
{
form1_ds.reread();
form1_ds.refresh();
}
now in form 2
class declaration
{
object callerForm;
}
public void init()
{
super();
callerForm = element.args().caller();
}
new method
void bookrefresh()
{
if(callerform)
{
if(callerForm.name() == formStr(form1))
{
callerform.bookRefresh(); // this would run the method on form1
}
}
}
Now from the place where you want to refresh the source form just write
element.bookRefresh();
=============================================================
-----Original Message-----
From: akash malohatra [mailto:[EMAIL PROTECTED]
Sent: 13 July 2004 08:57
To: [EMAIL PROTECTED]
Subject: Re: [development-axapta] Form datasource refresh gives runtime
error
Hi,
thanks for the reply.
if i will remove the line , then it will not refresh
my Form1 , which i need.
Anyway i tried with Form1_DS.research(). did the work
for me.
just curious..whats the difference between reread and
research.... and in reread why this error comes.
Thanks
Akash
--- vinay malhotra <[EMAIL PROTECTED]> wrote:
> remove this line form1_ds.reread and then everything
> wud work perfectly.
>
> regards,
> vins
> --- akash malohatra <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I have 2 forms Form1 and form2.
> >
> > I call Form2 from Form1 . After writing some data
> in
> > Form2 , i m able to update some of the data in
> > Form1.
> >
> > Then i want to refresh the FORM1. During this i am
> > getting this error in runtime " the data has been
> > deleted by another user"
> >
> > in Form2 --> datasource --> write method i have
> this
> > code
> >
> > if(element.args().caller())
> > {
> > Form1_DS = element.args().caller().datasource();
> > if(Form1_DS)
> > {
> > Form1_DS.reread(); <--- error comes in this
> > stage
> > Form1_DS.active();
> > Form1_DS.refresh();
> > element.args().caller().redraw();
> > }
> > }
> >
> > i am just running out of idea....
> > hoping some answers....from you..guys..
> >
> > Regards
> > Akash
> >
> >
> >
> >
> >
> >
>
___________________________________________________________ALL-NEW
> > Yahoo! Messenger - sooooo many all-new ways to
> > express yourself http://uk.messenger.yahoo.com
> >
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
>
>
> Yahoo! Groups Links
>
> http://groups.yahoo.com/group/development-axapta/
>
> [EMAIL PROTECTED]
>
>
>
>
___________________________________________________________ALL-NEW Yahoo!
Messenger - sooooo many all-new ways to express yourself
http://uk.messenger.yahoo.com
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
| Yahoo! Groups Sponsor | |
|
|
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.

