+ Start a Discussion
Pink TacoPink Taco 

List has no rows for assignment to SObject.

Page Named Visit Plan is showing the calendar with teh events and routes list on right side of the page and on  left the calendar.. We can have the pwer to drag the event or route on the dat or day on the calendar.

 

Somehow, I am facing problem that, 

 

List has no rows for assignment to SObject  Error is in expression (updateVisit) in component (apex page) in page in salesforce.

 

And even I cannot paste or drag 2 events on same day or date plus we cannot save it. If I try to even paste  events on different dates, it will remove the previous one added on the previous date.

 

 

Can anyon eguide me on this. There is a trigger on that but I don't know where its creating an issue.

ashishkrashishkr
This happens when you query an object and it returns no result. So something like this would be the issue:
object__c xyz = [select id from object__c];

this can be avoided by putting the query as:
List<object__c> xyz = [select id from object__c];
and then doing a null check on xyz.

This is all generic. Paste your code here so that I can say more.
Pink TacoPink Taco

It didn't worked out.

 

Well, I have a very long code of 2500 lines in this... But If you don't mind can you try to see it online through teamviewer.

 

 

 

Kind Regards