I’m working on a Microsoft Dynamics CRM 2011 plugin attached to SalesOrder entity on Create event. I need to get the Order parent Account, to access some of its properties. I’m trying the following code inside the Execute method, but key “accountid” is not present at time of execution.
Entity entity = (Entity)context.InputParameters["Target"]; // A salesorder entity
EntityReference accountRef = (EntityReference)entity.Attributes["accountid"];
Plugin is registered at Post-operation stage to execute in synchronous mode. Following image show all configuration.

Is there another way to get the parent Account for the SalesOrder entity?
It seem to be an error on the SDK documentation, because the accountid attribute is never available for the salesorder entity, even if I configure the plugin to run in Asynchronous mode. I ended changing the accountid attribute by customerid, which in fact can be an account (default behavior). That solved my problem and I could get a reference to the Account which Order belongs.