Microsoft CRM notes

http://blog.customereffective.com/blog/2008/05/index.html

Error When Deploying Web Applications in CRM 4.0
If you’ve written a web application that you’ve that utilizes the CRM web service and try to deploy it, you may receive the following error:

‘Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthentica­tionProvider,
Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35’ doesn’t exist.

The issue is that the application cannot find the Microsft.CRM.WebServices library. I’ve seen a few ways to solve this error. Credit goes to Wes Weeks on finding these:

1. Add the following code to your application’s web.config file:

<assemblies>
<clear/>
<add assembly=”*”/>
</assemblies>

2. Copy Microsoft.CRM.WebServices.dll from the CRM web root bin directory (For default web site installations, this would be c:\inetpub\wwwroot\bin\) to the Global Assembly Cache (C:\windows\assembly\)

3. Copy Microsoft.CRM.WebServices.dll from the CRM web root bin directory to the bin directory for your web application.

So is any one of these methods better than the others? Well, I think it depends, although I’m no .NET expert. I’m not a big fan of #1 – it seems almost like carpet-bombing.

I think either #2 or #3 would be your best options. If you’re going to have just one web application, then copying the assembly to your app’s bin directory would be fine. However, if you’re going to have multiple web apps, them adding the assembly to the GAC would prevent you from having to add the assembly to each application’s bin folder every time you deploy a new one.

=======================

2. Use LinkEntity for relationship lookup retrieval details

3. For FetchXMLBuilder : uncheck the checkbox at the first place(use credentials of login user)

 Go with administrator, swayam1,protitan

4. multiselect lookup
fileterlookup
relationship
mappings

5. iisreset

restart microsoft crm asynchronous service
6.

JavaScript=”window.open(‘../Pages/Home.aspx?opid=’+ crmForm.ObjectId, ”, ”);”>

           <Button Icon=”/_imgs/ico_18_debug.gif” PassParams=”1″ WinParams=”” WinMode=”2″ JavaScript=”window.showModelessDialog(‘../Pages/Home.aspx?opid=’+ getSelected(‘crmGrid’), ”, ”);”>
    

   <Entity name=”product”>
   <MenuBar>
    <CustomMenus>
     <Menu>
      <Titles>
       <Title LCID=”1033″ Text=”Actions” />
      </Titles>
      <MenuItem Url=”http://www.microsoft.com” PassParams=”1″ WinParams=”” WinMode=”2″ JavaScript=”window.open(‘../Pages/Home.aspx?opid=’+ crmForm.ObjectId, ”, ”);”>
       <Titles>
        <Title LCID=”1033″ Text=”Send License Key” />
       </Titles>
      </MenuItem>
      <MenuSpacer />
      <MenuItem Url=”http://www.microsoft.com” PassParams=”1″>
       <Titles>
        <Title LCID=”1033″ Text=”Generate License Key” />
       </Titles>
      </MenuItem>
      <MenuSpacer />
      <MenuItem Url=”http://www.microsoft.com” PassParams=”0″>
       <Titles>
        <Title LCID=”1033″ Text=”Generate Offline License Key.” />
       </Titles>
      </MenuItem>
      <MenuSpacer />
     </Menu>
    </CustomMenus>
   </MenuBar>
   <!– <Grid>
   
           <MenuBar>
              <ActionsMenu>
                <MenuItem Url=”http://www.microsoft.com” WinMode=”1″>
                  <Titles>
                    <Title LCID=”1033″ Text=”Coming Soon…” />
                  </Titles>
                </MenuItem>    
              </ActionsMenu>
              <Buttons>
                <Button Icon=”/_imgs/ico_18_debug.gif” PassParams=”1″ WinParams=”” WinMode=”2″ JavaScript=”window.showModelessDialog(‘../Pages/Home.aspx?opid=’+ getSelected(‘crmGrid’), ”, ”);”>
                  <Titles>
                    <Title LCID=”1033″ Text=”License Mgmt” />
                  </Titles>
                  <ToolTips>
                    <ToolTip LCID=”1033″ Text=”License Management” />
                  </ToolTips>
                </Button>
              </Buttons>
            </MenuBar>
          </Grid>–>
        </Entity>

 

7.

Fetchxmlbuilder not getting the custom entities and attributes

Microsoft Dynamics CRM –> Deployment Manager –> Organizations

Right C lick

Disable unwanted organizations
And set default organization for the desired one.

—–

LINKENTITY:
————

this is used when we created relationship between two entities

