[SafeCall Exception]: UnexpectedEvent (Error Number: 65535) --- happens when performing insert through custom page

Hi,

I have a custom entity called 'Project'. This entity is linked to a company id and person id where these two fields are of type 'Adv Search Select'.

When creating new project record only project name and company id fields are mandatory. When saving a record i ll get the following error message :

[SafeCall Exception]: UnexpectedEvent (Error Number: 65535)

It is important to note that i am using a custom page to accomplish this.

The code of my custom page is below:

----------------------------------------------------------------------

if(CRM.Mode ==View)
{
CRM.Mode = Edit;
}

var myBlock = CRM.GetBlock('ProjectDetailsBox');
var myRecord = CRM.CreateRecord('Project');

myBlock.Title = "Project";

CRM.AddContent(myBlock.Execute(myRecord));
Response.Write(CRM.GetPage());

if(CRM.Mode == Save)
{
Response.Redirect(CRM.URL('ProjectSearch.asp'))
}

The main key for me here is to be able to create a custom entity which can be linked to a company id (+person id optionally).

Please help me. I would really appreciate.

  • 0

    Michal

    Have you looked in the SQL logs and the System log to see what more information is provided?

  • 0

    Hi Jeff,

    Please see below:

    System Log :

    -----------------------------------------------------------------------------------------------------------------------------

    Nov 25 2013 12:03:02.700 6688 3732 1 startup,version,dllsize,dlldate,exehost,imagebase,reference Sage CRM 7.2 11306496 Mar 26 2013 17:16:10.000 C:\Windows\SysWOW64\inetsrv\w3wp.exe 1A88CF70 #line#

    Nov 25 2013 12:03:08.982 6688 3732 1 Metadata 3853

    Nov 25 2013 12:03:09.180 6688 3732 2 UserLogon,UserID,UserCount Admin 1

    Nov 25 2013 12:03:09.183 6688 3732 1 PrepImpersonatefail,Error DuplicateToken failed
    Access is denied

    Nov 25 2013 12:03:09.192 6688 3732 1 ** Created global user activity thread **

    Nov 25 2013 12:03:09.193 6688 2372 1 ImpersonateThread.Impersonate,Error ImpersonateLoggedOnUser failed
    Access is denied

    Nov 25 2013 12:03:09.201 6688 360 5 BrowseUrl URL: pc-mponcak/.../refreshSysParams

    Nov 25 2013 12:03:10.349 6688 3732 1 CRMOpenThreadTokenWinVista

    Nov 25 2013 12:03:10.453 6688 360 5 BrowseUrl finished URL: pc-mponcak/.../refreshSysParams

    Nov 25 2013 12:03:12.088 6688 3732 5 RunEscalations,EWAREDLL,Campaign Launch Failure Notice,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10148 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.101 6688 3732 5 RunEscalations,EWAREDLL,Campaign Over Budget,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10149 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.143 6688 3732 5 RunEscalations,EWAREDLL,Campaign Close To Budget,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10150 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.154 6688 3732 5 RunEscalations,EWAREDLL,Email Reminder,DontDoRule,select * from vWorkflowActions where WkRl_RuleId = 65 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.157 6688 3732 5 RunEscalations,EWAREDLL,Communication Reminder,DoRule,select * from vWorkflowActions where WkRl_RuleId = 117 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.215 6688 3732 5 RunEscalations,EWAREDLL,Backup Failure Notice,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10152 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.226 6688 3732 5 RunEscalations,EWAREDLL,Backup Completed Notice,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10153 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.236 6688 3732 5 RunEscalations,EWAREDLL,Opps Overdue,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10160 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.256 6688 3732 5 RunEscalations,EWAREDLL,Quote Expiry,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10123 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.284 6688 3732 5 RunEscalations,EWAREDLL,Exchange Integration Notification,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10133 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:12.295 6688 3732 5 RunEscalations,EWAREDLL,Email Blast Failure Notice,DoRule,select * from vWorkflowActions where WkRl_RuleId = 10147 AND Wkac_action = N'Notify'

    Nov 25 2013 12:03:13.553 6688 3732 1 Wrong keys request: []

    Nov 25 2013 12:03:13.554 6688 3732 1 Wrong keys url: [/CRM/eware.dll/Do?SID=131457181643383&Act=164&Mode=1&CLk=T]

    Nov 25 2013 12:03:13.554 6688 3732 1 Wrong keys: [0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]

    Nov 25 2013 12:03:13.554 6688 3732 1 Wrong nokeys: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]

    Nov 25 2013 12:03:13.910 6688 5252 4 StartUserAction,User,Action 1 6001

    Nov 25 2013 12:03:14.026 6688 5252 4 EndUserAction,User,Action,Time 1 6001 109

    Nov 25 2013 12:03:14.107 6688 5252 4 StartUserAction,User,Action 1 1696

    Nov 25 2013 12:03:14.160 6688 5252 4 EndUserAction,User,Action,Time 1 1696 63

    Nov 25 2013 12:03:14.434 6688 6800 3 CoeWareBase,Time 63

    Nov 25 2013 12:03:14.995 6688 3732 4 StartUserAction,User,Action 1 6003

    Nov 25 2013 12:03:15.070 6688 3732 4 EndUserAction,User,Action,Time 1 6003 78

    Nov 25 2013 12:03:21.394 6688 3732 4 StartUserAction,User,Action 1 6030

    Nov 25 2013 12:03:21.576 6688 3732 4 EndUserAction,User,Action,Time 1 6030 188

    Nov 25 2013 12:03:21.733 6688 4088 3 CoeWareBaseInit,QueryString SID=131457181643383&Key0=4&Key4=1&J=AirtechEntry.asp&T=new&T=new&NormalRec=Y

    Nov 25 2013 12:03:21.863 6688 4088 3 CoeWareBase,Time 140

    Nov 25 2013 12:03:30.844 6688 3732 4 StartUserAction,User,Action 1 512

    Nov 25 2013 12:03:30.958 6688 3732 3 CoeWareBase,Time 109

    Nov 25 2013 12:03:30.958 6688 3732 4 EndUserAction,User,Action,Time 1 512 125

    Nov 25 2013 12:03:34.338 6688 3732 4 StartUserAction,User,Action 1 512

    Nov 25 2013 12:03:34.518 6688 3732 3 CoeWareBase,Time 188

    Nov 25 2013 12:03:34.519 6688 3732 4 EndUserAction,User,Action,Time 1 512 188

    Nov 25 2013 12:03:36.333 6688 6612 4 StartUserAction,User,Action 1 1275

    Nov 25 2013 12:03:36.374 6688 6612 4 EndUserAction,User,Action,Time 1 1275 47

    Nov 25 2013 12:03:36.463 6688 6612 4 StartUserAction,User,Action 1 1275

    Nov 25 2013 12:03:36.507 6688 6612 4 EndUserAction,User,Action,Time 1 1275 47

    Nov 25 2013 12:03:38.703 6688 4088 3 CoeWareBaseInit,QueryString SID=131457181643383&Key0=4&Key4=1&J=AirtechEntry.asp&T=new&T=new&NormalRec=Y

    Nov 25 2013 12:03:38.719 6688 4088 1 SQL Error : Incorrect syntax near 'Project' (INSERT INTO Project

    )

    Nov 25 2013 12:03:38.722 6688 4088 1 UnexpectedEvent : SQL Error
    INSERT INTO Project

    Nov 25 2013 12:03:39.478 6688 4088 3 CoeWareBase,Time 780

    SQL Log:

    --------------------------------------------------------------------------------------------------------------------------------------

    Nov 25 2013 12:03:38.716 6688 4088 1 execsql,time,sql,errormsg 0 INSERT INTO Project

    Incorrect syntax near 'Project'

  • 0

    Jeff,

    I fixed it. Instead of creating company and person id fields in new table window where you have to provide your prefix description field and tbl name etc. i simply created a new tbl without these fields and i added them manually through Project entity.