I recently encountered this problem while using the AIF framework in Dynamics AX 2009. I got it in the AIF Queue manager when one of my messages failed.
Since the message “No valid document identified from the entity key” doesn´t really give you a good clue of that the problem really is, I had to do some debugging. I found that the error occurred when the class AifConstraintListCollection did not contain any constraints and the message(document) was associated with a query.
Continue reading No valid document identified from the entity key