Hi,
I got this error while using CrmService from an web application.
Later i found that Crm Asynchronous Service(client) was not running, so starting it solved the issue.
Just thought of sharing that !
Bye..
Hi,
I got this error while using CrmService from an web application.
Later i found that Crm Asynchronous Service(client) was not running, so starting it solved the issue.
Just thought of sharing that !
Bye..
Hi,
We could use the following script to hide the form assistant in Crm , we would use it in the form load event
document.getElementById(‘RelatedInformationPane’).style.display=’none’;
// ToggleInformationPane() to toggle the form assistant pane
document.all.RelatedInformationPane.ToggleInformationPane();
For CRM 4.0, go to customization ->customize entities-> select your entity–> select form properties->select Display tab and uncheck enable form assistant check box !!
Bye..
Just an example of using PreDelete callout !!!
public override PreCalloutReturnValue PreDelete(CalloutUserContext userContext,
CalloutEntityContext entityContext,
ref string errorMessage)
{
// Use retrive to get the status value
CrmService service=new CrmService();
service.CallerIdValue=new CallerId();
service.CallerIdValue.CallerGuid=userContext.UserId;
service.Credentials=System.Net.CredentialCache.DefaultCredentials;
// Get status value
ColumnSet cols=new ColumnSet();
cols.Attributes=new String[]{“statuscode”};
BusinessEntity busEntity= service.Retrieve(EntityName.salesorder.ToString(),entityContext.InstanceId,cols);
salesorder poOrder=(salesorder)busEntity;
// check for PO status value
string poStatusValue=poOrder.statuscode.Value.ToString();
// if status is found cancel the event and show error message
if(poStatusValue==1)
{
errorMessage = “Aborting delete : Record cannot be deleted !”;
return PreCalloutReturnValue.Abort;
}
return PreCalloutReturnValue.Continue;
}
Bye…
Hi,
I wanted to certain script to run in the onload of the body for my content page.
To do this we need to do the following
Add an id and runat attribute to the body tag in the MASTER page
<body id=”body” runat=”server”>
And in the Content page’s page load handler
protected void Page_Load(object sender, EventArgs e)
{
HtmlGenericControl body = this.Master.FindControl(“body”) as HtmlGenericControl;
body.Attributes.Add(“onLoad”, “alert(‘Hello World’);”);
}
Bye…
Hi,
I was getting this error when trying to open a asp.net 2.0 page.
However other applications developed in asp.net 1.1 were running fine.
Then realized that both of them were using the same Application Pool, so created a new application pool and assigned this new application pool to my asp.net 2.0 application.
That solved the issue.
“An application pool is a process that responds to web requests under IIS. An application pool does not have a setting for what type of ASP.Net applications will be run in it. Instead, it loads the appropriate libraries when an ASP.Net application is loaded in the process. Because the libraries for ASP.Net 1.1 and ASP.Net 2.0 are similar, but not the same, the application pool cannot respond to requests for both types of applications at the same time. This can cause sporadic behavior if you are using the server at the same time as another developer and you have applications using different versions of the framework in the same application pool”
Bye..
Hi,
I was trying to figure out what the recalcuate button does in case of Order and Quote form. Got to know that it calculates the total based on the Products added to that record. Behind the scene this is the html code for the recalculate button
<li tabIndex=”-1″ title=”Recalculate” id=”_MBcrmFormSubmitCrmForm1truetruefalse”
onclick=”window.execScript(action)”
action=”crmForm.SubmitCrmForm(1, true, true, false);”>
So basically it calls SubmitCrmForm function.
SubmitCrmForm triggers the save event even if there are no modifications made on the form.
SubmitCRMForm( Mode, Validate, ForceSubmit, closeWindow) // we could use this function but it is unsupported
Different Mode could be -1,2,7,58,59
or alternatively we could use the below function
Save
Code: 1
Function: crmForm.Save();
SaveAndClose
Code: 2
Function: crmForm.SaveAndClose();
Send
Code: 7
Function: send();
SaveAsCompleted
Code: 58
Function: SaveAsCompleted();
SaveAndNew
Code: 59
Function: crmForm.SubmitCrmForm(59, true, true, false);
Bye…