How to override the service now's email notification onclick event - clientscript

I have a requirement like, When I click the email notification link in service now, the system should check for particular field is not null or null, if it is not null then only the service now's email notification window should open, otherwise one alert box should come say like pls enter that field first

As long as you are ok w/ all this validation being done client side you could modify the onClick event on the email notification link and add an additional function to check the value of the field and if not null, then call the original email onClick function.
Prototype is available in ServiceNow Forms clients side and provides a method to update attributes on elements.
You would need to modify the onClick function on the element with id='email_client_open', add a new onClick function to check that the field in question is populated and if so call the original function 'emailClientOpen(this, 'incident')' with the appropriate parameters.

Related

Branch.io custom event count not increasing for quick links

I have created a quick link from https://dashboard.branch.io/quick-links. When the user opens the link and tries to register the account on our website, a custom event is triggered from server side (Java) using the branch http API.
I can see that event in the Liveview section of Branch.io dashboard. But, when I go to the quicks section, the count for my custom event column is always showing as 0.
Is there any specific Branch related parameter that I need to send from client side (browser) to server side while submitting the form, to let Branch know that the custom event should be linked to a specific link, so I can see the custom event count increasing for that link in quick links section.
Your custom event will not be attributed to your link click if you trigger the event on the server side.
You should trigger the custom event from the client side post registration. You can put this in the callback of your registration method. If you navigate away from the initial redirect to your webpage, make sure that page has the Branch Web SDK initialized, and that you have the _branch_match_id(found in the address bar of your redirect) appended to your web url. This _branch_match_id is what Branch uses to attribute the custom event to your link click.
https://docs.branch.io/pages/web/integrate/#track-events

Button payload / callback?

I want to be able to reply to a user with my bot based on a button they pressed. So far, the only property I can find for button.onClick is "openUrl", but it doesn't seem possible to assign the button a value or a payload / callback URL. Additionally, there is no "Button Tapped" event.
How can I use buttons to allow my user to interact with my bot?
There are multiple ways to add a button response to Hangouts Chat. The primary one seems to be via using Cards with either KeyValue, or ActionResponse.
https://developers.google.com/hangouts/chat/how-tos/cards-onclick
You can use:
buttons.onClick.parameters.keyValue to pass unique Parameters
textButton.onClick.openLink to open a link with a text button
ActionResponse to update a card with a custom card when a Click event occurs.

Telegram Bot api custom keyboard additional data values

Is there any way to pass additional data values from custom keyboard layout buttons?
I need to pass a value like ID that they are hidden from user:
{"Button1",{"id":1}} ...
You cannot do it with custom keyboards, but it is possible with callback_data param of InlineKeyboard
When user will press inline button with callback_data specified message received by bot will be type of CallbackQuery with data param containing your data from the button.
That's not currently possible. It would be a great addition to the API, though, in order to separate the text you see from the value you send back to the bot.

Notification on new user sign up

In Shopify, is it possible to receive an email notification when a new user signs up (just like I get a notification when an order is placed)?
I have checked under Settings > Notifications but could not find anything. If this is not a default option provided by Shopify, is it possible to implement this using any app?
You can create a webhook to send a notification to a particular URL when the Customer creation event gets fired. Go to your Shopify admin, click on Settings, then on Notifications, scroll down and click on Create a webhook. Once the popup shows, from the dropdown, choose Customer creation Event, JSON or XML format and the url where you want to recieve the notification.
Once you have this setup, look for a webservice which reads webhooks and converts them into an email. Zapier would be a good nominee.

Send data form modal window Sharepoint

i am developing an application over Sharepoint 2010, I am using ECMAScript Client Object Model, so from one applications page using SP.UI.ModalDialog.showModalDialog(options) I am openning another page. From this second page I want to send the information the user inserts back to the parent page. HOw can I do this?.
Thanks a lot for any comments !
You can pass callback function in options of the showModalDialog method. This callback function takes two parameters, a dialogResult and a returnValue of type object that can contains any data.
http://msdn.microsoft.com/en-us/library/ff410058.aspx
When you close your modal dialog with method commonModalDialogClose you can pass result and object parameters and use them in your callback function in the parent window.
http://msdn.microsoft.com/en-us/library/ff409682.aspx