Feeds:
Posts
Comments

ASP.NET doesn’t make shadow copies of unmanaged DLLs such as libsodium.dll and libsodium-64.dll.

Sodium.dll (the managed code) tries to load the DLLs from either the same directory as the shadow copy of Sodium.dll (which is not going to work) – or some where in the PATH environment variable’s directories.

Solution 1:

add the AppDomain \Bin directory to the path before calling any Sodium code:

string
path = Environment.GetEnvironmentVariable("PATH");

string binDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “Bin”);
Environment.SetEnvironmentVariable(“PATH”, path + “;” + binDir);

Add the above code in Application_Start method of my Global.asax.

This solution works when u r running locally. but when you deploy in azure it wont work.

Solution 2:

You have to install Visual C++ Redistributable for Visual Studio 2015 (13 Mb)
https://www.microsoft.com/en-us/download/details.aspx?id=48145

I tried with this approach. but not completely successful.

Solution 3:

Add your bin folder path in environmental variables “path”. or Copy Sodium.dll  & libsodium-64.dll to your C:\Windows\System32 folder.

Solution 4:
Since we know that the binary is available on site root, we can either add site root path to PATH environment variable (binary in question along with all its dependencies are available under SiteRoot directory) or we can just disable Shadow Copying by adding following web.coinfg entry:

<system.web>
	<hostingEnvironment shadowCopyBinAssemblies="false"/>
</system.web>

AppDomain will now consider SiteRoot as it’s location and modifications to files under SiteRoot would cause application to crash and not a good idea on production environments. But since I always deploy a full CSPKG to production environment and never touch the files on production environment, I am good with this change.

Submit to approval process for Pick list value change

We can achieve this by using trigger. We can get the new value and store it in new hidden field. Using the new field we can trigger the approval process with the help of Process Builder.

Let’s take example.

While updating opportunity stage from “Prospecting” to “Qualification” by a user, The record must be submitted for Approval Process automatically.

Step1: Setup->Build->Customize->Opportunities->Fields->Opportunity Custom Fields & Relationships
Create new text field called “Selected Stage”. If required add to page layout.
Step2: Setup->Build->Develop->Apex Triggers
Write new trigger

trigger tgrUpdatedStage on Opportunity (before update) {
for (Opportunity objOpp: Trigger.new) {

if(objOpp.StageName != Trigger.oldMap.get(objOpp.ID).StageName){
objOpp.Selected_Stage__c= objOpp.StageName;
objOpp.StageName = “Prospecting”;
}
else{
objOpp.Selected_Stage__c = “”;
}
}
}

Step3: Setup->Build->Create->Workflow & Approvals->Approval Process Create a workflow for Opportunity.
Entry Criteria must be Selected Stage equals to ”Qualification”
Create Approval Step and assign to Specific user for approval.

Final Approval Actions:
Unlock the record for editing Do the Field Update.
Update Opportunity Stage to “Qualification”
Make sure to uncheck “Re-evaluate Workflow Rules after Field Change”
Do the Field Update: Update “Selected Stage” equal to “”

Rejected Actions:
Unlock the record for editing
Do the Field Update: Update “Selected Stage” equal to “”

Step4: Setup->Build->Create->Workflow & Approvals->Process Builder

Create a new Process Builder Called “Stage Automatic Approval Process”

Add Object “Opportunity and Start this process when a record is created or edited Click on Add Criteria->Provide Criteria Name

Filter Conditions->Selected Stage Equals “Qualification” and Save. Activate the Process by Clicking Activate.

 

Ready for testing………………………..

using (var connection = newOdbcConnection(“Driver={HDBODBC32};ServerNode=ServerNAME:31015;UID=userId;PWD=password;”))
{
connection.Open();
var command = newOdbcCommand(“SELECT * FROM PRODUCTS”, connection);
var reader = command.ExecuteReader();
}

