Copy field from salesparmline to custconfirmjour on order confirmation.

I am added new amount field in sales parm line how to get the custconfirmjour give me suggestion.

It is the header table and you can have multiple sales parm lines under the same confirmatoin header. In that case, from which parm line you want to update the field on CustConfirmJour.

currently created data i want to update sir.

Sir, I am written code in saleconfirmjournalcreate/Create journalheader ,

custconfirmjour.amount = salesparmline.amount;

but its not getting data.

I am not sure if you understood my last comment. There can be multiple parm Lines for a single custconfirmjour. What do you want to do in that case?

sir,multiple lines data.

You mean sum of the amounts from salesParmLines related to that confirmation?

yes sir.

select sum(Amount) from salesParmLine
where salesParmLine.ParmId == salesParmTable.ParmId
&& salesParmLine.TableRefId == salesParmTable.TableRefId;

custConfirmJour.amount = salesParmLine.Amount;

sir , I got one Doubt . I am added string field in salesparmline , wt i have to do sir.

You should have explained it initially. Please try to provide enough information in the description.

I am add string field (name) in salesparmline line , same process how to get the data in custconfirmjour form .

Do you mean amount in words? If so use numeralsToTxt methods. \Classes\Global\numeralsToTxt

no sir. Iam added string field, EX: custConfirmJour.name= salesParmLine.name;

You can get the salesParmLine record from which you want to update the name.

The below example gives you the name from first salesParmLine record.

select firstOnly Name from salesParmLine
where salesParmLine.ParmId == salesParmTable.ParmId
&& salesParmLine.TableRefId == salesParmTable.TableRefId

&& salesParmLine.Name != “”;

sir , I am put the debugger in code. It is came name properly. when I am opening the salesorderconfirmations .it is not coming.

Can you show the final code and in which method you have written it?

Sir, I am written code in saleconfirmjournalcreate/Create journalheader .

If possible show the code.

select firstOnly salesordername from salesParmLine
where salesParmLine.ParmId == salesParmTable.ParmId
&& salesParmLine.TableRefId == salesParmTable.TableRefId

&& salesParmLine.salesordername != “”;

custConfirmJour.salesordername = salesParmLine.salesordername ;

Sir, I am written code in saleconfirmjournalcreate/Create journalheader