it is like join (inner ,outer , natural) in slqserver

 

 I have product and contact entities. From Product I created a N:1 relationship with Contact and in the product form I got contact lookup
 <fetch mapping=’logical’>
                                 <entity name=’product’>
                                  <attribute name=’name’/>
                                  <filter type=’and’>
                                   <condition attribute=’productid’ operator=’eq’ value='{0}’/>
                                  </filter>
                                  <link-entity name=’contact’ from=’contactid’ to=’wi_relatedcontactid’ link-type=’inner’>
                                   <attribute name=’emailaddress1’/>
                                   <attribute name=’fullname’/>
                                  </link-entity>
                                 </entity>
                                </fetch>
                                “;

from ,to are like  “on condition”

select * from t1,t2
on t1.c1 = t2.c2

==========

1.
Modelled window not closed

2.
field in active view crm not removed.
http://forums.microsoft.com/Dynamics/ShowPost.aspx?PostID=3758719&SiteID=27
3.
http://www.learnandcertify.com/Request.aspx

india@123

========================
Issue:
——

I want to create custom email template from different custom entities.
Right now CRM 4.0 has giving some 8 system entities.
How to get custom entities

I want to create custom email template which takes inputs from different custom entities. But here in CRM 4 it is giving only some 8 system inbuilt entities. How to achieve the task

Replace the string with the Record’s Attribute value
Ambati(66 371249 @ Edison) said:
yes got it.
friend said:
gr8…….  grasped so fast
Ambati(66 371249 @ Edison) said:
one more .. can we get a menuitem under Actions  menu of every view?
Ambati(66 371249 @ Edison) said:
I dont want to add another custom button . But want to use the existing Actions menu and want to create a menuitem under it.
friend   said:
We can create our own Menu Item or Button on every entity Grid
friend   said:
No Provision to Include Items in Existing Grid
friend   said:
 
Ambati(66 371249 @ Edison) said:
I dont want to do that. I want to use the existing Actions menu

—-

WIndows service issue:
Installer file not found during installing windows service using installutil.

Just rightclick on design of service page. Select “Add installers”
Then another file gets created having two controls on it by default.
ISSUE:
Remove InstallState file because there are no installers.
serviceProcessInstaller

Account:  Localsystem
GenerateMember : true
Modifiers  : Private
Parent :  ProjectInstaller

 

———
ServiceInstaller

GenerateMember : True
Modifiers:  Private
Parent: ProjectInstaller
ServiceName: CacLicenseVerifier
StartType: Automatic

It sounds like you didn’t create an installer for your project. Within your
project add a new Installer class (it’s an option in the VS.NET “Add Item”
list). To that installer add a ServiceInstaller and a
ServiceProcessInstaller (both listed in the Components browser). Set their
properties (the service name of the serviceinstaller must match the name of
your service) and then recompile and re-run InstallUtil. You shouldn’t see
the message about “No public installers” and you should see your service
added to the list of available services.

============

iisapp.vbs in dos prompt gives which application in running in which application pool

============

Customization Comparison Utility (ravi shankar)
New Powerful Tool Customization Comparison Utility has been released for Microsoft Dynamics CRM. The Customization Comparison Utility lets you compare the customization files between two Microsoft Dynamics CRM systems. We shall use the same Utility to Track our Customization changes.

========================

how to create autogenerated column in CRM
—————-

Error: The VirtualPathProvider returned a VirtualFile object with VirtualPath set to ‘/WiproInfotech/GetNextProductNumber.cs’ instead of the expected ‘//WiproInfotech/GetNextProductNumber.cs’.
for MS CRM coding use vs 2005 environment
if we  use vs 2008 the above error comes because system.linq and system.linq.xml namespaces
========================
http://jianwang.blogspot.com/2008/04/how-to-format-number-fieldinteger.html

There is an interesting topic on the CRM Forum about how to format an integer field without commas. For example, if you type: 123456 in an integer field, you may see 123,456 once it loses focus. CRM automatically add a ‘,’ between 3 numbers. There’s a global setting to get rid of it, however, it will get rid of all integer field format. How about if you just want to remove the format for just one field?

As you may know, MSCRM uses htc files to format the different type of input fields as same as email address etc, see my another post.

If you want to get the value of an attribute, in CRM we use: DataValue, e.g: crmForm.all.new_number.DataValue;
Notice that the DataValue is the real data saved in the database.

However, if you want to get the formatted value, you may use this:
crmForm.all.new_number.value;

So the trick is give the DataValue overwrites the value property.

Put the following code into the entity’s onLoad() event, and the same code puts into the field’s onChange() event.
view plaincopy to clipboardprint?
if(crmForm.all.new_number != null && crmForm.all.new_number.DataValue != null) 

 crmForm.all.new_number.value = crmForm.all.new_number.DataValue; 

if(crmForm.all.new_number != null && crmForm.all.new_number.DataValue != null){ crmForm.all.new_number.value = crmForm.all.new_number.DataValue;}
==================
if u r placing dlls in wwwroot\bin folder then those dlls should have “Network” and “Network Service” read permissions.Otherwise access denied error will be shown in eventviewer(run -> eventvwr)
===
section change properties go to formatting tab default is Two columns(1:1) means two columns will be in one row.
Select a field in a form
click change properties
go to formatting .. Default selection is one column
make it as two column. Now the column occupies the entire row and moving the second column into next row.

