Rexiology::Work

Microsoft, Information Technologies...

Community

News

  • From Taiwan, living and working at Tokyo, Japan.




Recent Posts

Tags

Microsoft Sites

Other Sites

Blog pools

Bloggers

Archives

Site Info



Locations of visitors to this page




Logos & Chicklets


GeoURL


Rex's Certifications
Rex's Certifications


Creative Commons授權條款
本 著作 係採用
Creative Commons 授權條款



November 2008 - Posts

Dynamically Loading Scripts Files on Dynamics CRM

crosspost from http://blogs.msdn.com/rextang

People who are working in customizing Dynamics CRM system should all sooner or later facing this problem: what can I do to have my common sharing Javascript library injected in an elegant way so that all the events in all my crmForm can use it without problems?

As now I am engaging in a Dynamics CRM customization project and am building a common base framework for CRM developing of our vendors, I am also facing this problem. (also others though...)

In David Yack's book "CRM as a Rapid Development Platform", he is using an OO Javascript writing of base classes to be used in crmForm, and to overcome the offline CRM client problem, paste all the base class code in every entities' form's OnLoad event. the idea of writing Javascript code in VS2008 and utilizing intellisence support are pretty good ideas also.

Michael Höhne from Stunnware.com is using another approach to dynamically load javascript files of common sharing client code to the crmForm. Refer to his excellent articles here and here.  Although it's modifying the form.css file to add extended logics, which becomes an unsupported custimization. he minimized the impacts of the side effects so that it can be easily recovered after a hotfix patch or version up of CRM system. notice that this approach may not work in CRM offline environment and may need further works to deploy your javascript codes into client machines.

if your solution will only target in online environment, like mine this time, I think Michael's solution will be a good one to implement. base on what you need, choose the proper solution to make your solution work.

FYI.

Technorati Tags: ,,,

Error 0x80070057 when importing Hyper-V VM around servers.

crosspost from http://blogs.msdn.com/rextang

It's already bothering me many times when I am export my Hyper-V VM (with important snapshots) and trying to import to another machine and hit this error without further information:

Failed to import the virtual machine from import directory 'C:\vpc\somevpc1\'. Error: One or more arguments are invalid(0x80070057)

been searching on the internet and not found very useful information until today. this saving me lots of time to locate the problems via copying super large VM (>50GB) around my networks.

found the post from John Rennie in this technet forum: http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/5b731f1a-f495-4d88-a875-0eea77ecd6b4

(for my reference, leave a copy of info here.)

In http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/85dc7d36-491f-4b02-88ac-63c1ed0d94db I described a problem when exporting from a Hyper-V server and trying to import into a different Hyper-V server in a different domain. The import failed and the event log contained:

Failed to import the virtual machine from import directory 'D:\HV\Test\Test4GB-3\'. Error: One or more arguments are invalid(0x80070057)

Well I've now identified the source of the problem. In the .exp file is:
<INSTANCE
  CLASSNAME="Msvm_VirtualSystemGlobalSettingData">
...
  <PROPERTY NAME="ScopeOfResidence" TYPE="string">
    <VALUE>
      e7668fbc-216e-4ed1-8ce3-3b932b42e22b
    </VALUE>
  </PROPERTY>
If I edit the .exp file and delete the <value>..</value> then the virtual machine imports with no errors.

you should find the master exp file under the exported VM under VirtualMachine folder. open the file and locate the Msvm_VirtualSystemGlobalSettingData instance, should be in the top of the file, locate the ScopeOfResidence property and just clear that GUID (leave the <value> tag there). import the modified VM again and you will success.

Thanks John for sharing the info, and FYI.