94
Views
7
Comments
Cannot read properties of undefined (reading 'toString')
Application Type
Mobile, Reactive

It is so irritating, i added one more field in the database, with name code & trying to use it on the form widget. Issue started it is so irritating just strait forward textfield still having javascript issues  

2023-02-26 23-17-33
Kshitij Raheja

Hey @Pradip Chavhan 

Please share your OML so we can see and regenerate the issue

Regards,
Kshitij

2024-02-27 12-57-22
Sam Rijkers

Do you have a question or is it just a complaint?

2022-01-13 11-06-04
Neha Sheikh
Champion

Hi Pradip,

adding a field in the database should not cause the mentioned Javascript issue. This issue typically appears when the element you are using in Javascript is not present on DOM. I suggest you to debug the application properly. You can click on this error in Browser's developer tool and find the exact element causing the issue. 

Please share OML so that we can help you find the exact issue.

Thanks,

Neha

UserImage.jpg
Harshita Mirase

core.mjs:8506 ERROR TypeError: Cannot read properties of undefined (reading 'toString')

    at OrderService.ApprovedRejectWOLabels (order.service.ts:150:69)

    at LablefiledocumentComponent.Submit (lablefiledocument.component.ts:75:26)

    at LablefiledocumentComponent_Template_form_ngSubmit_0_listener (lablefiledocument.component.html:1:73)

    at executeListenerWithErrorHandling (core.mjs:14090:16)

    at Object.wrapListenerIn_markDirtyAndPreventDefault [as next] (core.mjs:14123:22)

    at SafeSubscriber.__tryOrUnsub (Subscriber.js:183:16)

    at SafeSubscriber.next (Subscriber.js:122:22)

    at Subscriber._next (Subscriber.js:72:26)

    at Subscriber.next (Subscriber.js:49:18)

    at EventEmitter_.next (Subject.js:39:25)


2021-06-03 11-03-21
Anubhav Rai

Hi @Pradip Chavhan ,

If you can share your OML then we can able to find the exact root cause.
Meanwhile, you can check this discussion, it might be helpful.
In short, You have added new attributes that have null/ blank data and while rendering your screen some Js are giving this error while accessing the blank data of the newly added attribute.



Regards, 

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Pradip Chavhan,

You drop a frustration, not even a question, 4 community members reply, and then it is silent from your side...

Regards,

Daniel

2022-05-18 07-58-50
Pradip Chavhan

Hi All,

I was working on it, so I apologize for the delayed response.  I noticed that the response did not follow the predefined structure because it contained certain special characters.

https://jsonformatter.curiousconcept.com/# 


I think @Kilian Hekhuis shared the above link on the other response, which is where I inserted the response check to see if it's valid or not.


callback procedure "OnAfterResponse" is how I rebuild/customize the response after deleting the characters from the initial version. "I did the workaround for now but need best practice to remove unnecessary characters from the response." It is now working as expecetd. 

I appreciate all of your responses. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.