Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

Updating Enumeration Type value in Table

$
0
0

Hello,

I'm new to developing in AX and am currently working in the AX 2012 R2 AOT.  I've recently come across a problem that i cannot find any answers to on the web or in development  manuals.

I'm struggling with the following issue, I need to update an enumeration type element in a table from a certain value to the next.  Here is an abstract version of my running code.

while

select table

Enum _enum;

_enum = getEnum(par1,par2,par3); //getEnum returns the correct enumeration object I want in the table of the same enumeration type of the table field.

ttsBegin;

table.EnumField = _enum;

table.update();

ttsCommit;

I've stepped through every single procedure and determined that the table.update() statement is giving me the following error when running the code:

"Cannot create a record in Addresses (LogisticsPostalAddres). Insert not supported with the values specifieed for 'Effective:' and 'Expiration:'. New record overlaps with multiple existing records."

After researching the error I believe It's caused by an exception being thrown out by the Valid time state/date effective Framework but I'm unsure why the .update() query is causing this on a totally non-related field that I'm trying to update.

Are there any AX gurus out there that know why or how the .update() statement executes regarding enumeration type values and why I'm getting Valid Time State/Date effective Framework error?

(P.S Just to reiterate I'm new to development in Microsoft Dynamics AX 2012 and I apologize if I've missed something basic, any help would be greatly appreciated.)


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>