List Info

Thread: setCursor with formRun use...




setCursor with formRun use...
country flaguser name
United States
2008-03-13 06:02:15

Hi everybody,

Would you please help me to display a form (called from a
method 'clicked') with good parameters ? I explain there what I'm doing.

On a "clicked" method, I create a new Activity in my Axapta, where data
are read from a mySql database. I put the data in a temporary Table I
created --> all data I want are in the "choix" Table.

At the end of my method, I want the user to see the Activity I just
created by displaying the "smmActivities" Form. To do this, I used
formRun, and init(), run() and wait() methods.
Unfortunately, it opens "smmActivities" from my account, so I see *my*
activities, and not the User ones.

How can I display the User activities, and point to the activity I just
created ?

Here's some of my method's code :

[code]
void clicked()
{
NOVReportTempoTable choix;
smmActivities activite;
formRun fr;
Args a = new Args(";smmActivities");

choix = NOVReportTempoTable_DS.cursor();

if(choix.id_reporting != 0)
{ super();

LP = new LoginProperty();

//[...] some LP access to my mySql database and some request on it

ttsbegin;

activite.initValue();

activite.ResponsibleEmployee = choix.axapta;
activite.UserMemo = choix.commentaire;

NOVReportTempoTable_DS.delete();
activite.insert();
ttsCommit;

// Ok, all I wanted to do is done,
// Now I want the User to be happy and see the Activity form
fr = new formRun(a);
fr.init();
fr.run();
fr.wait();
// Unfortunately, he doesn't see the activity I created. I wanted
to request to choix.axapta ResponsibleEmployee's field,
// and point the cursor to activite.ActivityNumber...
}

else
{infolog.add(1,";Pas de ligne sélectionnée");}

}
[/code]

__._,_.___
.

__,_._,___
Re: setCursor with formRun use...
country flaguser name
United States
2008-03-18 03:22:48

Hi everybody

I up the topic. May be i've been misunderstood somewhere.
To make it brief, I just want to pass current "cursor" in a different
form calling (assuming there relations between the form and the
current form).

Thanks in advance for your help,

Stephane.

--- In development-axapta%40yahoogroups.com">development-axaptayahoogroups.com, "slaulhere"
<slaulhere...> wrote:
&gt;
> Hi everybody,
>
> Would you please help me to display a form (called from a
> method 'clicked') with good parameters ? I explain there what I'm
doing.
>
> On a "clicked" method, I create a new Activity in my Axapta, where
data
> are read from a mySql database. I put the data in a temporary Table
I
> created --> all data I want are in the "choix" Table.
&gt;
> At the end of my method, I want the user to see the Activity I just
> created by displaying the "smmActivities&quot; Form. To do this, I used
> formRun, and init(), run() and wait() methods.
> Unfortunately, it opens "smmActivities&quot; from my account, so I see
*my*
> activities, and not the User ones.
&gt;
> How can I display the User activities, and point to the activity I
just
> created ?
>
> Here's some of my method's code :
>
> [code]
&gt; void clicked()
> {
> NOVReportTempoTable choix;
&gt; smmActivities activite;
> formRun fr;
> Args a = new Args(";smmActivities");
>
> choix = NOVReportTempoTable_DS.cursor();
>
> if(choix.id_reporting != 0)
> { super();
>
>
> LP = new LoginProperty();
&gt;
> //[...] some LP access to my mySql database and some request on
it
&gt;
> ttsbegin;
>
> activite.initValue();
>
> activite.ResponsibleEmployee = choix.axapta;
> activite.UserMemo = choix.commentaire;
>
>
> NOVReportTempoTable_DS.delete();
> activite.insert();
> ttsCommit;
>
> // Ok, all I wanted to do is done,
&gt; // Now I want the User to be happy and see the Activity form
>; fr = new formRun(a);
> fr.init();
> fr.run();
> fr.wait();
> // Unfortunately, he doesn't see the activity I created. I
wanted
> to request to choix.axapta ResponsibleEmployee's field,
> // and point the cursor to activite.ActivityNumber...
&gt; }
>
> else
>; {infolog.add(1,";Pas de ligne sélectionnée");}
>
> }
> [/code]
>

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )