Random Musings

April 30, 2009

Unable to generate a temporary class error message

Filed under: Dynamics CRM — haditeo @ 5:40 pm

I have just encountered this error message :

“Unable to generate a temporary class (result=1). error CS2001: Source file ‘C:\WINDOWS\TEMP\filename.cs’ could not be found error CS2008: No inputs specified”

The resolutions are :
1) Configure the security permission of the ‘\Windows\Temp’ folder by right clicking and select properties. Click the ‘security tab’

2) Add ASPNET account as well as IWAM user account.

Reference :



April 29, 2009

Invoke CRM Service by using a user domain credential

Filed under: Dynamics CRM — haditeo @ 9:16 pm

Developers can use the NetworkCredential’s object to impersonate a user while creating the CRM Service. The NetworkCredential’s object should be placed in the service’s object of Credentials property.

NetworkCredential nc = new NetworkCredential(userName, password, domain);

CrmAuthenticationToken token = new CrmAuthenticationToken();
token.OrganizationName = orgName;
token.AuthenticationType = 0;

CrmService service = new CrmService();
service.Credentials = nc;
service.CrmAuthenticationTokenValue = token;
service.Url = crmServiceUrl;

April 28, 2009

Modify the fullname attribute of the contact entity

Filed under: Uncategorized — haditeo @ 5:45 pm

I have just realized that the fullname attribute can not be modified either through Dynamic Entity or Type Proxy. Fullname attribute is the system generated entity.

Alternatively use either firstname or lastname attribute

April 27, 2009

IE 8 : Script Debugger

Filed under: IE Developer Toolbar — haditeo @ 10:30 pm

How to debug a page using IE 8 Script Debugger feature ?

1) First of all load the page containing javascript properly

2) Press “F12” to load the IE 8 Developer Tools

3) Choose the “Script” tab, beside the “Start Debugging” button, you can select the file that contains the javascript that will be debugged. In my example, it’s loading the “webform1.aspx”.


4) In the top right corner, there is a textbox containing the text “Search Script”. Search a particular method to be debugged by inserting the method name into the textbox and click the forward icon button

5) Place a breakpoint properly and click “Start Debugging”


6) Invoke an action that will trigger the method to be invoked by the javascript engine. In my example, i click an image button to trigger the invocation of the “LaunchLookup” method.


7) When javascript engine hit the correct intended method, it will highlight the particular line. It’s very convenient to use the IE 8 Script Debugger. Previously, i need to place a “debugger” line to trigger the Visual Studio 2005/2008 IDE to hook into the particular method.

8 ) In the “Locals” tab, the relevant variables are shown here


9) Developer can also check the value of the custom variable in the “Watch” window


10) Here i would like to check the value of the sender parameter, as well as invoke a method (sender.get_id()) to check what is the instance name that trigger this method


Bug at the PartyName of the Activities

Filed under: Dynamics CRM — haditeo @ 9:57 pm

Please refer to the following screenshot.


Currently the recipient of this email activity is configured correctly by the CRM to “Company_1088840” which is the title of the account itself. This is the expected correct result.

Compare this with the previous invalid value below


Before it was corrected, the CRM will display it as “Company_1088840ACRAName/Name”. Look at the watch window for details.

Previously the line is written as : sPartyName = crmForm.customerid.parentElement.previousSibling.innerText;

and i have corrected this to : sPartyName = crmForm.customerid.parentElement.previousSibling.childNodes[0].innerText;

The above line of code is contained in the “\_static\_CS\cases\cases.js” file

If you notice in the Call Stack window, there are quite a number of methods that have been called, before it finally hit locAddActTo method. Previously i traced this by placing “debugger” line in the safeWindowShowModalDialog method.


Remember that this is an UnSupported modification of the CRM javascript code. Please perform this modification with your own risk.

April 26, 2009

IE 8 Tips : Add new attribute on the fly

Filed under: IE Developer Toolbar — haditeo @ 9:03 am

Recently most of my tasks are revolving against modifying CSS style either by using CSS or by using Javascript. I used to utilize IE 7 with IE developer toolbar until i found out IE 8 with the built in IE Developer Toolbar. I was so fascinated with the IE Developer Toolbar of IE 8. For your information, in IE 7, there is no built in IE Developer Toolbar.

I will show you how to add a custom attribute for the particular HTML tag on the fly.

1) I load up http://www.csszengarden.com . By the way, i like this site very much because it shows the powerful feature of changing the site design with just using CSS


2) Once you open a site, press “F12” and you will be presented with the Toolbar window.
3) Click on the “CSS” tab. There are 4 tabs which are “HTML”, “CSS”, “Script”, “Profiler”
4) Let’s try to give a “box” around the “P” tag. Now this is the difficult part.  In the screenshot, there are 3 attributes of the “P” tag, try to right click in one of the attribute. If you are succeed,  you will be presented with the small window containing “Add Attribute”

5)Just now i add the custom attribute “border-style:solid”. Make sure that it’s checked and you will instantly see that your custom attribute is directly applied on the page itself.

This toolbar is very useful for the testing purposes. Let’s say you would like to test whether some CSS style rules or attributes can be applied correctly to certain HTML tag, you can use this toolbar to test it further.

You can even change the existing attribute by just directly edit the attribute and you can even temporarily disable certain CSS rule or attribute.

April 25, 2009

Brain Bench

Filed under: Certification — haditeo @ 10:33 pm

It has been quite a while since the last time i took the brainbench test. The last time i took it is before i relocated to Singapore. I remembered that the internet connection at Jakarta, Indonesia was quite slow and it was a dial up connection, That is why i need to quickly finish the test to save my money in using dial up connection.

I took 3 tests but managed to finish only 2 tests which are OO concept and Web Development concept. Both are free tests. If you would like to see my transcript, you can click here http://www.brainbench.com/xml/bb/transcript/public/viewtranscript.xml?pid=6448751

Blog at WordPress.com.