- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 05:28 PM
ServiceNowで同一ブラウザ複数タブで操作されるのを防ぐ手段をご存知でしょうか?
BtoCのWebブラウザでのサービスでまれに複数タブ開いて作業するとアラートが上がる物もある記憶で、もしそのようなプロパティ値など何か情報あればと思い質問しました。
(別ブラウザなど複数セッションに関する記載は見つけました
https://docs.servicenow.com/ja-JP/bundle/tokyo-platform-security/page/integrate/authentication/conce...
例えば、ReadOnlyの制御はonLoadのタイミングで実装しているのを、別タブで操作した後に、先に開いて放置していたタブから保存されるなどして困っています。
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:57 PM
@Ryouta Kodama
未検証ですが、Before update のBRを使用して、currentのレコードの更新回数と更新日時とDBにあうそのレコードの更新回数と更新日時を比較し、不一致なら、更新を中止し、エラーメッセージを出すことは可能かな?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2023 12:13 AM
PlatformでのRecord表示であれば、今誰がどのレコードを表示しているか管理しているsys_amb_channel_presence テーブルがあります。 例えばIncidentで 複数の人が同じRecordを表示しているときに、ヘッダーに同じRecordを見ている人のアイコンが表示されます。この機能のためにsys_amb_channel_presenceテーブルが利用されているようです(不確か)。このテーブルを検索することで、すでに自分が表示しているかどうかも把握できるはずです。 タブを閉じると消えてなくなります。 詳しい動作などを説明したページはありませんが、検証してみる価値はありそうです。
ページを表示するときにすでに自分が表示している状態(sys_amb_channel_presence に自分のレコードがある)ならページ表示を制限する、数秒おきにRecordの状態を監視してRecordが消えたら、独占としてページの状態を復帰させるなど制御できそうです。閉じて開いてを連続で行うと、タイミング的に重なることもありそうなので、その調整や対処は必要そうです。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:25 PM
Since ServiceNow works on the principle of - one session per instance per browser the fix would be close the browser tabs.
ServiceNow uses the cache memory stored in the local system. It doesn't make a distinction even if there are different session IDs active.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response helped in any way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 06:34 PM
Thanks for the quick reaction.
I apologize for my lack of explanation.
We are letting you know that we do not want you to operate on multiple tabs.
However, when Mr. A opens two tabs in the same browser, and after the status of the record operated in the first tab changes, he operates on the same record in the second tab, resulting in an update process of a type that is impossible.
This is happening, and we would like to know if there is any way to prevent this, such as alerting us if we try to operate on multiple tabs.
Thank you in advance.
(早速のリアクションに感謝します。私の説明が不足していてすみません。
私たちは複数タブでの動作を行わないで欲しいと知らせています。
しかし、Aさんが同じブラウザでタブを2つ開いて、1つ目のタブで操作してあるレコードのステータスが変わったあとに、2つ目のタブで同じレコードに対して操作する事で本来有り得ないタイプの更新処理となる。
このような事象が起きているので、複数タブで操作しようとするとアラートを出すなど、複数タブの操作を防ぐ手段があれば教えてほしい、という質問でした。よろしくお願いします。)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2023 07:34 PM
When the person updates the record on the first tab it also updates the local cache, you should also see the change reflected live on the second tab.
Unfortunately, there isn’t a way to have a second tab open as read only for the same record your working on in Tab A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 09:18 PM
早速ありがとうございました。遅くなりすみません。
もう1つ前提を記載漏れていたのですが、ポータルに設けたウィジェットでの話でした。
1つ目のタブの操作で更新した情報がライブで2つ目のタブに反映されずに、2つ目のタブで当該の項目が(空)であったら(空)で更新してしまうので、例えば、「既に更新されてるからもう1度読み込んでから操作しなさい」とかアラートなりエラーが出せたら有難いとも思っています。
ただどちらにしてもお話聞いていると無さそうな気はしています。
もしご意見あればコメント頂けると有難いです。
Thank you for your prompt attention. Sorry for the delay.
I forgot to mention one more assumption: I was talking about the widget in the portal.
I would appreciate it if there is an alert or an error message that says, for example, "The information updated in the first tab is not reflected live in the second tab, and if the item in question is (empty) in the second tab, it will be updated as (empty). I would appreciate it if I could get an alert or error message.
But I don't think there is any way to do that.
If you have any suggestions, I would appreciate it if you could comment.