static void Box_Ex(Args _args)
{
Box box;
;
if(box::okCancel("Test",1,"Enter the value","Ok"))
{
throw info("right");
}
else
{
throw error("Enter the correct value");
}
}
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
03 January 2011
26 December 2010
ValidateWrite
here we r validating to allow the marks field less than 100 only..
Form-DS->mothods->validateWrite()
boolean ret;
;
if(StuMarks.m1<=100)
{
ret=super();
}
else
{
info("Please enter less than 100 marks");
}
return ret;
Form-DS->mothods->validateWrite()
boolean ret;
;
if(StuMarks.m1<=100)
{
ret=super();
}
else
{
info("Please enter less than 100 marks");
}
return ret;
20 December 2010
Convert the selected values from ax form to Word document template
Hi
Now you can create a user defined template and attach it to the Particular record using Document Handling feature.
Here we go
step 1: Open Microsoft Word, Create a Template / Design.
For Example: If the Field name is AccountName
Type Account Name in the word document and select Insert-> BookMark
In the Book mark Field give a name to refer that field in AX (ex: Account)
Step 2: Save the word document as a template (.dot or .dotx)
Step 3: Open AX, Basic->setup->Document Management -> Document Types
Step 4: Create New record, Type as Document, Class description as Create word document via COM, Group as Document.
Step 5: Click Options, Select the table name from the lookup (the table you want to attach the template)Ex: LedgerJournalTrans
Step 6: In the Template File field Browse and attach the template document u created in step 2.
Step 7: Click on the Fields Tab in the same form, create a new record, select the table name (same table name as step 5), Select the Data Field For Ex: Account Name
In the Book mark field enter the value, same u have given in the Word Template Bookmark. Click OK.
Step 8: Now create a Journal (EX: General Ledger -> Journals-> General Journal)
Step 9: Once u finished creating the Journal Lines, Select the Document Handling Icon in the tool bar.Create New ->Document(the name u have given in the step 4)
Step 10: Once u create the new document, the word template will open and the field value (Account Name) will be fetched in the document template. Like this u can add more fields and create bookmark and attach it with the Document types Form.
Regards
Praveen
Now you can create a user defined template and attach it to the Particular record using Document Handling feature.
Here we go
step 1: Open Microsoft Word, Create a Template / Design.
For Example: If the Field name is AccountName
Type Account Name in the word document and select Insert-> BookMark
In the Book mark Field give a name to refer that field in AX (ex: Account)
Step 2: Save the word document as a template (.dot or .dotx)
Step 3: Open AX, Basic->setup->Document Management -> Document Types
Step 4: Create New record, Type as Document, Class description as Create word document via COM, Group as Document.
Step 5: Click Options, Select the table name from the lookup (the table you want to attach the template)Ex: LedgerJournalTrans
Step 6: In the Template File field Browse and attach the template document u created in step 2.
Step 7: Click on the Fields Tab in the same form, create a new record, select the table name (same table name as step 5), Select the Data Field For Ex: Account Name
In the Book mark field enter the value, same u have given in the Word Template Bookmark. Click OK.
Step 8: Now create a Journal (EX: General Ledger -> Journals-> General Journal)
Step 9: Once u finished creating the Journal Lines, Select the Document Handling Icon in the tool bar.Create New ->Document(the name u have given in the step 4)
Step 10: Once u create the new document, the word template will open and the field value (Account Name) will be fetched in the document template. Like this u can add more fields and create bookmark and attach it with the Document types Form.
Regards
Praveen
16 December 2010
Microsoft Dynamics AX 2009 System Requirements
Microsoft Dynamics AX 2009 System Requirements click here
15 December 2010
Getting Data Without Declaring a Table Variable
Its Possible to get data from the database without declaring a table variables.
Static void Job3(Args _args)
{
// No Variables
;
print (select CustTable).AccountNum;
Pause;
}
Note the parentheses around the select statement. This tells the compiler to create a temporary, anonymous buffer to hold the record. The select statement uses the exact table name and is immediately followed by a field name to get a value from a field.
If you use this there’s no Intellisense to help you look up the field name because the editor doesn’t know the type of the anonymous buffer.
This technique is often used in exist() methods on tables.
Static void Job3(Args _args)
{
// No Variables
;
print (select CustTable).AccountNum;
Pause;
}
Note the parentheses around the select statement. This tells the compiler to create a temporary, anonymous buffer to hold the record. The select statement uses the exact table name and is immediately followed by a field name to get a value from a field.
If you use this there’s no Intellisense to help you look up the field name because the editor doesn’t know the type of the anonymous buffer.
This technique is often used in exist() methods on tables.
14 December 2010
13 December 2010
In runtime look up filter the duplicate values
In runtime look up filter the duplicate values click here
Subscribe to:
Posts (Atom)
Merge Dimensions (MainAccountId and LedgerDimensions) defaultDimension in D365 F&O and X++
public DimensionDynamicAccount getLedgerDimension(container _conData, TransDate _transDate = today()) { int ...
-
Please click here to access Custom Workflow step by step process:
-
public InventQty onHandInventory(ItemId itemId, InventSiteId inventSiteId,InventLocationId inventLocation) { InventOnhand inventOnh...
-
1. In classDeclaration extend SrsReportDataProviderPreProcess instead of SrsReportDataProviderBase 2. Temp table properties should b...