Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

PageLoad not always being triggered

Richard
Contributor III

I have a Custom Object storing data in sessionStorage. The code is very simple:

Sys.Application.add_load(function() {
    console.log('Sys.Application.add_load() has been executed.');
    sessionStorage.setItem('applicationId', 'a001');
});

 It's very strange that sometimes this function is not executed. To be exact, with the same application, some records never trigger the function, while other records always correctly trigger it.

What is likely to be the cause of this problem?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Are there any other custom objects on the layout that could be causing a conflict?

 Advisory Consultant

View solution in original post

Richard
Contributor III

@DavidPetty 

Sorry for the late response...I had to turn to some other tasks and leave this issue with a workaround using MOSTRECENTVALUE and a Data Feeds to trigger the notifications for comments.

When I turned back to review this issue, I found that it was just caused by simple mistake: the application has multiple layouts and I did not create the custom objects in some of the layouts!! Now I've added the custom objects to all the layouts and it's working fine.

Many apologies for wasting your time on this.

View solution in original post

5 REPLIES 5

DavidPetty
Archer Employee
Archer Employee

@Richard I've never seen that behavior before, the Sys.Application.add_load should always fire.  Is the custom object inside of a tab set?

 Advisory Consultant

Hi @DavidPetty , the custom object is not in a tab set.

Could you think of any possibility that record contents can affect Sys.Application.add_load firing? Really don't know where I should start to investigate the reason...

Are there any other custom objects on the layout that could be causing a conflict?

 Advisory Consultant

Richard
Contributor III

@DavidPetty 

Sorry for the late response...I had to turn to some other tasks and leave this issue with a workaround using MOSTRECENTVALUE and a Data Feeds to trigger the notifications for comments.

When I turned back to review this issue, I found that it was just caused by simple mistake: the application has multiple layouts and I did not create the custom objects in some of the layouts!! Now I've added the custom objects to all the layouts and it's working fine.

Many apologies for wasting your time on this.

No worries.

Glad you got it all ironed out

 Advisory Consultant