How to get record data passed from other form with args

Hello. Im trying to get data that is passed by args from main form but I don't know how to do it. My code just always pass as true and send me back no values with info.

Can anyone tell me what is wrong here ? 

[ExtensionOf(formdatasourcestr(ProdParmReportFinished, ProdParmReportFinished))]
final class ProdParmReportFinishedStatus_Extension
{
    public int active()
    {
        int ret;
        next Active();
        Args args = new args("ProdTable");
        ProdTable prodtable;
        ProdTable argProdTable;
        ;

        select ProdTable;
        args.record(ProdTable);
        ;
        if (args.record() && args.dataset() == tableNum(ProdTable))
        {
            argProdTable = args.record();
        }
        if(argProdTable.Prodid == argProdTable.CollectRefProdId
                 && argProdTable.ProdStatus != ProdStatus::ReportedFinished
                 && argProdTable.ProdId != null)
        {
            select firstonly RecId,ProdId from ProdTable where
                      ProdTable.CollectRefProdId == argProdTable.ProdId
                      && ProdTable.Prodstatus != ProdStatus::ReportedFinished
                      && argProdTable.RecId != prodtable.RecId;
                
            {
                info(strFmt("%1 , %2, %3, %4",
                argProdTable.prodid, argProdTable.CollectRefProdId, argProdTable.InventRefType, argProdTable.ProdStatus));
                //Ok.enabled(false);
                   
            }
        }
        else
        {
            warning('asasas');
            info(strFmt("%1 , %2, %3, %4",
                argProdTable.prodid, argProdTable.CollectRefProdId, argProdTable.InventRefType, argProdTable.ProdStatus));
        }
        
        return ret;
    
    }

}

Related
Recommended