Displaying the records in form

Hi,

I’m trying to do packing slip for gate entry form in purchtable form. When I was trying to insert records from gateentrylines table to purchparmline table, records were inserted but I couldn’t make the records to be displayed in purcheditlines form.

Kindly help me out to solve this problem. Thanks in advance.

Regards,

S.Kuppusamy

Can you elaborate?

The system will automatically inserts the records into purchParmLine and table when PurchEditLines form is opened from Purchase Order. then why you are inserting it.

Hi Kranthi,

I ve written code to insert the records into purchparmline table from gateline(user created) table. It worked out well but when I was trying to displaying the same records through purcheditline form(Purchtable->Posting->Packingslip->lines tab), it wasn’t working. Wat could be the problem? I hope you understand what I’m trying to say.

Regards,

S.Kuppusamy

Hi Kuppusamy,

How are you inserting records into PurchParmTable and PurchParmLine? Please post your code.

By default these tables are linked with PurchTable and PurchLine respectively. For example, from following methods, you can see how records are generated -

  • \Classes\PurchFormLetter\createParmTable
  • \Data Dictionary\Tables\PurchParmLine\Methods\initFromPurchLine

Best wishes,

Hi Harish MohanBabu,

This is the code I wrote at the purchparmline table.

void initfromgateline(GateEntryIdNo _gateId,PurchIdBase _purchId)
{
Gateline gateline;
GateHeader gateheader;
;

while select gateline join gateheader
where gateline.GateEntryId == _gateId
&& gateheader.OrderId == _purchId

{

this.ItemId = gateline.ItemCode;
this.OrigPurchId = gateheader.OrderId;
this.insert();

}
}

I wrote this code in the modified field of purchparmtable table.

case fieldnum(PurchParmTable, GateEntryID):

this.PurchId = GateHeader::find(this.GateEntryID).OrderId;
this.PurchName = GateHeader::find(this.GateEntryID).Name;
purchparmline.initfromgateline(this.GateEntryID,this.PurchId);

Actually What I wanna do is, When I select a GateEntryId(GateEntryId field is user created) in purcheditline form(Purchtable->Posting->Packingslip->OverView tab), the gatelines records must be inserted into purcheditline form(Purchtable->Posting->Packingslip->lines tab).

Hi Kuppusamy,

Have a look under relations in ‘PurchParmLine’ table ; to honour this, you have to populate ParmId and TableRefId fields.

From your code, it looks you are not populating these fields.

Best wishes,

Hi Harish MohanBabu,

Thank you for your kind reply. Could you be more specific about it(i.e)., How can i populate it? What are the steps to be done to get exact result what I need?

Regards,

S.Kuppusamy.

The system will automatically inserts lines into purchParmTable and purchParmLine from purchLine and purchTable during the packing slip - based on the selection of Quantity parameter - if you select registered items - only registered items will get display.

if you select All then the system picks up all the lines- so the lines are automatically getting inserted.

So rather than inserting the records - you try to delete the records created which are not entered in the gate entry form.

Hi Kuppusamy,

To populate parmId and TableRefId, the following code snippet can be used -

NumberSeq::newGetNum(CompanyInfo::numRefParmId()).num();

Best wishes,

Hi Kranthi,

Thank you for your reply. I will try it out now.

Regards,

S.Kuppusamy.

Hi Harish MohanBabu,

Thank you for your reply. I will try it out now.

Regards,

S.Kuppusamy.

hi,

i create on new “NoYes” field in PurchLine ,and also same like create in PurchParmLine,

I check(Tick the field ) the “NoYes” Filed in PO line but when i Put Product receipt In line detail ,i check the “NoYes” Field , It should not checked(No Tick),

what ever i do in Po line same will happen in PO ProductRecipt Line Details ?

Hi, Write code in purchparmline\initfrompurchline method. this.field = purchline.field; If you create the same field in vendpackingsliptrans table, write code in vendpackingsliptrans\initfrompurchline method. this.field = purchLine.field;

Hi, Kupppusamy

Thanks for ur Replay,

I tried that but it does’t reflect in “PurchEditLines Form” ,when i put PO Product Recipt

Hi, It should reflect there. Try debugging… U can also write in class PurchFormLetter/createparmline method. newPurchParmLine.field = _purchline.field

hi,

I am using Ax2012,Debugger is not reflect in PurchParmLine/InitfromPurchLine method

and

In PurchFromLetter/CreateParmline Method is not present and also i checked in override method ,

its’ not present. so…

Hi, Visit this link http://dynamicsuser.net/forums/t/56334.aspx

how can u create “CreateParmline” method in the PurchFormLetter class

Is it Override Method?

Hi,

Can you pls help me with “Gate Entry”

is this functionality updated with Ax2012 R3 or in CU 7 ??