Via SessionNavigate
Setup data transfer object [Optional Step]
Call ‘SessionNavigate’ method and pass form/window name
SalArray<SalString> sArray = new SalArray<SalString>();
SalArray<SalWindowHandle> hWndArray = new SalArray<SalWindowHandle>();
sArray[0] = "EMP_NO";
hWndArray[0] = this.colsEmpNo;
sArray[1] = "COMPANY_ID";
hWndArray[1] = this.colsCompanyId;
Ifs.Fnd.ApplicationForms.Var.DataTransfer.Init("CompanyPerson", Sys.hWndForm, sArray, hWndArray);
SessionNavigate("frmTabCompanyPers");
How to catch DATA TRANSFER
public override SalNumber vrtActivate(fcURL URL)
{
#region Local Variables
SalArray<SalString> sQuotationNo = new SalArray<SalString>();
SalString sWhere = "";
#endregion
#region Actions
using (new SalContext(this))
{
if (Ifs.Fnd.ApplicationForms.Var.DataTransfer.SourceNameGet() == "OrderQuotation")
{
Sal.WaitCursor(true);
Ifs.Fnd.ApplicationForms.Var.DataTransfer.ItemGet("QUOTATION_NO", sQuotationNo);
sWhere = "QUOTATION_NO = '" + sQuotationNo[0] + "'";
Sal.SendMsg(frmCalculatedSalesPromotionDealQuotation.FromHandle(i_hWndFrame).tblTopTable, Ifs.Fnd.ApplicationForms.Const.PM_DataSourceUserWhere, Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, sWhere.ToHandle());
Sal.SendMsg(frmCalculatedSalesPromotionDealQuotation.FromHandle(i_hWndFrame).tblTopTable, Ifs.Fnd.ApplicationForms.Const.PM_DataSourcePopulate, Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, 0);
Sal.SendMsg(frmCalculatedSalesPromotionDealQuotation.FromHandle(i_hWndFrame).tblBottomTable, Ifs.Fnd.ApplicationForms.Const.PM_DataSourcePopulate, Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, Ifs.Fnd.ApplicationForms.Const.POPULATE_KeepFocus);
Ifs.Fnd.ApplicationForms.Var.DataTransfer.Reset();
Sal.WaitCursor(false);
}
Sal.WaitCursor(false);
}
return base.Activate(URL);
#endregion
}
Via DataSourceCreateWindow Message
Call ‘PM_DataSourceCreateWindow’ in a ‘Sal.SendMsg’
Sal.SendMsg(Sys.hWndForm, Ifs.Fnd.ApplicationForms.Const.PM_DataSourceCreateWindow, Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, ((SalString)"frmTabCompanyPers").ToHandle());
Ifs.Fnd.ApplicationForms.Int.PostMessage(this, Ifs.Fnd.ApplicationForms.Const.PM_DataSourceCreateWindow, Ifs.Fnd.ApplicationForms.Const.METHOD_Execute, Pal.GetActiveInstanceName("frmShipment"));
Via URL
Setup data transfer object [Optional Step]
Construct a new URL
Add required attributes [Optional Step]
Set ‘ProgId’ to the form/window name
Then call ‘Go()’ of the URL
sGlobalCompany = this.colsCompanyId.Text;
SalString sURL = Sal.NumberToHString(i_hWndFrame.SendMessage(Ifs.Fnd.ApplicationForms.Const.PM_DataSourceConstructBaseURL, 0, 0));
if (sURL != Ifs.Fnd.ApplicationForms.Const.strNULL)
{
fcURL URL = new fcURL(sURL);
URL.iParameters.SetAttribute("COMPANY", sGlobalCompany);
URL.SetProgId("frmTabCompanyPers");
URL.Go();
}
Navigate to Feature Form (ifswin)
private void menuFrmMethods_menuDE03799_Test_Execute(object sender, FndCommandExecuteEventArgs e)
{
iURL.SetProtocol("ifswin");
iURL.SetProgId("Ifs.Application.QuickReporting.QuickReportDetail");
iURL.iParameters.SetAttribute("action", "get");
iURL.iParameters.SetAttribute("key1", "528701");
iURL.Go();
}
Related Link:
Comments