• gjblajian
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I have the below code which is attempting to create a task based on the Id set in the EWM_Contact__c lookup field in the parent object of the trigger's object but I keep getting the following error

Assigned To: Assigned To ID: owner cannot be blank

The problem is that when I run the SOQL [select name, Household_Name__r.EWM_Contact__r.Id from Investment_Profile__c where name = 'Test Original Contact Entry'] I can retrieve the id for this field so I know it is not blank. Can anyone tell me what I am doing wrong?

...
if((ipOld != null && ipNew.Account_Status__c == 'Client Onboarded' && ipOld.Account_Status__c != ipNew.Account_Status__c)){
Id id = ipNew.Household_Name__r.EWM_Contact__r.Id;
if(al.StringUtils.isNotBlank(''+ id)){
Task t = new Task();
t.OwnerId = id;
t.Subject = 'EWM Client Welcome Call';
t.ActivityDate = date.today().addDays(7);
t.Priority = 'Normal';
t.Status = 'Not Started';
t.WhatId = ipNew.Household_Name__r.Id;
insert t;
}
}
...

I have the below code which is attempting to create a task based on the Id set in the EWM_Contact__c lookup field in the parent object of the trigger's object but I keep getting the following error

Assigned To: Assigned To ID: owner cannot be blank

The problem is that when I run the SOQL [select name, Household_Name__r.EWM_Contact__r.Id from Investment_Profile__c where name = 'Test Original Contact Entry'] I can retrieve the id for this field so I know it is not blank. Can anyone tell me what I am doing wrong?

...
if((ipOld != null && ipNew.Account_Status__c == 'Client Onboarded' && ipOld.Account_Status__c != ipNew.Account_Status__c)){
Id id = ipNew.Household_Name__r.EWM_Contact__r.Id;
if(al.StringUtils.isNotBlank(''+ id)){
Task t = new Task();
t.OwnerId = id;
t.Subject = 'EWM Client Welcome Call';
t.ActivityDate = date.today().addDays(7);
t.Priority = 'Normal';
t.Status = 'Not Started';
t.WhatId = ipNew.Household_Name__r.Id;
insert t;
}
}
...

if i disable showheader it failes calling the apex webservice but if i enable show headers it works on the sites page why is this?

 

Uncaught {faultcode:'UNKNOWN_EXCEPTION', faultstring:'UNKNOWN_EXCEPTION: Site under construction', }

Hi I am using sforce.apex.execute call from javascript in my VF page to execute a method in global method of a webservice apex class. This is working fine on Sandbox Site page but throws an error:-


{faultcode:UNKNOWN_EXCEPTION, faultstring:UNKNOWN_EXCEPTION: 'Site UNder Construction',}

 

when we deploy the code to production org that is hosted on na6. It also works fine in VF page on production org but on Sites page it fails.

 

Any thoughts why it is happening?