- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 01:34 AM
Hi All,
I want to display a UI action only if logged in user company matches the company field on form.
If logged in user company is XYZ, and the company field on the form value is XYZ, then only UI action should be visible. Else, it should hide.
Please help me how can I acheive it.
Over UI action, I am trying to add a condition gs.getUser().getRecord(company).(current.u_company) But its not correct. Please guide me here.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 01:41 AM
hello,
in UI ACTION condition your can give as below
gs.getUser().getCompanyID()==current.your company field name
please mark my answer correct if it helps you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:05 AM
Hi i tested in PDI and it does work. Can you check company Name and user's company name are same? You need to put this in UI Action condition can you share the screenshot
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:07 AM
Hi here you have 4 AND conditions. so user should satisfy all 4 conditions for button to be visible also remove ! condition here this will return viceversa
!(new KBCommon().isStackNameDialog()) && (new KBCommon().isVersioningEnabled()) && (new KBVersioning().canCheckout(current)) && (gs.getUser().getCompanyID()==current.company)
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:25 AM
Which table are you talking about ? Knowledge table ? do you have company field on form or you are talking about author company ? Company should be a reference field then only it will work
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:41 AM
Yes, its a reference field, Relogging in resolved the issue , Thanks