Hi All,
In form grid I have record. for example 2 lines are there as below
And One Print buton is there to print the report based on current record selection.
I mean If I select the 1st record , it should print the first record only. I mean 04/19/2023
If i select the 2nd record, it should print the second record only . I mean 05/08/2023
for this I need to get Recid of active record.
Kindly let me know how will I pass Recid of active record in Controller class and then in RDP class.
Please give me more shed on this.
thanks!
No Mohit, I already replied
Hi Mohit & Girish
I debugged the below code
It not getting in to the if condition.
Pls give me more shed on this.
thanks!
No, it won't be because of that, Are you getting buffer in custInvoiceDuplicateTable in prePromtModifyContract method?
Hi Mohit,
I tested with 1st record but got the RecId = 0
Is it because of I not declared recId as public?
Or any other reasons?
pls give me more shed on this.
thanks!
Yes, Public RecId parmRecId will be at top of your extension class.
you mean to say
RecId recId;
recId = contract.parmRecId();
is it correct?
Hi Mohit,
this.parmRecid = contract.parmRecId();
I am not getting this.parmRecId.
pls give me more shed on this.
thanks!
Hi, You don't need to do anything in main method as you are getting RecId in prePromptModifyContract. Create Coc for processReport method for SalesInvoiceDP class and try adding below code and check if you are getting Recid in DP class.
public RecId parmRecId; //Global variable public void processReport() { this.parmRecid = contract.parmRecId(); next processReport(); }
Hi Girish,
Contarct class
[ExtensionOf(classStr(SalesInvoiceContract))] final class SalesInvoiceContarct_Extension { public IdentifierName callerName; public RecId recId; [DataMemberAttribute('Callerselection')] // Use this parm method to get the caller menu item name. public IdentifierName parmCallerName(IdentifierName _callerName = callerName) { callerName = _callerName; return callerName; } [DataMemberAttribute('RecId')] // Use this parm method to get the recId public RecId parmRecId(RecId _recId = recId) { recId = _RecId; return recId; } }
Controller class
protected void prePromptModifyContract() { SalesInvoiceContract contract = this.parmReportContract().parmRdpContract(); contract.parmCallerName(this.parmArgs().parm()); if(this.parmArgs().dataset() == tableNum(CustInvoiceDuplicateTable_W)) { CustInvoiceDuplicateTable_W custInvoiceDuplicateTable = this.parmArgs().record() as CustInvoiceDuplicateTable_W; contract.parmRecId(custInvoiceDuplicateTable.RecId); } next prePromptModifyContract(); }
Kindly let me know what to do now in main method in controller class?
Pls give me more shed on this.
thanks!
Thanks Girish,
Actually I tried yesterday and got an error in parm method for recid while posted this. Most probably [datamemberattributes('Recid')]
Kindly send me the code of parmrecid method and in main method what to do.
Pls give me more shed on this
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156