Blogger :
MSDN Blogs
All posts :
All posts by MSDN Blogs
Category :
SAP CRM
Blogged date : 2007 Jun 15
I was thinking to post best practice tips since longtime and today I got chance to post my first draft.
-
It is developer responsibility to design optimized callouts so that end user will not get blocked till the App Logic executes. Be caustious while adding more complex logic.
-
Avoid calling Update method call in another PostUpdate Event, this will cause infinite loop and blocks the User Interface
-
Avoid complex logic or long running process in callout events instead use CRM Workflows
-
Try to avoid making write calls to the database. Query the CRM Database only with Primary key for best performance.
-
Enable Callout trace on CRM App Server only when required.
-
Keep Error Code & Descriptions in Resource file to support localization and easy to maintain
-
Don't hard wire DBConnectionString, App Server and Logging Information in the Callout code, refer my Generic Callout Blog section for the sample code to read Windows Registry for CRM Config Values. Windows registry provides most common looking values like CRMApp Server, Metadata, CRM database connection string and other parameters
-
Use Windows Registry or W3WP.config file to store external configuration settings like "MSMQ Server", "SAP Server Connection string" and etc.
-
Avoid serializing Dynamic Entity PostImageXML or PreImageXML in Callout instead write into MSMQ to process in Async Model.
-
Verify the Callout Event Sequence in Callout.Config file to avoid data loss or incorrect behaviour.
-
In case of file based Callout logging, make sure appropriate file permissions are granted. (Add CRM App Pool Identity to the Callout Log file with Read & Write Permissions)
-
Enable FileShare & Network Share option explicit on Callout Log File, so that multiple callout events can open and write messages successfully. And also CRM Administrators can open same file from network share so that this will not restrict or block the File operations during runtime.
I will continue to add more and more under this section. Please wait....