Skip to main content

Posts

 Note 2 ==== SE24 - Global class (Class and methods)  SE37 - function module - configure  SE38 - report  BAPI -  Function module  Object Type  Interface type  Form  - Flow  Form open - FP_Job_ open spool; function              LV_fm_name - cal function Job_close =============== ASN order confirmconfirmation  - VA03  FP_job_open VL02n - ASN  VF03  - Invoice document  VA02  - Sales order confirmation  Interface we cant debug - use Break-point from dev and activate then debug

SAP Info

 Hello SAP ABAP ==================== Dlv note T code .   /n/scwm/prdo how to move se63 text from EN TO PL =========================== slxt How to add SO10 Txt to TR  ====================  SE38 - >  RSTXTRAN - Execute - enter the TR then Scc1 and move from 100 to 110.  SE22 Tode is Dump error analysis 

Table field not populated with inbound XML document data in AIF Document Service in AX 2009

Issue: We had a requirement to send in a InventDimId as part of creating a Sales Order, but the InventDimId field was not being populated in AxInventDim table. Solution : Change the InventDim field property :"AllowEditOnCreate" from No to Yes. So that system can populate it while its reading the inbound XML. May be a small thing but thought its worth sharing here. HappyDaxing...!

Split string useing List in AX2009

static void Job277(Args _args) {     List _list = new List(Types::String);     Container packedList;     ListIterator iterator;     str cade = "Jhon*,smt*,and*,caro*";     ;     _list = Global::strSplit(cade,",");     iterator = new ListIterator(_list);     while(iterator.more())     {         packedList += iterator.value();         iterator.next();     }     info(conpeek(packedList,2));     info(strfmt("%1",conlen(packedList)));   }

X++ code to Sending email using code and data with table format

static void SendEmail(Args _args) {     SysEmailParameters parameters = SysEmailParameters::find();     SMTPRelayServerName relayServer;     SMTPPortNumber portNumber;     SMTPUserName userName;     SMTPPassword password;     Str subject,body;     InteropPermission interopPermission;     SysMailer mailer;     System.Exception e;     str s;     CCHTMLString             htmlString;     ;     if (parameters.SMTPRelayServerName)     relayServer = parameters.SMTPRelayServerName;     else     relayServer = parameters.SMTPServerIPAddress;     portNumber = parameters.SMTPPortNumber;     userName = parameters.SMTPUserName;  ...

AX2009 How to get Item default order settings ...

static void ItemDefaultDimensions(Args _args) {     InventTable                 inventTable = inventTable::find('000367');     InventItemOrderSetupType    setupType   = InventItemOrderSetupType::Sales;     InventDim                   inventDim;     ;     inventDim.InventSiteId = inventTable.inventItemOrderSetupMap(setupType).inventSiteId('2', inventTable);     inventDim.InventLocationId  = inventTable.inventItemOrderSetupMap(setupType,InventDim::findOrCreate(inventDim).InventDimId).inventLocationId(inventDim.InventLocationId,inventTable,'2');                                                                           ...

AIF (Endpoint) Error : The user is not authorized to perform this action.

"The user is not authorized to perform this action."  We started getting this error message in our AX 2009 System, when ever we try to consume an XML file using an  Endpoint   thru a  File System  Channel to create a  Sales Order. We did not made any code changes / setup changes, but all of the sudden started getting this error. Solutions : 1. Validate the "SourceEndpointUser". in inbound XML  The User ID should be a valid user Id in DAX, in GNS Active Directory and the "\" should be back slash in the XML file or where you use this combination in entire process or setup. ex : Domain \ User Id. In our case when we had the above error, the SourceEndPointUser user id was deleted from the Active Directory in GNS, so we added it back to Active Directory then it solved the problem. NOTE : If nothing wrong with the User ID, try to add the user id in "Users" tab in Endpoints form for that End Point used by the process. 2. Verify th...

How to fix AX 2009 AIF Service Operation error "there is no schema associated with the specified class."

We usually get this error message when we do a data refresh from PROD to TEST / QA or DEV environments. The Schema document for AIF Service Operations stored in a table called "AifSchemaStore" and  the reference data stored in "AifDocumentSchemaTable". 1. AifDocumentSchemaTable : - https://msdn.microsoft.com/en-us/library/aifdocumentschematable.aspx 2. AifSchemaStore : - https://msdn.microsoft.com/en-us/library/aifschemastore.aspx So when we do a data refresh I think sometimes the refRecid's wont synch (Which is happened in my environment). Fix : So I found the record in AifDocumentSchemaTable using the AIF ClassId and deleted that record, then I re generated the service (Basic >> Setup >> AIF >> Service >> Click on Generate. It recreated the new schema and stored in the AifSchemaStore and linked to AifDocumentSchemaTable record. Then everything worked fine. Note : This will also adds the service in Configuration screen t...

How to identify the AOS server name /Instance Name In Axapta

Hi Folks, Here is the code to identify the AOS server name /Instance Name In Axapta. static void JobForAOSSeververInstantname(Args _args) {     xSession curSession;     SysClientSessions clientSessions;     SysServerSessions serverSessions;     int usrSessionId;     int serverId;     str aosId;     str instanceName;     ;     curSession = new xSession();     usrSessionId = curSession.sessionId();     select firstonly ServerId from clientSessions where clientSessions.SessionId == usrSessionId;     serverId = clientSessions.ServerId;     select firstonly * from serverSessions where serverSessions.ServerId == serverId;     aosId = serverSessions.AOSId;     instanceName = serverSessions.Instance_Name;     info(instanceName); } Thanks, Brahma

Error : Target file should be in UNC format – in batchprocess run in server ax2009

Hi Friends, Error:  Target file should be in UNC format – in batch process run in server ax2009. Normally we will get this error on batch process .I.e. when we run the report on screen and save the file in particular location /Email .The file will be saved in location with out any errors . But when we do the same process on Batch .we will get this type of error. Because in batch process, we will select the specific path to save the report, that particular path AOS Server couldn't able to identify the location. That time we will get this type of error. To solve this error, we need to create the folder in the location that location is accessible for all the users and as well as AOS Server also having the rights to access that path and run the bath again.    Thanks, Happy Daxing …

How to Convert SSRS Report into PDF By using X++.

Hi Folks, Here is the code to convert SSRS report into PDF. But Before converting the report to PDF we need to send the parameter values to Contract class after that we need to convert the report. //For Converting Report to PDF public void makeCommissionReport() {     Args                            args;     SrsReportRunInterface           reportRun;     SrsReportDataContract           contract;     SrsReportRunController          controller;     CommByAgencyContract            commContract;     SRSPrintDestinationSettings     printSettings;     SRSReportExecutionInfo          executionInfo;         SrsReportRunImpl                sr...

How to Display SSRS Report into Enterprise Portal in Dynamica Axapta 2012 R2

Hi Folks, How to Display SSRS Report into Enterprise Portal in Dynamica Axapta 2012 R2 .Its very Easy. Please see the below steps. Step1: After Creating the SSRS in AX,we need to add that into output menuItem with proper label. Here label is very important because it will connect between Ep and AX. Step 2: \Go to your EP page selct the place where you need to display the Report.There we need to add the web Part click on that we can see the option like " Dynamics Report Server Report ". Step 3: It will display all the outPut MenuItems,Here we can see the label names for the menuitems. Select your menuitems .thats it. Thanks Happy Daxing..! 

How to Calculate the time for the particular query time in Dynamics Axapta

Hi Folks, How to Calculate the query timings ,how much time its working. Check the below code you can identify :) static void DateSplit(Args _args) {   date fixDate,fromdate,todate;   int i,j;   int         day,month,years;   utcDateTime         jobStart, JobEnd;   int64               jobRuntime;   ;     jobStart = DateTimeUtil::utcNow();   fixDate = 22\1\2014;//systemDateGet();   day = dayOfMth(fixDate);   month = mthOfYr(fixDate);   years = year(fixDate);   info(strFmt("%1",day));     if(day <=15)     {         fromdate = mkDate(1,month,years);         todate   = mkDate(15,month,years);         info(strFmt("%1 %2",fromdate,todate));     }     else if(day <= 31)     {         fro...

Create new Numberseq in Ax2012

Hi Folks, How to create the new numberseq with Out disturb the existing class In ax2012. 1) Create the new Class extends with NumberSeqApplicationModule class Sample extends NumberSeqApplicationModule { } 2)  Override the Loadmodule method() protected void loadModule() { NumberSeqDatatype datatype = NumberSeqDatatype::construct(); /* Setup application numbers */ datatype.parmDatatypeId(extendedtypenum(EDT)); datatype.parmReferenceHelp(literalstr("Sample")); datatype.parmReferenceLabel(literalstr("Sample")); datatype.parmWizardIsContinuous(true); datatype.parmWizardIsManual(NoYes::No); datatype.parmWizardIsChangeDownAllowed(NoYes::No); datatype.parmWizardIsChangeUpAllowed(NoYes::No); datatype.parmWizardHighest(999999); datatype.parmSortField(1); datatype.addParameterType(NumberSeqParameterType::DataArea, true, false); this.create(datatype); } 3) Select the numberseq for perticular form public NumberSeqModule numberSeqMod...

How to Hide Modules based in Company in AX2012

Hi Folks, Here is the way to hide modules based on the company... 1) Open the Dynamics Axapta Application. Go to navination pane select the options like 2) Then below screen will open go there and un select the modules and then save it Thanks Happy Daxing..

How to debugg the RDP Class in SSRS Reports on Dynamics AX2012

Hi Folks, Hope every one is doing good.It has been long time since I shared the things into my blog.I am little bit busy with my current project and learning new things about SSRS,AIF and MVC. Today I would like to share a very interesting and simple concept on SSRS,i.e Debugging the SSRS RDP Class in Dynamics AX2012. 1) Class declaration of RDP class ,we need to replace the code like extends  SrsReportDataProviderPreProcess   instead of SrsReportDataProviderBase  2)   Temp table properties should be      (a) Table type : Regular        (b)  Created by : Yes       (c) Created Transaction Id :  Yes Third step is not a mandatory. 3)   In process report of the class add this line   in   Temporarytablename.setConnection(this.parmUserConnection()); Thanks Happy Daxing..

Periodic maintenance and performance analysis in AX

Hi Friends, I recently came across a very useful article about the AX maintenance and performance. Which is actually explains about how the DAX DB is really being used for real data and temp data. In fact if you look into the DAX DB tables almost 60% of your DAX DB is being used by 4 tables unfortunately they are temp data i.e. INVENTSETTLEMENT, SYSDATABASELOG, SALESPARMLINE, INVENTSUMLOGTTS. Click here  to view the article. Thanks, Sai

How to stop manual Refresh (F5) on Forms in AX...?

Hi Friends, By doing a small code change in "SysSetupFormRun" class  we can stop the manual refresh(F5) on any form in AX. We need to add some code in "task( )" method. Ex :- public int task(int _p1) {     #task     FormDataSource formDataSource;     int ret;     if (_p1 == #taskFilter)     {         formDataSource = this.objectSet();         if (formDataSource &&             formDataSource.queryRun() &&             formDataSource.queryRun().args() &&             !formDataSource.queryRun().args().caller())         {             formDataSource...

How to add Filter functionality to Display method in dynamics AXAPTA

Hi Friends, Normally filters will work only in table fields but we can't do filters to display method. This below code will work for filters to display method also. Step 1: Go to the form design right click on particular control properties Auto Declaration No to Yes. Step 2: Override the context() method on the display method  . public void context() {     int             selectedMenu;     formrun         fr;     Args            ag;     Name            strtext;     querybuilddataSource qb1;     queryrun    qr;     query       q;     PopupMenu menu = new PopupMenu(element.hWnd());     int a = menu.insertItem('Filter By Field');     int b = menu.insertItem('Filter By Selection');     i...