The two best links for someone working with Active Directory using .NET
http://www.codeproject.com/KB/system/everythingInAD.aspx
http://www.ianatkinson.net/computing/adcsharp.htm
Bye..
The two best links for someone working with Active Directory using .NET
http://www.codeproject.com/KB/system/everythingInAD.aspx
http://www.ianatkinson.net/computing/adcsharp.htm
Bye..
I got this error while opening CRM!!
Starting the Microsoft CRM Asynchronous Processing Service on the server solved the problem for me!!!
or if that doesn’t work try this
“C:\Program Files\Microsoft Dynamics CRM\Tools >Microsoft.Crm.Tools.WRPCKeyRenewal.exe /R”
Bye.
We had a requirement of creating an InfoPath form that would use a repeating table and to do certain calculations on the values in rows of the repeating tables and display the result in a separate section.
Here is a screen shot of the same !
So above here, based on activity selected and time spent specified for it, the Total hours and Total days ( total hours/ 8) needs to be calculated.
Here is the sample code for that
public void group7_Changed(object sender, XmlEventArgs e)
{
// Create an XPathNavigator from the main data source
XPathNavigator domNav = MainDataSource.CreateNavigator();
// Create an XPathNodeIterator to iterate through all the rows
XPathNodeIterator rows = domNav.Select(
"/my:myFields/my:group6/my:group7", NamespaceManager);
// Create Navigator for each of the fields where total needs to be displayed
XPathNavigator lblTotalSpecHours = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblSpecHours", NamespaceManager);
Int32 intTotalSpecHours = 0;
XPathNavigator lblTotalConsultancyHours = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalConsulHours", NamespaceManager);
Int32 intTotalConsultancyHours = 0;
XPathNavigator lblTotalDevelopmentHours = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalDevHours", NamespaceManager);
Int32 intTotalDevelopmentHours = 0;
XPathNavigator lblTotalTestingHours = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalTestingHours", NamespaceManager);
Int32 intTotalTestingHours = 0;
XPathNavigator lblTotalDeploymentHours = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalDepHours", NamespaceManager);
Int32 intTotalDeploymentHours = 0;
// loop through all the rows of repeating table
while (rows.MoveNext())
{
// Get values for Activity dropdown field and Time Spent field
string fldActivity = rows.Current.SelectSingleNode(
"my:ddlActivity", NamespaceManager).Value;
string fldTimeSpent = rows.Current.SelectSingleNode(
"my:txtTimeSpent", NamespaceManager).Value;
if (fldActivity == "Specification" && fldTimeSpent!="")
{
intTotalSpecHours += Convert.ToInt32(fldTimeSpent);
}
if (fldActivity == "Consultancy" && fldTimeSpent != "")
{
intTotalConsultancyHours += Convert.ToInt32(fldTimeSpent);
}
if (fldActivity == "Development" && fldTimeSpent != "")
{
intTotalDevelopmentHours += Convert.ToInt32(fldTimeSpent);
}
if (fldActivity == "Testing" && fldTimeSpent != "")
{
intTotalTestingHours += Convert.ToInt32(fldTimeSpent);
}
if (fldActivity == "Deployment" && fldTimeSpent != "")
{
intTotalDeploymentHours += Convert.ToInt32(fldTimeSpent);
}
}
// for Specification
RemoveNilAndSetHours(lblTotalSpecHours, intTotalSpecHours);
XPathNavigator lblTotalSpecDays = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblSpecDays", NamespaceManager);
RemoveNilAndSetDays(lblTotalSpecDays, intTotalSpecHours);
// for Consultancy
RemoveNilAndSetHours(lblTotalConsultancyHours, intTotalConsultancyHours);
XPathNavigator lblTotalConsultancyDays = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalConsulDays", NamespaceManager);
RemoveNilAndSetDays(lblTotalConsultancyDays, intTotalConsultancyHours);
//// for Development
RemoveNilAndSetHours(lblTotalDevelopmentHours, intTotalDevelopmentHours);
XPathNavigator lblTotalDevelopmentDays = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalDevDays", NamespaceManager);
RemoveNilAndSetDays(lblTotalDevelopmentDays, intTotalDevelopmentHours);
//// for Testing
RemoveNilAndSetHours(lblTotalTestingHours, intTotalTestingHours);
XPathNavigator lblTotalTestingDays = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalTestingDays", NamespaceManager);
RemoveNilAndSetDays(lblTotalTestingDays, intTotalTestingHours);
//// for Deployment
RemoveNilAndSetHours(lblTotalDeploymentHours, intTotalDeploymentHours);
XPathNavigator lblTotalDeploymentDays = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:lblTotalDepDays", NamespaceManager);
RemoveNilAndSetDays(lblTotalDeploymentDays, intTotalDeploymentHours);
}
// RemoveNil for the fields and set value
public void RemoveNilAndSetDays(XPathNavigator xpathNav, int totalHours)
{
if (xpathNav.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
xpathNav.DeleteSelf();
int days = totalHours / 8;
xpathNav.SetValue(days.ToString());
}
public void RemoveNilAndSetHours(XPathNavigator xpathNav, int totalHours)
{
if (xpathNav.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
xpathNav.DeleteSelf();
xpathNav.SetValue(totalHours.ToString());
}
Change the extension of the file from .doc to .xsn !!!
Bye..
We could get the above error while trying to set value for a field using XPathNavigator. The reason could be that the field has the nil attribute set
Most of the fields with the exception of String Type uses nil to indicate “no value”.
So before we could set the value for those fields, we need to remove the nil attribute from it.
We could use the below code for that.
XPathNavigator node= MainDataSource.CreateNavigator()
.SelectSingleNode(“/my:myFields/my:lblSpecHours”, NamespaceManager);
if (node.MoveToAttribute(“nil”,
“http://www.w3.org/2001/XMLSchema-instance”))
node.DeleteSelf();
node.SetValue(txtValue);
Bye..
I was assigned a certain task in InfoPath, and while browsing for some help, i found this site.
http://www.bizsupportonline.net/
It seemed like one of the best sites as far as InfoPath development and SharePoint integration part of it are concerned.
Bye..
Hi,
I was just looking for the various options for the above scenario.
These are the different options that i found
http://www.dynamicscrmtrickbag.com/2009/09/13/email-record-links/
http://www.powerobjects.com/blog/2009/02/23/crm-40-links-in-workflow-emails-part-2/
http://blog.powerobjects.com/2008/09/16/crm-40-links-to-entities-in-workflow-email/
http://a33ik.blogspot.com/2009/06/creation-of-shortcut-to-record-in.html
and finally using ‘Url Functions’ extensions found in
Business Productivity Workflow Tools
find more information on it over here
http://blog.customereffective.com/blog/2009/10/make-microsoft-dynamics-crm-workflow-more-useful.html
Bye.