BankAccountTable's CacheLookup property is "Entire Table Cache" So when a user's first acces to this table all the records cached as a TMP file. Everything is OK so far, but this table can not be loaded and this "Duplicate record error" comes to screen. Here is my findings:
- "Entire table cache" property provide a client to access all the records of a table via TMP file which created at first access to this table.
- This error is company specific so it is data related.
- When i delete all the record and insert them from previously backed up table. Problem solved!
Final comments; Axapta's kernel somehow can not managed to create TMP file it just try to insert same record twice. The reason is, I think, corrupted data. Someh0w kernel try to insert same record.
Microsoft Axapta Dynamics DAX Development X++ Blog Necmi GÖCEK Necmi GOCEK
2008-09-08
2008-09-05
Searhing Axapta source code.
Searching in Axapta can be done faster by using Google Desktop application. You will need all the axapta sources code as text file (I could not managed to indexed xpo files) and ofcourse Google Desktop. Here is the steps;
1- Download this project and import it to Axapta.
http://www.axaptapedia.com/Export_All_Sources
2- Modify fallowing method as shown below.
\Classes\VCS_WorkingCopy\export()
// --> Necmi, Export sources as TXT
_path = strReplace(_path, ".xpo", ".txt");
// <--
_node.treeNodeExport(_path);
3- Download Google Desktop let it to index your harddrive(s). All done!!! Happy searching...
http://desktop.google.com/
1- Download this project and import it to Axapta.
http://www.axaptapedia.com/Export_All_Sources
2- Modify fallowing method as shown below.
\Classes\VCS_WorkingCopy\export()
// --> Necmi, Export sources as TXT
_path = strReplace(_path, ".xpo", ".txt");
// <--
_node.treeNodeExport(_path);
3- Download Google Desktop let it to index your harddrive(s). All done!!! Happy searching...
http://desktop.google.com/
2008-09-03
InterCompany usage of SysTableBrowser.
Sometimes it's very annoying to do same thing again and again in Axapta. For example, you may want to use a form design in all companies or use same range for a report in all companies. This behavior can be called as "Inter company usage of SysLastValue". To do so, we must modify saveLast() and getLast() methods of xSysLastValue class.
Note: Use appropriate value for "Your company id" parameter.
\Classes\xSysLastValue\saveLast(Object caller)
static public void saveLast(Object caller)
{
;
// --> InterCompany
if (strScan(caller.lastValueElementName(), "SysTableBrowser", 1, strLen(caller.lastValueElementName())) )
{
classFactory.lastValuePut( caller.pack(),
"Your company id",
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
} // <-- else { classFactory.lastValuePut( caller.pack(), caller.lastValueDataAreaId(), caller.lastValueUserId(), caller.lastValueType(), caller.lastValueElementName(), caller.lastValueDesignName()); } }
\Classes\xSysLastValue\getLast(Object caller)
/*MAN
The method gets last choice.
Returns true if a last choice was found and unpacked
*/
static public boolean getLast(Object caller)
{
boolean initParm = true;
container value;
Utilelementtype u;
;
u = caller.lastValueType();
// --> InterCompany
if (strScan(caller.lastValueElementName(), "SysTableBrowser", 1, strLen(caller.lastValueElementName())) )
{
value = classFactory.lastValueGet( "Your company id",
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
} // <--
else
{
value = classFactory.lastValueGet( caller.lastValueDataAreaId(),
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
}
if (value)
initParm = ! caller.unpack(value);
if (initParm)
caller.initParmDefault();
return !initParm;
}
Note: Use appropriate value for "Your company id" parameter.
\Classes\xSysLastValue\saveLast(Object caller)
static public void saveLast(Object caller)
{
;
// --> InterCompany
if (strScan(caller.lastValueElementName(), "SysTableBrowser", 1, strLen(caller.lastValueElementName())) )
{
classFactory.lastValuePut( caller.pack(),
"Your company id",
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
} // <-- else { classFactory.lastValuePut( caller.pack(), caller.lastValueDataAreaId(), caller.lastValueUserId(), caller.lastValueType(), caller.lastValueElementName(), caller.lastValueDesignName()); } }
\Classes\xSysLastValue\getLast(Object caller)
/*MAN
The method gets last choice.
Returns true if a last choice was found and unpacked
*/
static public boolean getLast(Object caller)
{
boolean initParm = true;
container value;
Utilelementtype u;
;
u = caller.lastValueType();
// --> InterCompany
if (strScan(caller.lastValueElementName(), "SysTableBrowser", 1, strLen(caller.lastValueElementName())) )
{
value = classFactory.lastValueGet( "Your company id",
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
} // <--
else
{
value = classFactory.lastValueGet( caller.lastValueDataAreaId(),
caller.lastValueUserId(),
caller.lastValueType(),
caller.lastValueElementName(),
caller.lastValueDesignName());
}
if (value)
initParm = ! caller.unpack(value);
if (initParm)
caller.initParmDefault();
return !initParm;
}
Microsoft Dynamics Architecture
Very good and detailed article.
http://msdn.microsoft.com/en-us/library/aa496912(AX.10).aspx
http://msdn.microsoft.com/en-us/library/aa496912(AX.10).aspx
How to compare automatically last two layers in Axapta
Edit init method of the SysCompare class as shown below.
\Classes\SysCompare\init()
\Classes\SysCompare\init()
//_comboBox1.selection(0); |
Subscribe to:
Posts (Atom)