TIPS FOR CREATE NUMBER SEQUENCE in AX 2012-
from "http://suveedharapu.blogspot.com/" blog.....To let any field to be generated sequentially you must do the following:
Suggest i have a table named csl_Table and a field named csl_field, the extended data type for csL_field is csl_edt
and i have a Form named csl_Form
1) For example if the csl_Form is located in Inventory managment Module you should find the class named NumberSeqReference_Inventory, then go to LoadModule method in that class and write the following at last:
numRef.dataTypeId = typeId2ExtendedTypeId(typeid(csl_edt)); //Extended datatype related to NoobId.
numRef.referenceHelp = literalStr("HelpText"); // Your help text to be viewed in Parameters later.
numRef.wizardContinuous = true;
numRef.wizardManual = NoYes::No;
numRef.wizardAllowChangeDown = NoYes::No;
numRef.wizardAllowChangeUp = NoYes::No;
numRef.wizardHighest = 99999999;
numRef.sortField = 1;
this.create(numRef);
2)Then go to Table node and find InventParameters, go to methods node then add a new method and write the following:
server static NumberSequenceReference numRefcslId()
{
return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(csl_edt))); //Extended datatype
}
3)Then go to Inventroy managment content pane --> Setup --> Parameters --> Number Sequences Tab
now here you will see the Extended Data type csl_edt and an empty Sequence number code, right click the empty lookup and click Go to the main table Form.
Add a new number sequence code in the opened form and save it [for example]:
Number sequence code: cslNumberSeq
Name: cslNumberSeq
Smallest: 1
Largest: 99999999
Next: 1
Format: csl_########
InUse: Checked
Return to previous Form "Parameters" and choose cslNumberSeq that we have just created it from Number sequence code lookup to csl_edt Reference
3)Last thing to do is Go to csl_Form --> Datasources node --> csl_Table--> Methods, and override method (create) and write the following:
public void create(boolean _append = false)
{
;
super(_append);
csl_Table.csl_Id = NumberSeq::newGetNum(InventParameters::numRefcslId(),true).num(); //numRefcslId() is a method created in step 2)
}
//End
Checked Spelling in Axapta :
There is a class in AX that allows to perform spell checking. This
class uses Microsoft Word spell checker to do the validation. So, in order to
use it, Microsoft Word should be installed together with proofing language
pack. Because of this requirement it is also important to consider where to run
spell checking - on the server or on the client.
Example:
public static server void
spellCheckerTest()
{
SysSpellChecker sp = SysSpellChecker::newLanguageId('en-us');
;
info(strfmt('%1', sp.checkSpelling("cornnner")));
info(strfmt('%1', sp.checkSpelling("corner")));
}
{
SysSpellChecker sp = SysSpellChecker::newLanguageId('en-us');
;
info(strfmt('%1', sp.checkSpelling("cornnner")));
info(strfmt('%1', sp.checkSpelling("corner")));
}
The output in infolog will be:
1
0
Error:Report Builder – Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)
Solution:This is commen error go to Sql->Configuration tool->Configuration manager->Exicution Account
click on Check box specify account and password and put here id and password which u are working as administrator
.....it will work fine
!!!!!! JIT !!!!!!!
What is diference between Temptable type and Inmemory Table Type
ReplyDeletePlease explain me