if u dont want to increase the size and u want (one column in one row with the column shouldnt occupy the entire row) then change properties go to format tab then make it as one column.

 

=======
Global variables in MS CRM
http://crm.atechnisch.nl/2008/01/global-variables-in-ms-crm-40/
alert(“SERVER_URL=”+SERVER_URL );  
alert(“USER_LANGUAGE_CODE=”+USER_LANGUAGE_CODE);  
alert(“ORG_LANGUAGE_CODE=”+ORG_LANGUAGE_CODE);  
alert(“ORG_UNIQUE_NAME=”+OR<SPAN>G_UNIQUE_NAME</SPAN>); 

How to get organisation name in MS CRM

Use this :  ORG_UNIQUE_NAME
========================

how to give our own image to the custom entities?
Ambati(66 371249 @ Edison) says:
Hey Chandan..
friend    says:
in the action u will get update imgae option
friend    says:
go to customization
friend    says:
open the entity..
friend    says:
go to action menu.. u will get the oprion..

============
In CRM for every form we are getting owner . I dont want that .. How to achieve that?
Ambati(66 371249 @ Edison) said:
Owner is a builtin attribute
I dont want that in my custom form
how to delete that from the form? it is not deleting .first of all I couldnt able to remove the business required option also.how to remove that?

sol: while creating entity itself select ownership to organisation instead of user
==================
How do I send email to entities other than account, contact, leads and
users?
I am trying to use a CRM queue for support. The e-mails to a particular email address go into this queue. A user accepts the e-mail. They open it and attempt to reply to it inside CRM. The CRM system will not reply to the message, it seems, because there is no record of the user in the CRM system.

Solved… I had already looked for a setting to fix this multiple times. One last time I checked the System Settings and on the Email tab there is a checkbox for “Allow messages with unresolved e-mail recipients to be sent.” Check yes and it clears up the issue, amazingly enough. 😉

 

public bool SendEMailK()
        {

            CRMService.activityparty fromParty = new CRMService.activityparty();
            fromParty.partyid = new CRMService.Lookup();
            fromParty.partyid.Value = new Guid(“1D15E6EC-6F81-DD11-8D2E-0003FFDADD5A”);
            fromParty.partyid.type = CRMService.EntityName.systemuser.ToString();
            fromParty.partyid.name = “First name Last name”;

            CRMService.activityparty toParty = new CRMService.activityparty();
            toParty.partyid = new CRMService.Lookup();
            toParty.partyid.Value = new Guid(“00E100BD-0CED-DD11-B90A-0003FF5A0FAB”);
            toParty.partyid.type = CRMService.EntityName.contact.ToString();
            toParty.partyid.name = “JagFirst JagLast”;
            CRMService.email email = new CRMService.email();
            email.from = new CRMService.activityparty[] { fromParty };
            email.to = new CRMService.activityparty[] { toParty };

            email.subject = “Subject of email”;
            email.description = “Description of email”;

             Guid emailId = _service.Create(email);          

            CRMService.SendEmailRequest sendRequest = new CRMService.SendEmailRequest();
            sendRequest.EmailId = emailId;
            sendRequest.IssueSend = true;
            sendRequest.TrackingToken = “”;

            _service.Execute(sendRequest);
            return true;

        }
Instead of those lines

I want to write

Toparty Emailid= ambatisreedhar@gmail.com
FromPartyEmailId = aaa@gmail.com

How to write the code now?
I don’t want to send to contact ,user entities.
Deepak  Gupta told me that in system settings Email -> Allow unresolved mails to  yes we can send mails to any mail id like gmail etc.
It is working.
In the email I don’t want to mention user entity or contact entity. Just  in a webpage I will type email address and if I press on SendEMail button it should go to that email .
How to achieve??

Thanks
Sreedhar Ambati
Proteans  66 371249 @ Edison
http://ambatisreedhar.wordpress.com
http://ambatisreedhar.spaces.live.com

 

================

ok.             u know how to do filtered lookup???
friend   says:
hmmm…its not supported…
friend    says:
One way is create you own custom lookup page and display that on click of the lookup icon
friend   says:
Unsupported way: you have to make some modification in CRMWeb\_controls\lookup\lookupsingle.aspx page of CRM
friend   says:
Got the second method from CRM community site… Please google. I dont have the exact link now
Ambati(66 371249 @ Edison)http://ambatisreedhar.wordpress.com says:
if u have sample code please send it. I understood what u said.
friend   says:
I have to serch…is it very urgent now
Ambati(66 371249 @ Edison)http://ambatisreedhar.wordpress.com says:
yes please
friend    says:
http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/09782b71-0757-40fb-a002-e83e6b52d149/
friend    says:
For the secong option you can refer this link
friend    says:
First option : we have not made a proper custom page till now
————
CRM filtered lookups
==========
http://blog.customereffective.com/blog/2008/06/simplified-filt.html

