function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Doug ADoug A 

Convert enterprise sObject to partner sObject? (Outbound message)

Can anyone suggest a general approach to converting an enterprise sObject (as received by an outbound message, for example) to a partner sObject?

Our codebase is built around the partner WSDL, and now we're consuming outbound messages, which of course provide strongly-typed enterprise sObjects. 

Yes, I could use the .NET reflection APIs, but at the risk of prematurely optimizing for performance, I'd like to find a less expensive operation, and yet still be reasonably generic and flexible.

Any suggestions?
Doug ADoug A
You know what?  Tiny bits of reflection add nearly immeasurable performance impact to an application built with web services, because the real overhead is elsewhere in the app (ie, network latency, SOAP/XML processing, etc).

I went with reflection.