Visualforce: Uncaught TypeError: unable to read 'tid' property from undefined

I use Visualforce Remoting for the application and periodically get an error:

Uncaught TypeError: Cannot read the 'tid' property from undefined, from line 84 of the VFRemote.js library file.

The file is automatically uploaded to my page using my controller that detects remote actions.

https://c.na4.visual.force.com/jslibrary/1383366200000/sfdc/VFRemote.js (I know the note at the top, but not including this script directly on my page.)

I don’t understand what the reason is. If I refresh the application cache manifest, it will refresh the page and then the error will disappear.

Any thoughts? Is this a problem with the manifest?

+4
source share
4 answers

The problem is that you have a Visualforce.remoting ... method inside a static resource. For this line of code to work, it must be on the page with the top. You need to move the function that is on the visual strength page for it to work

0
source

I just want to confirm that I found the @Sven comment very helpful. I had the same problem 'tid' undefinedand it was stupid for me to go through the undefined parameter inRemoteAction

0
source

, angular promises . :

{
    buffer: false, 
    escape: true, 
    timeout: 120000 
}

, , . buffer: false.

0

, . { buffer: false, escape: true, timeout: 30000 }

, , . , , JS-, undefined , , .

, :

scope.getParentId = function() {

        EsignCongaSigningUrlRemoting.getEsignUrlParentIdFromObjectId($scope.objectId, 1, function(response, event) {
            if(event.status) {
                console.log('parentId in response = ',response);
                $scope.parentId = response;
                $scope.signingUrl($scope.parentId);

            } 
            else {
                $scope.parentId = '';
            }   


        },{ buffer: false, escape: true, timeout: 30000 }); 

    };
0

Source: https://habr.com/ru/post/1525692/


All Articles