Thursday, June 19, 2014

Enterprise portal common methods

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);
                }





No comments:

Post a Comment