function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kailas MahajanKailas Mahajan 

I need help on Lightning migration, after looking into lightning report I see recommendation "window" should be replaced by "sforce" how I can replace this in my .js files, I mean how I can replace this into my Static Resources. Please suggest

Sagar PareekSagar Pareek
This means where ever you are using navigation code ( URLFOR/ window.top.location / window.top.href) you need to use sforce.one.navigateToURL('youURLString');
 
Kailas MahajanKailas Mahajan
Thanks Sagar,
Kailas MahajanKailas Mahajan
In addition of my above question I am also seen the statement like as below in Static Resource file " jquery.js"
1. Statment:
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
            return false;
2. Statement
if ( data && jQuery.trim( data ) ) {
            // We use execScript on Internet Explorer
            // We use an anonymous function so that context is window
            // rather than jQuery in Firefox
            ( window.execScript || function( data ) {
                window[ "eval" ].call( window, data );
            } )( data );

Here what is the expected that I should I have to replace in place of Window.

Thanks in advance for your help

Regards,
Kailas