[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

display Sales order number in the Grid

Raj

2/3/2006 11:26:00 AM

Hi,
In ReqtransPO form in the overview tab, i have to display a new column
Called Sales order number from the table reqtrans, i cannot fetch the
salesorder number directly from the table we can find the Salesorder number
only throught a reference field.

I have written a view which takes the item number and qty as parameter and
gives me a recid, using the recid i can find the sales order number.

what i want to know you is where the method to fetch the salesorder should
be written , as the sales order number should be loaded along with other data
when the form is loaded.

thanks in advance

RR

8 Answers

koffidan

2/3/2006 12:44:00 PM

0

I would create a display method on the Table or datasource of the form and
put this display method on the design of the form.

In the display method I would lookup the SalesId and then display it. Try to
look at the form Currency, method exchangetext.

Regards
--
Koffidan

http://ww...



"Raj" wrote:

> Hi,
> In ReqtransPO form in the overview tab, i have to display a new column
> Called Sales order number from the table reqtrans, i cannot fetch the
> salesorder number directly from the table we can find the Salesorder number
> only throught a reference field.
>
> I have written a view which takes the item number and qty as parameter and
> gives me a recid, using the recid i can find the sales order number.
>
> what i want to know you is where the method to fetch the salesorder should
> be written , as the sales order number should be loaded along with other data
> when the form is loaded.
>
> thanks in advance
>
> RR
>

Raj

2/6/2006 3:01:00 AM

0

Hi,
The Grid's data Source is REQPO table, but the Field Saleid Which iam
trying to display in the grid is from REQPOTRANS table. I want the Sales id
to be displayed along with the other data in the grid .

I saw the Example of Currency Form , there on selection of a row from the
Grid the text is displayed in the text box below.

but in my case i should load the sales id in the same grid along with other
data.

Can u suggest me some method of doing it , if you any sample code can you
please pass it on.

thanks in advance.

rr



"koffidan" wrote:

> I would create a display method on the Table or datasource of the form and
> put this display method on the design of the form.
>
> In the display method I would lookup the SalesId and then display it. Try to
> look at the form Currency, method exchangetext.
>
> Regards
> --
> Koffidan
>
> http://ww...
>
>
>
> "Raj" wrote:
>
> > Hi,
> > In ReqtransPO form in the overview tab, i have to display a new column
> > Called Sales order number from the table reqtrans, i cannot fetch the
> > salesorder number directly from the table we can find the Salesorder number
> > only throught a reference field.
> >
> > I have written a view which takes the item number and qty as parameter and
> > gives me a recid, using the recid i can find the sales order number.
> >
> > what i want to know you is where the method to fetch the salesorder should
> > be written , as the sales order number should be loaded along with other data
> > when the form is loaded.
> >
> > thanks in advance
> >
> > RR
> >

koffidan

2/6/2006 9:50:00 AM

0

Hi

Create method on the datasource ReqPO:

display SalesId getSalesId(ReqPO _reqPO)
{
SalesId salesId;
;

return _reqPO.reqTrans().salesId;
}

I didn't check if ReqTrans has a field called salesId, but anyway the method
should be the basic.
Drag and drop the method on the Grid.

Regards
--
Koffidan

http://ww...



"Raj" wrote:

> Hi,
> The Grid's data Source is REQPO table, but the Field Saleid Which iam
> trying to display in the grid is from REQPOTRANS table. I want the Sales id
> to be displayed along with the other data in the grid .
>
> I saw the Example of Currency Form , there on selection of a row from the
> Grid the text is displayed in the text box below.
>
> but in my case i should load the sales id in the same grid along with other
> data.
>
> Can u suggest me some method of doing it , if you any sample code can you
> please pass it on.
>
> thanks in advance.
>
> rr
>
>
>
> "koffidan" wrote:
>
> > I would create a display method on the Table or datasource of the form and
> > put this display method on the design of the form.
> >
> > In the display method I would lookup the SalesId and then display it. Try to
> > look at the form Currency, method exchangetext.
> >
> > Regards
> > --
> > Koffidan
> >
> > http://ww...
> >
> >
> >
> > "Raj" wrote:
> >
> > > Hi,
> > > In ReqtransPO form in the overview tab, i have to display a new column
> > > Called Sales order number from the table reqtrans, i cannot fetch the
> > > salesorder number directly from the table we can find the Salesorder number
> > > only throught a reference field.
> > >
> > > I have written a view which takes the item number and qty as parameter and
> > > gives me a recid, using the recid i can find the sales order number.
> > >
> > > what i want to know you is where the method to fetch the salesorder should
> > > be written , as the sales order number should be loaded along with other data
> > > when the form is loaded.
> > >
> > > thanks in advance
> > >
> > > RR
> > >

Raj

2/7/2006 1:56:00 AM

0

Hi,
Thanks for the help, the problem is not simple , actually there is no
field called Salesid in reqtrans table. i have to do some quries to arrive at
the refid which is the Sales order number.
this is the query which iam using to arrive at the sale order number which
is the refid in the Reqtrans table.

Select refid,itemid from reqpo
where itemid = '0001AAAX'
and qty = 1

Select recid,itemid,refid from reqtrans
where itemid ='0001AAAX'
and ltrim(Refid) like 'MPP-1001082'

Select issuerecid from reqtranscov
where ReceiptRecId = 21624334


Select refid from reqtrans
where RecId = 21620494

do you have any code to achive this, for each item in the grid this process
has to be done and if there is a refid for the item then it has to be
displayed in the grid along with the item number.

thanks in advance.

rr

"koffidan" wrote:

> Hi
>
> Create method on the datasource ReqPO:
>
> display SalesId getSalesId(ReqPO _reqPO)
> {
> SalesId salesId;
> ;
>
> return _reqPO.reqTrans().salesId;
> }
>
> I didn't check if ReqTrans has a field called salesId, but anyway the method
> should be the basic.
> Drag and drop the method on the Grid.
>
> Regards
> --
> Koffidan
>
> http://ww...
>
>
>
> "Raj" wrote:
>
> > Hi,
> > The Grid's data Source is REQPO table, but the Field Saleid Which iam
> > trying to display in the grid is from REQPOTRANS table. I want the Sales id
> > to be displayed along with the other data in the grid .
> >
> > I saw the Example of Currency Form , there on selection of a row from the
> > Grid the text is displayed in the text box below.
> >
> > but in my case i should load the sales id in the same grid along with other
> > data.
> >
> > Can u suggest me some method of doing it , if you any sample code can you
> > please pass it on.
> >
> > thanks in advance.
> >
> > rr
> >
> >
> >
> > "koffidan" wrote:
> >
> > > I would create a display method on the Table or datasource of the form and
> > > put this display method on the design of the form.
> > >
> > > In the display method I would lookup the SalesId and then display it. Try to
> > > look at the form Currency, method exchangetext.
> > >
> > > Regards
> > > --
> > > Koffidan
> > >
> > > http://ww...
> > >
> > >
> > >
> > > "Raj" wrote:
> > >
> > > > Hi,
> > > > In ReqtransPO form in the overview tab, i have to display a new column
> > > > Called Sales order number from the table reqtrans, i cannot fetch the
> > > > salesorder number directly from the table we can find the Salesorder number
> > > > only throught a reference field.
> > > >
> > > > I have written a view which takes the item number and qty as parameter and
> > > > gives me a recid, using the recid i can find the sales order number.
> > > >
> > > > what i want to know you is where the method to fetch the salesorder should
> > > > be written , as the sales order number should be loaded along with other data
> > > > when the form is loaded.
> > > >
> > > > thanks in advance
> > > >
> > > > RR
> > > >

koffidan

2/7/2006 8:15:00 AM

0

Hi

I'm sorry to say that I don't understand your queries. But usually you will
never use 'hardcoded' values as '0001AAAX' in a query.

I have looked at table ReqPO and ReqTrans, it looks like you got RefType and
RefId on the table ReqTrans, so why do you need reqTrans and the queries?

I would suggest something like:
display SalesId getSalesId(ReqPO _reqPO)
{
SalesId salesId;
;

if (_reqPO.RefType == ReqRefType::Sales)
{
salesId = _reqPO.RefId;
}

return salesId;
}

I might have overlooked something, I don't usually work in this area of
Axapta.

Regards
--
Koffidan

http://ww...



"Raj" wrote:

> Hi,
> Thanks for the help, the problem is not simple , actually there is no
> field called Salesid in reqtrans table. i have to do some quries to arrive at
> the refid which is the Sales order number.
> this is the query which iam using to arrive at the sale order number which
> is the refid in the Reqtrans table.
>
> Select refid,itemid from reqpo
> where itemid = '0001AAAX'
> and qty = 1
>
> Select recid,itemid,refid from reqtrans
> where itemid ='0001AAAX'
> and ltrim(Refid) like 'MPP-1001082'
>
> Select issuerecid from reqtranscov
> where ReceiptRecId = 21624334
>
>
> Select refid from reqtrans
> where RecId = 21620494
>
> do you have any code to achive this, for each item in the grid this process
> has to be done and if there is a refid for the item then it has to be
> displayed in the grid along with the item number.
>
> thanks in advance.
>
> rr
>
> "koffidan" wrote:
>
> > Hi
> >
> > Create method on the datasource ReqPO:
> >
> > display SalesId getSalesId(ReqPO _reqPO)
> > {
> > SalesId salesId;
> > ;
> >
> > return _reqPO.reqTrans().salesId;
> > }
> >
> > I didn't check if ReqTrans has a field called salesId, but anyway the method
> > should be the basic.
> > Drag and drop the method on the Grid.
> >
> > Regards
> > --
> > Koffidan
> >
> > http://ww...
> >
> >
> >
> > "Raj" wrote:
> >
> > > Hi,
> > > The Grid's data Source is REQPO table, but the Field Saleid Which iam
> > > trying to display in the grid is from REQPOTRANS table. I want the Sales id
> > > to be displayed along with the other data in the grid .
> > >
> > > I saw the Example of Currency Form , there on selection of a row from the
> > > Grid the text is displayed in the text box below.
> > >
> > > but in my case i should load the sales id in the same grid along with other
> > > data.
> > >
> > > Can u suggest me some method of doing it , if you any sample code can you
> > > please pass it on.
> > >
> > > thanks in advance.
> > >
> > > rr
> > >
> > >
> > >
> > > "koffidan" wrote:
> > >
> > > > I would create a display method on the Table or datasource of the form and
> > > > put this display method on the design of the form.
> > > >
> > > > In the display method I would lookup the SalesId and then display it. Try to
> > > > look at the form Currency, method exchangetext.
> > > >
> > > > Regards
> > > > --
> > > > Koffidan
> > > >
> > > > http://ww...
> > > >
> > > >
> > > >
> > > > "Raj" wrote:
> > > >
> > > > > Hi,
> > > > > In ReqtransPO form in the overview tab, i have to display a new column
> > > > > Called Sales order number from the table reqtrans, i cannot fetch the
> > > > > salesorder number directly from the table we can find the Salesorder number
> > > > > only throught a reference field.
> > > > >
> > > > > I have written a view which takes the item number and qty as parameter and
> > > > > gives me a recid, using the recid i can find the sales order number.
> > > > >
> > > > > what i want to know you is where the method to fetch the salesorder should
> > > > > be written , as the sales order number should be loaded along with other data
> > > > > when the form is loaded.
> > > > >
> > > > > thanks in advance
> > > > >
> > > > > RR
> > > > >

Raj

2/7/2006 9:00:00 AM

0

Hi,
Thanks for the quick response. well the queries which i have sent in
my previous mail is only for sample, just to explain how i arraive at the
Salesorder number which is the reference field in the reqtrans table.

I wrote a method on the repo table which call the method on reqtrans and
returns the refid. well it works fine now.

thanks for the help. one more question is it possible to filter the grid
based on the fields from the methods.

rr



"koffidan" wrote:

> Hi
>
> I'm sorry to say that I don't understand your queries. But usually you will
> never use 'hardcoded' values as '0001AAAX' in a query.
>
> I have looked at table ReqPO and ReqTrans, it looks like you got RefType and
> RefId on the table ReqTrans, so why do you need reqTrans and the queries?
>
> I would suggest something like:
> display SalesId getSalesId(ReqPO _reqPO)
> {
> SalesId salesId;
> ;
>
> if (_reqPO.RefType == ReqRefType::Sales)
> {
> salesId = _reqPO.RefId;
> }
>
> return salesId;
> }
>
> I might have overlooked something, I don't usually work in this area of
> Axapta.
>
> Regards
> --
> Koffidan
>
> http://ww...
>
>
>
> "Raj" wrote:
>
> > Hi,
> > Thanks for the help, the problem is not simple , actually there is no
> > field called Salesid in reqtrans table. i have to do some quries to arrive at
> > the refid which is the Sales order number.
> > this is the query which iam using to arrive at the sale order number which
> > is the refid in the Reqtrans table.
> >
> > Select refid,itemid from reqpo
> > where itemid = '0001AAAX'
> > and qty = 1
> >
> > Select recid,itemid,refid from reqtrans
> > where itemid ='0001AAAX'
> > and ltrim(Refid) like 'MPP-1001082'
> >
> > Select issuerecid from reqtranscov
> > where ReceiptRecId = 21624334
> >
> >
> > Select refid from reqtrans
> > where RecId = 21620494
> >
> > do you have any code to achive this, for each item in the grid this process
> > has to be done and if there is a refid for the item then it has to be
> > displayed in the grid along with the item number.
> >
> > thanks in advance.
> >
> > rr
> >
> > "koffidan" wrote:
> >
> > > Hi
> > >
> > > Create method on the datasource ReqPO:
> > >
> > > display SalesId getSalesId(ReqPO _reqPO)
> > > {
> > > SalesId salesId;
> > > ;
> > >
> > > return _reqPO.reqTrans().salesId;
> > > }
> > >
> > > I didn't check if ReqTrans has a field called salesId, but anyway the method
> > > should be the basic.
> > > Drag and drop the method on the Grid.
> > >
> > > Regards
> > > --
> > > Koffidan
> > >
> > > http://ww...
> > >
> > >
> > >
> > > "Raj" wrote:
> > >
> > > > Hi,
> > > > The Grid's data Source is REQPO table, but the Field Saleid Which iam
> > > > trying to display in the grid is from REQPOTRANS table. I want the Sales id
> > > > to be displayed along with the other data in the grid .
> > > >
> > > > I saw the Example of Currency Form , there on selection of a row from the
> > > > Grid the text is displayed in the text box below.
> > > >
> > > > but in my case i should load the sales id in the same grid along with other
> > > > data.
> > > >
> > > > Can u suggest me some method of doing it , if you any sample code can you
> > > > please pass it on.
> > > >
> > > > thanks in advance.
> > > >
> > > > rr
> > > >
> > > >
> > > >
> > > > "koffidan" wrote:
> > > >
> > > > > I would create a display method on the Table or datasource of the form and
> > > > > put this display method on the design of the form.
> > > > >
> > > > > In the display method I would lookup the SalesId and then display it. Try to
> > > > > look at the form Currency, method exchangetext.
> > > > >
> > > > > Regards
> > > > > --
> > > > > Koffidan
> > > > >
> > > > > http://ww...
> > > > >
> > > > >
> > > > >
> > > > > "Raj" wrote:
> > > > >
> > > > > > Hi,
> > > > > > In ReqtransPO form in the overview tab, i have to display a new column
> > > > > > Called Sales order number from the table reqtrans, i cannot fetch the
> > > > > > salesorder number directly from the table we can find the Salesorder number
> > > > > > only throught a reference field.
> > > > > >
> > > > > > I have written a view which takes the item number and qty as parameter and
> > > > > > gives me a recid, using the recid i can find the sales order number.
> > > > > >
> > > > > > what i want to know you is where the method to fetch the salesorder should
> > > > > > be written , as the sales order number should be loaded along with other data
> > > > > > when the form is loaded.
> > > > > >
> > > > > > thanks in advance
> > > > > >
> > > > > > RR
> > > > > >

koffidan

2/8/2006 8:11:00 AM

0

Hi

As far as I know, you can't filter on a display method. But I might be
wrong. Sorry, I can't help you on this.

Regards
--
Koffidan

http://ww...



"Raj" wrote:

> Hi,
> Thanks for the quick response. well the queries which i have sent in
> my previous mail is only for sample, just to explain how i arraive at the
> Salesorder number which is the reference field in the reqtrans table.
>
> I wrote a method on the repo table which call the method on reqtrans and
> returns the refid. well it works fine now.
>
> thanks for the help. one more question is it possible to filter the grid
> based on the fields from the methods.
>
> rr
>
>
>
> "koffidan" wrote:
>
> > Hi
> >
> > I'm sorry to say that I don't understand your queries. But usually you will
> > never use 'hardcoded' values as '0001AAAX' in a query.
> >
> > I have looked at table ReqPO and ReqTrans, it looks like you got RefType and
> > RefId on the table ReqTrans, so why do you need reqTrans and the queries?
> >
> > I would suggest something like:
> > display SalesId getSalesId(ReqPO _reqPO)
> > {
> > SalesId salesId;
> > ;
> >
> > if (_reqPO.RefType == ReqRefType::Sales)
> > {
> > salesId = _reqPO.RefId;
> > }
> >
> > return salesId;
> > }
> >
> > I might have overlooked something, I don't usually work in this area of
> > Axapta.
> >
> > Regards
> > --
> > Koffidan
> >
> > http://ww...
> >
> >
> >
> > "Raj" wrote:
> >
> > > Hi,
> > > Thanks for the help, the problem is not simple , actually there is no
> > > field called Salesid in reqtrans table. i have to do some quries to arrive at
> > > the refid which is the Sales order number.
> > > this is the query which iam using to arrive at the sale order number which
> > > is the refid in the Reqtrans table.
> > >
> > > Select refid,itemid from reqpo
> > > where itemid = '0001AAAX'
> > > and qty = 1
> > >
> > > Select recid,itemid,refid from reqtrans
> > > where itemid ='0001AAAX'
> > > and ltrim(Refid) like 'MPP-1001082'
> > >
> > > Select issuerecid from reqtranscov
> > > where ReceiptRecId = 21624334
> > >
> > >
> > > Select refid from reqtrans
> > > where RecId = 21620494
> > >
> > > do you have any code to achive this, for each item in the grid this process
> > > has to be done and if there is a refid for the item then it has to be
> > > displayed in the grid along with the item number.
> > >
> > > thanks in advance.
> > >
> > > rr
> > >
> > > "koffidan" wrote:
> > >
> > > > Hi
> > > >
> > > > Create method on the datasource ReqPO:
> > > >
> > > > display SalesId getSalesId(ReqPO _reqPO)
> > > > {
> > > > SalesId salesId;
> > > > ;
> > > >
> > > > return _reqPO.reqTrans().salesId;
> > > > }
> > > >
> > > > I didn't check if ReqTrans has a field called salesId, but anyway the method
> > > > should be the basic.
> > > > Drag and drop the method on the Grid.
> > > >
> > > > Regards
> > > > --
> > > > Koffidan
> > > >
> > > > http://ww...
> > > >
> > > >
> > > >
> > > > "Raj" wrote:
> > > >
> > > > > Hi,
> > > > > The Grid's data Source is REQPO table, but the Field Saleid Which iam
> > > > > trying to display in the grid is from REQPOTRANS table. I want the Sales id
> > > > > to be displayed along with the other data in the grid .
> > > > >
> > > > > I saw the Example of Currency Form , there on selection of a row from the
> > > > > Grid the text is displayed in the text box below.
> > > > >
> > > > > but in my case i should load the sales id in the same grid along with other
> > > > > data.
> > > > >
> > > > > Can u suggest me some method of doing it , if you any sample code can you
> > > > > please pass it on.
> > > > >
> > > > > thanks in advance.
> > > > >
> > > > > rr
> > > > >
> > > > >
> > > > >
> > > > > "koffidan" wrote:
> > > > >
> > > > > > I would create a display method on the Table or datasource of the form and
> > > > > > put this display method on the design of the form.
> > > > > >
> > > > > > In the display method I would lookup the SalesId and then display it. Try to
> > > > > > look at the form Currency, method exchangetext.
> > > > > >
> > > > > > Regards
> > > > > > --
> > > > > > Koffidan
> > > > > >
> > > > > > http://ww...
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Raj" wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > > In ReqtransPO form in the overview tab, i have to display a new column
> > > > > > > Called Sales order number from the table reqtrans, i cannot fetch the
> > > > > > > salesorder number directly from the table we can find the Salesorder number
> > > > > > > only throught a reference field.
> > > > > > >
> > > > > > > I have written a view which takes the item number and qty as parameter and
> > > > > > > gives me a recid, using the recid i can find the sales order number.
> > > > > > >
> > > > > > > what i want to know you is where the method to fetch the salesorder should
> > > > > > > be written , as the sales order number should be loaded along with other data
> > > > > > > when the form is loaded.
> > > > > > >
> > > > > > > thanks in advance
> > > > > > >
> > > > > > > RR
> > > > > > >

Mike Frank

2/8/2006 12:32:00 PM

0

> As far as I know, you can't filter on a display method. But I might be
> wrong.

This is definitely true