The Application Areas in Microsoft Dynamics CRM 4.0 include Workplace, Sales, Marketing, Customer Service, Settings and Resource Center. New areas can be added or existing Areas can be removed. However, removing the Settings area is not recommended. You should use privileges to control access to Settings instead.

The Navigation Pane will not display Area elements without visible SubArea elements. SubArea elements may be hidden from users based on security privileges. If all the SubArea elements in an Area are hidden, or none are defined, the Area will not display.

The following script can be used to add New area in Navigation pan under sit map.

<Area Id=”Custom_Area“>
<Titles>
  <Title LCID=”1033” Title=”English Area Title”/>
  <Title LCID=”1031″ Title=”German Area Title”/>
</Titles>
<Descriptions>
  <Description LCID=”1033″ Description=”English Description”/>
  <Description LCID=”1031″ Description=”German Description”/>
</Descriptions>
<Group Id=”Custom_Group”>
  <SubArea Id=”Custom_SubArea”
   Url=”http://my_app/my_page.aspx&#8221;
   AvailableOffline=”false” >
   <Titles>
    <Title LCID=”1033″ Title=”English SubArea Title”/>
    <Title LCID=”1031″ Title=”German SubArea Title”/>
   </Titles>
  </SubArea>
</Group>
</Area>

The debate still rages on…no, not PC or Mac, but should my application be thick client or thin client. Thick client applications are those that require an application be installed on your desktop. Thin client applications are those that utilize the Web browser in order to run. So, which is right for you and what are the pros and cons of each?

Thin client:

Pros:
-Run from any Web browser
-Does not require installation
-Can be hosted remotely for security reasons
-Implementation and maintenance from one centralized location, the application server.

Cons:
-Application has to be coded for multiple types of Web Browsers
-Requires the application be run from an application server (For Example:Windows Server running IIS)
-Reqires network hardware and/or and Internet connection

Thick client:

Pros:
-Does not require an application server
-Does not require network hardware or Internet service (Unless a database must be accessed)

Cons:
-Must be installed locally on users computer
-Implementation and Maintenance nightmare

Depending on what your needs are is really the deciding factor. If you have one computer, and only need the application on that computer, then Thick Client is the quickest way and most efficient way to go. However, if others need access to the application, at multiple locations, then an Internet-based Thin Client application is right for you.

Algorithm Intelligence can help you make this decision and give your company the application it needs. Speak up and let us know what you think about this long-time debated issue.

I don’t know that you would need to move reports yet, now that you are on Microsoft Dynamics CRM 4.0 – but may come up some day.  So – how do you do it?  I’ll do my best to tell you how.

With CRM 3.0, you may have needed to move reports off the CRM server – or just move them to a new SQL Reporting Services box (maybe you upgraded to SQL 2005 and SRS 2005?).  To accomplish this, you would typically:

1.       Run DownloadReports.exe, to download the reports to .rdl files

2.       Change the Report Server URL

a.       Launch Deployment Manager on the CRM 3.0 Server

b.      Choose “Server Manager”

c.       Right-click the CRM Server, choose “Specify Report Server URL”