http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/09782b71-0757-40fb-a002-e83e6b52d149/

http://demiliani.com/blog/archive/2006/12/29/4770.aspx

I followed the below approach
state city concept : http://advantageworks.blogspot.com/2008/02/pseudo-filtered-lookup-dialog-in.html
Lets assume that in asp.net web application
we have state dropdown based on the selection of the state its relevant cities are populated in another dropdown.

I used filtered lookup in MSCRM

I created three entities State,City,PlaceHolderEntity

In state .. I have one attribute by name Jagstate
In City … I have CityName attribute and created n:1 relationship with State  and added on the form and view.
            In CityLookup view  clikc on “Add Find Column ” and added State

In PlaceHolder I created n:1 relationship with state and city  (relationships names are stateid and cityid) and added on form and view
               On PlaceHolder Form onload I added the below code
                                 document.FilterLookup = function(source, target)
     {
           if (IsNull(source) || IsNull(target)) { return; }

           var name = IsNull(source.DataValue) ? ” : source.DataValue[0].name;

           target.additionalparams = ‘search=’ + name;
     }

 
               On Field State Onchange I added the below code

 

   document.FilterLookup(crmForm.all.wi_stateid, crmForm.all.wi_cityid);

===================

sending mails to gmail or hotmail

Administration -> system settings
email tab
set email form option
Allow unresolved

—————-
How to extend vpc ?

——
custom menus are not displaying which are added in isv.config?

go to settings –> Administration –> System settings –>   customization

There is a dropdown where we have to select webapplication

Advertisements

18 Responses to Microsoft CRM notes

  1. Hacker Network…

    […]Microsoft CRM notes « code siblings,adventures,songs and excerpts of my daily work[…]…

  2. Lester says:

    Hi! I just wanted to ask if you ever have any trouble with hackers?

    My last blog (wordpress) was hacked and I ended up
    losing many months of hard work due to no backup.
    Do you have any solutions to prevent hackers?

  3. What’s Happening i’m new to this, I stumbled upon this I’ve discovered It absolutely helpful and it has aided me out loads. I’m hoping to
    give a contribution & assist different customers like its helped me.

    Good job.

  4. Hazel says:

    Hi! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.
    If you know of any please share. Many thanks!

  5. Rochelle says:

    Howdy.
    I just discovered your website: Microsoft CRM notes | code siblings,adventures,songs and
    excerpts of my daily work when I was surfing around delicious.
    com. It looks as though someone appreciated your blog so much they decided to bookmark it – good
    job!

  6. Hello, its good piece of writing concerning media print, we all know media is a impressive source
    of data.

  7. Darwin says:

    What’s up, I would like to subscribe for this webpage to take most recent updates, thus where can i do it please help out.

  8. Every once in a because i find some thing well worth reading
    after i am browsing on the internet. Appreciate your developing genuine content material here

  9. Sallie says:

    Being overweight can lead to complications. This is
    called yo-yo dieting is a benefit of physical activity and you want to engage me on these topics, please email
    me instead. Fewer than 1 in 4 agree. Do this on a regular basis then you need to properly smell
    the tastants.

  10. This paragraph presents clear idea in favor of the new people of blogging,
    that actually how to do blogging and site-building.

  11. I enjoy, lead to I discovered just what I used to be having a look for.
    You have ended my four day lengthy hunt! God Bless you man.
    Have a nice day. Bye

  12. Thanh says:

    Excellent beat ! I would like to apprentice while you amend your site, how could i
    subscribe for a blog website? The account helped me a acceptable deal.
    I had been a little bit acquainted of this your broadcast offered bright clear concept

  13. As the admin of this website is working, no doubt very rapidly it will be
    well-known, due to its quality contents.

  14. I’ve been surfing online more than 4 hours today, yet I never found any interesting article like yours. It’s pretty worth enough
    for me. Personally, if all website owners and bloggers made good
    content as you did, the net will be much more useful than ever
    before.

  15. Francine says:

    You ought to be a part of a contest for one of the best sites on the internet.
    I’m going to highly recommend this site!

  16. Hello to every one, since I am actually kden of reading this
    blog’s post to be updated daily. It consists of pleasant information.

  17. You can certainly see your enthusiasm in the work you write. The arena hopes for more passionate writers such as you who aren’t afraid to say how they believe. Always go after your heart. “Every man serves a useful purpose A miser, for example, makes a wonderful ancestor.” by Laurence J. Peter.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: