on ‎2018 Nov 05 9:01 AM
Hello,
Welcome, I wanted to ask if you know how to overwrite, extend customerDialog.js. There is no access to it from the window level, and it is generated only on document ready page. @JSInject(targetScreen="sales") , does not help overwrite customerDialog.js. Standard extend javascript function does not work because it has no access. Help how to edit/modify the file?
Request clarification before answering.
Hi Tomasz,
Have you already tried to handle 'dialogopen' event:
$("#dialogCustomer ").on("dialogopen", function (event, ui) { console.log('opened'); $("#lastNameInput").hide(); });If you need to have more control, i.e. check if the dialog is in edit mode you might want to detect attribute change event on one of the fields existing on the dialog - check 'disabled' attribute.
Kind regards,
Radek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomasz,
sorry for the late reply. This is imho not possible in a "API" way in cco. What you could do (did not test it myself, but dont hesitate to give feedback):
Using monkey-patching to override third party javascript.
http://me.dt.in.th/page/JavaScript-override/
Another way would be intercepting the click event on the "new" Button in the customer dialog and creating this form all by yourself and register the same events on your own dialog as registered on the CCO dialog (e.g. click on the save button to save the newly created customer,...).
hth
Kind regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
short question:
What do you want to achieve?
Kind regards
Robert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.