d.      Enter url of the new report server (http://servername/reportserver)

3.       Run PublishReports.exe, to publish the .rdl files to the new SQL Report Server

a.       DownloadReports.exe and PublishReports.exe are typically located in \Program Files\Microsoft CRM\Report

4.       An alternative way to change the Report Server URL is to change the SQLRSServerURL value under HKLM\Software\Microsoft\MSCRM, use Regedit

5.       You may need to do an IISReset for the change to take effect

Not too terrible of a process.  But it’s getting easier with 4.0.  To change the report server with CRM 4.0!  For out-of-the-box reports, they are now stored in the MSCRM database along with the Reportserver database.  So – if you want to change the report server with CRM 4.0:

1.        Disable the organization in Deployment Manager, that you want to change the report server for

2.       Right-click disabled org, choose “Edit organization”

3.       Modify the Report Server URL

a.       There will be a diagnostic process, that will determine if reports can be moved to the new URL

b.      If the diags pass, the reports will be published to the new report server

c.       Note – there is a similar process for moving CRM databases to a new SQL Server

4.       Re-enable the organization

Now – this will not work for custom reports.  Microsoft is working on a tool that will be similar to the 3.0 DownloadReports.exe tool.  Until then – you can manually download them from the user interface, then publish them after you have made the changes note above.

This post is as-is, no warranties.  Try it in Dev first.  But it worked for me!

CRM Form Types

Is the user creating a new record?
crmForm.FormType == 1

Is the user updating an existing record
crmForm.FormType ==2

Is the user unable to update this record?
crmForm.FormType == 3

Is this record deactivated?
crmForm.FormType == 4

Is the user using the Quick Create form?
crmForm.FormType == 5

Is the user using the Bulk Edit form?
crmForm.FormType == 6

What is the unique ID for this record?
= crmForm.ObjectId

What type of record is this?
= crmForm.ObjectTypeCode

What type of record is this (Entity Name)?
= crmForm.ObjectTypeName

Is the user using the Outlook Client?
crmForm.IsForOutlookClient==true

Is the user using the Outlook Light Client?
crmForm.IsForOutlookLightClient == true

Is the user working On line?
crmForm.IsOnline==true

Have any fields in this form been changed?
crmForm.IsDirty==true

You might get a question when opening CRM in Internet Explorer. The question is:

The webpage you are viewing is trying to close the window.
Do you want to close this window?
yes no

This message does appear in CRM 4.0 only when you are using Internet Explorer 7.0 and you have enabled the application mode setting. Nevertheless, it is an anoying message which you can get away!

To get rid of this message open the default.aspx file which resides in the root of the CRM website. In this file there are these three lines of code:

var oMe = window.self;
oMe.opener = window.self;
oMe.close();

Modify the second line of this snippet and end up with these three lines:

var oMe = window.self;
oMe.open(”,’_self’,”);
oMe.close();

You now will not have the message anymore. Keep in mind that any update or migration might remove this change, but you should be able to reapply the change easily again.

Quite often I see the question “how do I rename an area in CRM v3.0?”.

I could write an own example, but Arne Janning already did so in the public community. Here’s his post:

In the CRM-web-client click –> Settings –> Customization –> Export Customizations –> mark Site Map –> More Actions –> Export Selected Customizations –> Hit OK on the dumb dialog.

You get a customizations.xml-file to download. In that file you’ll find five area-elements: Workplace, SFA, MA, CS, Settings. These areas define the top-level structure of the “Wunderbar” (the Outlook-style navigation).

This is an example for an area-element:
<area id=”SFA” shape=”RECT” coords=”0,0,0,0″ resourceid=”Area_Sales” icon=”/_imgs/sales_24x24.gif” descriptionresourceid=”Sales_Description”>
To customize this you could add the “Title”-attribute to overwrite the ResourceId:

<area id=”SFA” title=”Clients” shape=”RECT” coords=”0,0,0,0″ resourceid=”Area_Sales” icon=”/_imgs/sales_24x24.gif” descriptionresourceid=”Sales_Description”>The strucure of the sitemap is well documented in the SDK, which BTW has been updated and improved lately :o)

Microsoft CRM 3.0 SDK

Client Programming Guide –> Navigation Configuration: SiteMap

Once you have finished your customizations in the sitemap you can upload the again:

Settings –> Customization –> Import Customizations –> select your file –> upload, publish and hit F5 to reload the Wunderbar.

Hope that helps.

Set a lookup to NULL

when you’re working in server side code:

Entity.Lookup = new Lookup();
Entity.Lookup.IsNull = true;
Entity.Lookup.IsNullSpecified = true;

this also works for customers:

contact.parentcustomerid = new Customer();
contact.parentcustomerid.IsNull = true;
contact.parentcustomerid.IsNullSpecified = true;

If you’re working in a client side javascript, then use this approach:

crmForm.all.lookupschemaname.DataValue = null;