G
G
Guliver992021-04-19 18:25:28
1C-Bitrix
Guliver99, 2021-04-19 18:25:28

Why doesn't object to string work in Bitrix?

Bitrix **** on a piece.

since the currentTab object is not translated into a string by the toString function, I decided to make it the old proven method via JSON.stringify :

BX.addCustomEvent('onEntityDetailsTabShow', function (currentTab) {
    alert(JSON.stringify(currentTab));
});


but it was not there. catching errors:

VM5017:2 Uncaught TypeError: Converting circular structure to JSON
--> starting at object with constructor 'BX.Crm.EntityDetailTabManager'
| property '_items' -> object with constructor 'Array'
| index 0 -> object with constructor 'BX.Crm.EntityDetailTab'
| property '_settings' -> object with constructor 'Object'
--- property 'manager' closes the circle
at JSON.stringify ()
at Object. (:2:16)
at Function.e (core.js:11562)
at Function.tr [as onCustomEvent] (core.js:15139)
at BX.Crm.EntityDetailTab. (script.js:1105)
at Object.complete (core.js:16137)
at BX.easing.stop (session.js:
at BX.easing. (session.js:129)
at core.js:16137


Who knows what the problem is and how can I see the contents of the object?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question