ASP
Cannot see the error messages in IIS
You can configure these settings by using IIS Manager. To do so, open IIS Manager and navigate to the site or application where you want to enable or disable script messages, and then double-click the ASP feature.
In the list of ASP features, configure the Script Error Message and Send Errors To Browser options.
Cannot create automation object - Issue caused by the eware.dll not being registered correctly
Instruction to manually swap in a new eware.dll
#Stop the IIS server. #Backup the existing CRM eWare.dll and database, rename the eWare.dll file. #Copy the interim patch eWare.dll to the CRM directory. #Register the new eWare.dll by using regsvr32.exe.e.g. regsvr32 "C:\Program Files\Sage\CRM\\WWWRoot\eWare.dll" #Restart the IIS server.
Nice details here on how to use security in ASP pages
Basically you use the CRM.Button API
if (!CRM.Button("caption","image.gif", "url.asp","COMPANY","EDIT"))
{
...so something
}
Parameters
1. Caption: The caption for the button. This is translated based on the user's language (providing there is a matching entry in CRM Translations).
2. ImageName: The image you want displayed on the button. All images need to be stored in the CRM directory 'Img' folder.
3. URL: The URL that this button links to. This can either be a link to a Web address or to a custom page in the CRM custom pages folder. (See URL below).
4. PermissionsEntity: PermissionsEntity is the name of the entity.
5. PermissionsType is either VIEW, EDIT, DELETE or INSERT, depending on the action of the button.
6. Target: This allows the TARGET property of the button's anchor () tag to be set.
To Enumerate the columns in a crm record object you can do the following:
var myE = new Enumerator(recordObj);
while (!myE.atEnd()) {
var nm=myE.item();
//...do seomthing
myE.moveNext();
}
Code to sent a message and create a communicationn in CRM
var myMailObject = CRM.GetBlock("Messageblock");
with (myMailObject){
DisplayForm = false;
var strEmailId=new String(ctQueueRec.ctqu_data1);
if(strEmailId=="" || strEmailId=="undefined")strEmailId="";
if(strEmailId!=""){
var strSubject=new String(ctQueueRec.ctqu_data2);
if(strSubject=="" || strSubject=="undefined")strSubject="";
var strBody=new String(ctQueueRec.ctqu_data3);
if(strBody=="" || strBody=="undefined")strBody="";
mSubject =strSubject;
mBody =strBody;
AddRecipient(strEmailId,strEmailId,"TO");
Mode = 2;
//CRM.AddContent(myMailObject.execute());
if (true){
var RecordComm = CRM.CreateRecord("Communication");
RecordComm.comm_action="EmailOut";
RecordComm.comm_status="Complete";
RecordComm.comm_priority="Normal";
RecordComm.comm_type="Task";
RecordComm.comm_to=strEmailId;
RecordComm.comm_email=strBody;
RecordComm.comm_subject=strSubject;
RecordComm.comm_note=strSubject;
RecordComm.comm_datetime=executiondate.getVarDate();;
RecordComm.SaveChanges();
var RecordComm_Link = CRM.CreateRecord("Comm_Link");
RecordComm_Link.CmLi_Comm_CommunicationId=RecordComm.comm_communicationid;
RecordComm_Link.CmLi_Comm_UserId=1;
var ipersonId=new String(ctQueueRec.ctqu_data4);
if(ipersonId=="" || ipersonId=="undefined")ipersonId=0;
if(ipersonId!=0)
RecordComm_Link.CmLi_Comm_PersonId=ipersonId;
//RecordComm_Link.cmli_comm_companyid=strCompanyId;
RecordComm_Link.SaveChanges();
Response.Write("done"+ipersonId);
}
else{
Response.Write("There has been a problem: "+mErrorMessage);
}
}
}
800ffff error on pages
This is a CRM issue and you need to restart the server to resolve this