Skip to main content

Posts

Showing posts from August, 2016

Business connector error On EP page Deployment in Axapta

Error Description: While deploying EP page form Ax AOT getting business connector error. Error  “The Web Part page  was not created correctly on the site. No .NET Business Connector session could be found.” Session Release for Microsoft Dynamics failed. No .NET Business Connector session could be found. Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.NoKernelSessionException at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.get_AxaptaAdapter() at Microsoft.Dynamics.Framework.Portal.AxWebSession.WebSessionClientRemove() at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.Release(ICacheContext context) Session log on for Microsoft Dynamics failed. Dynamics Adapter LogonAs failed. Microsoft.Dynamics.Framework.BusinessConnector.Session.Exceptions.FatalSessionException at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsSession.HandleException(String message, Exception ex

Split Email by delimiter in axapta

To Split Email by delimiter in axapta you can try below code #define.EmailDelimiter(",") List list; str _emailIdList; container sendList; ListIterator iterator; boolean valid; ; _emailIdList = "test@gmail.com,test1@gmail.com,test2@gmail.com,test3@gmail.com,test4@gmail.com"; valid = true; list = new List(Types::String); list = Global::strSplit(_emailIdList, #EmailDelimiter); iterator = new ListIterator(list); while(iterator.more()) { info(strfmt("%1",iterator.value())); sendList += iterator.value(); iterator.next(); } Strsplit used to split the email list you can try and special character to check it.

split datetime in hour minutes second in different timezone in ax 2012

This is the example to  split datetime in hour minutes second in different timezone in ax 2012. TransDateTime myDateTime=DateTimeUtil::applyTimeZoneOffset(DateTimeUtil::getSystemDateTime(),Timezone::GMTPLUS0300KUWAIT_RIYADH); int hours; int minutes; int seconds; ; info(datetime2str(myDateTime)); hours=DateTimeUtil::hour(myDateTime); minutes=DateTimeUtil::minute(myDateTime); seconds=DateTimeUtil::second(myDateTime); info(strfmt('Hours %1 - Minutes %2 - Seconds %3',int2str(hours),int2str(minutes),int2str(seconds))); To get different timezone like GMT,India etc you can get from below screen.

How to get Enum value in String for Query base view in Axapta

To get Enum value in String for Query base view in Axapta 2012 you can try below code sample for your method. Here example will return label enum value you can use for name also. public static server str ItemType() { tableName viewName = identifierStr(ViewName); DictEnum dictEnum = new DictEnum(enumNum(ItemType)); Map enumValues = new Map(Types::String, Types::String); int n; for (n = 0; n < dictEnum.values(); n++) { enumValues.insert(int2str(dictEnum.index2Value(n)),SysComputedColumn::returnLiteral(dictEnum.index2Label(n))); } return SysComputedColumn::switch( SysComputedColumn::returnField(viewName, identifierStr(InventTable_1), fieldStr(InventTable, ItemType)), enumValues, SysComputedColumn::returnLiteral(dictEnum.index2Symbol(n))); }