The code here is X++. I know very little about it, though I am familiar with C#. MS says its similiar to C++ and C# in syntax.
Anyway, I assume the code below is a method. It has "Construct" as a keyword.
What is a construct/Constructor method? What does the construct keyword change when applied to the function? Also, am I wrong in assuming the code would create some sort of infinite loop?
My assumption is that its a method with a return type of "InventMovement".
static InventMovement construct(Common buffer, InventMovSubType subType = InventMovSubType::None, Common childBuffer = null)
{
InventMovement movement = InventMovement::constructNoThrow(buffer,subType,childBuffer);
if (!movement)
throw error("@SYS20765");
return movement;
}
Thanks! Kevin