Common Enterprise portal Grid methods

Common Enterprise portal Grid methods

private DataSetViewRow CurrentExpenseHeaderRow
{
get
{
DataSetView dsv = this.DS_TrvExpTable.GetDataSet().DataSetViews[“TrvExpTable”];
return (dsv == null) ? null : dsv.GetCurrent();
}
}

private IAxaptaRecordAdapter CurrentRecord
{
get
{
return (this.CurrentRow == null) ? null : this.CurrentRow.GetRecord();
}
}

private IAxaptaRecordAdapter CurrentExpenseHeaderRecord
{
get
{
return (this.CurrentExpenseHeaderRow == null) ? null : this.CurrentExpenseHeaderRow.GetRecord();
}
}

_________________________________________

Call dynamics AX dataset method in Enterprise portal

boolean isValid = ((bool)this.DS_TSTimesheetEntry.GetDataSet().DataSetRun.AxaptaObjectAdapter.Call(“validateTSTimesheetLineWrite”))

________________________________________________________________________________

How to use infolog in Enterprise portal

Proxy.Info obj = new Proxy.Info(this.AxSession.AxaptaAdapter);

obj.add(Proxy.Exception.Info, “Testing”);

________________________________________________________________________________

How to call method other Webcontrol method in Enterprise portal

TrvUtility.GetAdminCustomFieldsDictionary(this.AxSession, this.Page.Session, TrvUtility.AdminCustomFields.Transaction);

________________________________________________________________________________

How to refer / add exisitng webcontrol in your web control

Needs to write the below code in design form

<%@ Register Src=”TrvUtility.ascx” TagName=”AxUtility” TagPrefix=”AxUtil” %>

________________________________________________________________________________

How to access enum values in Enterprise portal

ApplicationProxy.TrvAppStatus approvalStatus;

approvalStatus = ((ApplicationProxy.TrvAppStatus)this.CurrentExpenseHeaderRow[“ApprovalStatus”]);

approvalStatus = ApplicationProxy.TrvAppStatus.None;
return (ApplicationProxy.TrvAppStatus)approvalStatus;

________________________________________________________________________________

compare Enum values

if ((ApplicationProxy.TrvExpType)this.CurrentRow[“ExpType”] == ApplicationProxy.TrvExpType.Hotel)
{
long recId = this.CurrentRow == null ? 0 : System.Convert.ToInt64(this.CurrentRow[“RecId”], CultureInfo.InvariantCulture);
guestsLabel = ApplicationProxy.EPTrv.getGuestLabel(recId);
}

____________________________________________________________________________