No connection could be made because the target machine actively refused it or The operation you are attempting requires a secure connection (HTTPS)


We could receive the above errors while trying to connect to the reporting server from SQL server management studio or while importing organization using Deployment Administrator.

The following changes resolved the issue

Go to reports server’s config file

1) C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\RSWebApplication.config

<ReportServerUrl>http://servername/ReportServer</ReportServerUrl>

<UrlRoot>http://servername/reportserver</UrlRoot>

Change https to http

2) C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\rsreportserver.config

<Add Key="SecureConnectionLevel" Value="0"/>

Change the Value from 2 to 0

Verify the 3rd step as well

3) In IIS, right click the web site –> properties –> Directory Securities –> Authentication and access control –> Edit

Disable the anonymous access

bye..

Enabling Mail Merge Template for other System entities


Hi,

We had a requirement to use the exiting templates for salesorder entity. However as we know, we only get the option of Lead, Opportunity, Contact , Account , Quote and other custom entities in Associated Entity drop down for the mail merge template.

So i first tried out this, exported the customization for the salesorder entity and added attribute IsMailMergeEnabled with the value of 1, imported it and published it.

However this didn’t work, it only works for custom entities.

Than i tried to do the same using the Metadata Service.

// Initialize MetadataService
MetadataService mdService = new MetadataService();
mdService.Credentials = System.Net.CredentialCache.DefaultCredentials;
mdService.CrmAuthenticationTokenValue = new CrmAuthenticationToken();
mdService.CrmAuthenticationTokenValue.AuthenticationType = 0;
mdService.CrmAuthenticationTokenValue.OrganizationName = "orgname";

// Use RetrieveEntityRequest to get the metadataid for the sales order entity
RetrieveEntityRequest entityMDRequest = new RetrieveEntityRequest();
entityMDRequest.LogicalName = "salesorder";
entityMDRequest.EntityItems = EntityItems.EntityOnly;
RetrieveEntityResponse entityMDResponse1 = (RetrieveEntityResponse)mdService.Execute(entityMDRequest);

// Initialize EntityMetadata for the salesorder entity
EntityMetadata entityMD = new EntityMetadata();
entityMD.MetadataId = entityMDResponse1.EntityMetadata.MetadataId;
// Set IsMailMergeEnabled to true
entityMD.IsMailMergeEnabled = new CrmBoolean();
entityMD.IsMailMergeEnabled.Value = true;

// Use UpdateEntityRequest to update the metadata for sales order entity
UpdateEntityRequest ueRequest = new UpdateEntityRequest();
ueRequest.Entity = entityMD;
UpdateEntityResponse ueResponse = (UpdateEntityResponse)mdService.Execute(ueRequest);

However it gave the following error

"<error>\n  <code>0x80040203</code>\n  <description>Entity 38ded7b5-9ec6-4e77-919a-c408023a4db4 is not a custom entity and therefore cannot have its mail merge enabled properties changed</description>\n  <type>Platform</type>\n</error>"

Finally then i tried out this,

Updated the value for IsMailMergeEnabled in the organization database itself.

This is the sql query for that

update MetadataSchema.Entity
set ismailmergeenabled=1
where name=’salesorder’

Followed by an IISReset.

And it worked !!!!  ( however it is unsupported !!! )

I was able to see the order entity in the Associated Entity drop down for the mail merge template.

I am yet to test it thoroughly though !

Check out this post as well

https://nishantrana.wordpress.com/2009/10/07/using-mail-merge-for-other-entities-in-crm-4/

Bye..

Using Mail Merge for other entities in CRM 4


Suppose we need to make use of Mail Merge functionality for the SalesOrder entity.

So one thing we could do is create custom button or menu items using isv.config for SalesOrder’s form as well as grid. Then we could use the same function used by CRM for other entities like Lead, Contact, Opportunity etc. as their JavaScript attribute.

Something like this

For SalesOrder Form

JavaScript="onActionMenuClick(‘webmailmerge’, 1088)”

For SalesOrder Grid

JavaScript="WebMailMerge(‘crmGrid’, 1088);"

1088- entity type code for sales order

Still trying to find out how to add mail merge template for sales order or other system entity.

Found this post

http://blog.sonomapartners.com/2008/01/enabling-mail-m.html

Unfortunately that didn’t work for sales order entity.

One more thing, all these methods are unsupported one!!

Bye..

Few more JavaScript for CRM


Hi,

While searching for “how to hide new button” from related entity’s grid, these are certain things i found out

Suppose if we want to hide few things from the top bar of the CRM, where we could see New Activity, New Record etc.., we need to write  JavaScript in the following page

bar_Top.aspx within _root.

For e.g. if we want to hide ‘New Activity’ button than

<script type="text/javascript">
    function window.onload() {
        document.getElementById(‘mnu_new_activity’).style.display = ‘none’;
          }
</script>

 

From entity’s grid, if we want to hide say assign button than we need to write JavaScript on the following page

HomePage.aspx

<script language="JavaScript">

    function window.onload() {
       document.getElementById(‘_MBdoActioncrmGrid4assign’).style.display = ‘none’;
            }
</script>

And for entity’s form it would

edit.aspx page for that entity.

for lead it would be

SFA\leads\edit.aspx

for invoice it would be

\SFA\invoice\edit.aspx etc..

However this way of using JavaScript is unsupported.

And lastly for hiding add existing button or new button from related entity’s grid, check this site

http://blog.davehawes.com/post/2008/04/23/MSCRM-4-Remove-Add-Existing-xxxxx-button.aspx

Bye..

One or more of the option values for this picklist are not in the range of allowed values in CRM 4


Hi,

I started getting this issue on one of our entities while saving it.

This wasn’t the issue in CRM 3.0, this issue came up only after upgrading to CRM 4.0.

I was sure that the issue is because of some picklist getting filled up with dynamic options. But what was surprising was it was working perfectly fine in CRM 3.0.

After looking for it , i realized that the above error only comes in CRM 4.0, in CRM 3.0, it doesn’t throw error and we are also able to save the form.

So i thought of trying out these two options for correcting the error in CRM 4.0,

1) Dynamically disabled the field using JavaScript on the onSave and enabling it on onLoad. Disabled field’s value wouldn’t be passed to the CRM Platform so i thought this would resolve my issue. For update it worked, however it didn’t work for new form.

2) Than i thought of writing a plugin that on pre create or pre update event would remove the picklist field from being passed as an inputparameter to the CRM Platform. However the error showed up before we could even reach the pre-create plugin.

So finally added few options through customization section and on the onload removed that option using DeleteOption for the picklist. And than i was able to work with that picklist properly and was also able to solve the form

bye.

Understanding workflowContext.MessageName of IWorkflowContext interface in CRM workflow activity.


Hi,

Today i was trying to find out what could be the different values for it.

So i had my custom workflow activity registered against all the triggering conditions.

i.e. Record is created, record status changes, record is assigned, record attribute change and record is deleted.

Well these were my findings

for record is created the message name was “Create”

for record status changes, record is assigned, record attribute change it was “Update”.

for record is deleted it was “Delete”.

And one more thing if we have selected both the conditions i.e. record attribute change and record is assigned,  owner field within record attribute change gets auto selected.

bye.

Nishant Rana's Weblog

Everything related to Microsoft .NET Technology

Skip to content ↓