Suresh.Potlakayala
Happy DAXing
Wednesday, 25 April 2018
Excel data connector in AX7/D365
Excel data connector in AX7:
Configuring and using the Excel Data Connector Add-in
The Excel Data Connector add-in is built by using the Office Web Add-ins framework. The add-in runs in a task pane. Office Web Add-ins are web applications that run inside an embedded Internet Explorer browser window.
will show you how to configure an Excel Data Connector add-in and use it to export data from Dynamics 365 for Finance and Operations and publish the updated data back in Dynamics 365 for Finance and Operations.
How to do :
Please follow the below steps in order to complete this:
- Open a new workbook in Excel and navigate to the
Inserttab. UnderAdd-ins, selectMy Add-ins, as shown in the following screenshot:
2.Under
Office Add-ins, navigate to STORE, search for Microsoft Dynamics Office Add-in, and click on Add. This is shown in the following screenshot:
Thank you..!
Monday, 27 November 2017
Create automated test scenario using Task Recorder In AX7
With AX7 we can use the Task Recorder to generate black box test scenarios, import and use as Automated Test on VS.
Using Task Recorder your consultants, PMs and developers can generate setups, simple test and end to end tests scenarios, export and the developer can import on VS to generate automated test classes.
Below i’ll show an simple examples of the creation of a test scenario using the Task Recorder and the generation of an automated test class based on the record.
To use the task recorder, open AX using the internet browser (don’t use the run mode from VS, the task recorder doesn’t work from there).
Click on the Setting\Task recorder (icon the top-right). Give the name for your test case and description.
Click to start a sub-task.
Give the name to your sub-task related to the test scenario that you going to record.
Record the action of the test scenario, including validations, errors, etc.
Stop the recording and “Save as developer recording”.
Go to VS on a new project on the Test Model and go to the menu Dynamics AX 7\Addins\Import task recording.
Import the saved file from the task recorder on your project.
The VS will generate automatically the Test Class (SysTestCase) for the record.
On VS go to Test\Windows\Test Explorer.
Your new test class will be automatically detected and will appear on the Test Explorer list. From here you can run your test class, run all, run the failed tests, etc.
Using Task Recorder your consultants, PMs and developers can generate setups, simple test and end to end tests scenarios, export and the developer can import on VS to generate automated test classes.
Below i’ll show an simple examples of the creation of a test scenario using the Task Recorder and the generation of an automated test class based on the record.
To use the task recorder, open AX using the internet browser (don’t use the run mode from VS, the task recorder doesn’t work from there).
Click on the Setting\Task recorder (icon the top-right). Give the name for your test case and description.

Click to start a sub-task.

Give the name to your sub-task related to the test scenario that you going to record.

Record the action of the test scenario, including validations, errors, etc.

Stop the recording and “Save as developer recording”.

Go to VS on a new project on the Test Model and go to the menu Dynamics AX 7\Addins\Import task recording.

Import the saved file from the task recorder on your project.

The VS will generate automatically the Test Class (SysTestCase) for the record.

On VS go to Test\Windows\Test Explorer.

Your new test class will be automatically detected and will appear on the Test Explorer list. From here you can run your test class, run all, run the failed tests, etc.

Thursday, 13 July 2017
To Keep password while logging into AX application
To keep a password while logging into AX,
Use the first method that is called while logging into AX. i.e,
Application(Class) > startuppost() method.
void startupPost()
{
dialog d;
dialogfield df, df1, df2;
userinfo user;
boolean ret;
;
d = new dialog(“Password”);
df = d.addField(typeid(userid),”UserName”);
df1 = d.addField(typeid(userid),”UserName”);
df2 = d.addField(typeid(string30),”Password”);
df.value(curuserid());
select user
where user.id == curuserid();
if(user)
{
df1.value(user.name);
}
df1.allowEdit(false);
df1.displayLength(25);
while(d.run())
{
if(!(df2.value() || df2.value() == ‘Suri’))
{
infolog.shutDown(true);
throw error(“wrong password”);
df2.doNull();
continue;
}
else
{
ret = true;
break;
}
}
if(ret == false)
{
infolog.shutDown(true);
}
}
Use the first method that is called while logging into AX. i.e,
Application(Class) > startuppost() method.
void startupPost()
{
dialog d;
dialogfield df, df1, df2;
userinfo user;
boolean ret;
;
d = new dialog(“Password”);
df = d.addField(typeid(userid),”UserName”);
df1 = d.addField(typeid(userid),”UserName”);
df2 = d.addField(typeid(string30),”Password”);
df.value(curuserid());
select user
where user.id == curuserid();
if(user)
{
df1.value(user.name);
}
df1.allowEdit(false);
df1.displayLength(25);
while(d.run())
{
if(!(df2.value() || df2.value() == ‘Suri’))
{
infolog.shutDown(true);
throw error(“wrong password”);
df2.doNull();
continue;
}
else
{
ret = true;
break;
}
}
if(ret == false)
{
infolog.shutDown(true);
}
}
Wednesday, 5 July 2017
Print Middle Data in a field Data in AX2012
static void Job40(Args _args)
{
str firstvalue,finalvalue,a = "ABC";
info(strRem("ABCD", "C"));
info(subStr("ABCD", 1,1));
firstvalue = subStr(a,2,2);
finalvalue = strRem(a, firstvalue);
info(finalvalue);
}
IN SSRS:
Declaration:
str firstvalue,finalvalue,a;
Inside the loop:
a = SalesPurchInvoiceHeaderFooterTmp.GSTConsignee;
firstvalue = subStr(a,3,10);
SalesPurchInvoiceHeaderFooterTmp.GSTConsigneePan = firstvalue;
//info(strFmt("%1", firstvalue));
finalvalue = subStr(SalesPurchInvoiceHeaderFooterTmp.GSTBuyer,3,10);
SalesPurchInvoiceHeaderFooterTmp.GSTBuyerPan = finalvalue;
Sunday, 8 January 2017
Subscribe to:
Posts (Atom)
Repeat the heading to the next page in SSRS Reports: To repeat the table header in the next page, follow these steps: ⦁ Open the repo...
-
A call to the Microsoft Dynamics AX SRSFrameworkService service failed.Expected record type ‘PreambleAck’, found ‘72’.. To Resolv...
-
InitValue : public void initValue() { super(); this.DateofIndent = today(); this.IndentNumberToUnitEdit = ''; }...
-
Get ProductMaster based on Product varients HI, Below is the sample code used to get Product number based on product variants. Since...
