Fields are getting the value on click not updating by itself or at opening of form.

Hi All,

In a Form SalesEditLines i have code in Active method of Table SalesParmLine for updating some fields and my code is working fine that fields are getting updated but the problem is that only the first line is showing as updated and remaining lines are showing updated when i am clicking the line one by one…

Please help me correct this.

Thanks & Regards

Vijay Raj Nath

That sounds like the expected behavior - active() is called when activate an individual record. It seems that you want something else than active() - could you please tell us what you’re trying to achieve?

Hi Martin,

Thanks for your soon reply.

I’m trying that i have created some new fields in the SalesParmLine Table and these fields are entered at the time of Sales Packing Slip Posting. and now when i am doing the Sales Invoice Posting then these fields value entered at the time of Sales Packing Slip posting should be come automatic in the ParmEditLines Form at the time of Sales Invoice Posting . so for that purpose i code in the active method of Table SalesParmLine like-

if(documentStatus == DocumentStatus::Invoice)

{

select RecId from _salesLine where _salesLine.RecId == SalesParmLine.SalesLineRecId;

select CSL_FromCrates,CSL_ToCrates,CSL_NoOfCrates,CSL_Marks from _SalesParmLine

join _salesParmTable

where _salesParmTable.ParmId == _SalesParmLine.parmid

&& _salesParmTable.TableRefId == _SalesParmLine.TableRefId

&& _salesParmTable.ParmJobStatus == ParmJobStatus::Executed

&& _salesParmTable.Ordering == DocumentStatus::PackingSlip

&& _SalesParmLine.SalesLineRecId == _salesLine.RecId;

SalesParmLine.CSL_FromCrates = _SalesParmLine.CSL_FromCrates;

SalesParmLine.CSL_Marks = _SalesParmLine.CSL_Marks;

SalesParmLine.CSL_NoOfCrates = _SalesParmLine.CSL_NoOfCrates;

SalesParmLine.CSL_ToCrates = _SalesParmLine.CSL_ToCrates;

SalesParmLine_ds.refresh();

}

by this code the value is coming fine but i have to click all the lines one by one then its coming.

we don’t want to click the line so please how to resolve it.

Thanks & Regards

Vijay Raj Nath

Hi Martin,

Thanks for your co-ordination.

Now i got it resolved. i written the code in the InitfromSalesLine method of Table SalesParmLine. and now it is updating well.

Thanks & Regards

Vijay Raj Nath