How to disable 'Recent Documents' and 'Recenet Views' in Openbravo? - openbravo

After Completing the Invoice user cannot see the Invoice in any menu
[For example]. But from the Recent documents user able to open the record and edit it.
To avoid this either have to Disable Recent Documents and or make the record read-only.
Coming to Recent Views, sometimes we disabling Menus under certain Roles but user still able to open those menus from Recent Views and perform the actions.
Expecting any configuration changes that might disable these troublesome features without doing any changes to the Core.

I have checked the official documentation.I haven't found the option to disable to recent documents.
Alternatives:-
1)Mark the role as portal user.
Corns:-User won't have access to any of the menu's.Access should be given using a widget.
2)Using a trigger which will override the recent documents will null
I tried using the business event handler to block the recent documents but system is not allowing.So i went with trigger approach.
Use the below trigger it will erase all the recent documents.(Only once ther user is logged out)
create or replace TRIGGER DB_PREFIX_DISABLE_RECENTDOC BEFORE
INSERT OR
UPDATE
--OF PROPERTY,VALUE
ON AD_PREFERENCE FOR EACH ROW
--WHEN (NEW.PROPERTY='OBUIAPP_RecentDocumentsList')
BEGIN IF AD_isTriggerEnabled()='N' THEN RETURN;
END IF;
IF(:new.PROPERTY ='OBUIAPP_RecentDocumentsList') THEN
IF (INSERTING OR UPDATING ) THEN
:NEW.VALUE:=NULL;
END IF;
END IF;
END;

Related

Netsuite doesn't trigger user event scripts after Duplicate number screen when saving payment

The problem: When I save the customerpayment in UI it triggers the user event scripts before showing the dialog to change the duplicated transaction number (attached). After I change the number, it doesn't trigger the user events.
How can I catch with my scripts the change of the transaction numbers?
Do you need to be able to manually set (override) the document number for payments? If not the easiest fix would be to go to Setup > Company > Auto-Generated Numbers, select the Document Numbers tab and uncheck the Allow Override option in the relevant row. Then NetSuite will automatically take care of numbering.
changing the Document number may not be triggering you user event script. Can you try editing and saving the record again. If your user event is designed to work on edit, it will get triggered when you edit and save the record.

In Hybris ,Content page doesn't get synced when change approval status in cms

Not able to sync content page when i changed the approval status to unapproved.
I reverted back it to "Approved" still page not getting synced.
I compared the dumps in sync job , it's exactly same.
What could be causing the issue?
Troubleshooting the synchronization is very complicated...
A synchronization is executed using a synchronization cronjob. To find the respective cronjob:
go to hmc/backoffice
navigate to System/Cronjobs in hmc or System/Background Processes/Cronjobs in backoffice
use the types dropdown to restrict the search to "Multithreaded Synchronization"
pick the most recent one OR look in log file for this output and search for the code.
INFO [Thread-107] (000000RS) [CatalogVersionSyncJob] Sync 'sync powertoolsContentCatalog:Staged->Online' (pk:8796094464500) configured 0 entries for job '000000RS' (pk:8796125823477) schedule medias: 1
This is the cronjob that executed your synchronization. Now it is getting even more tricky:
go to the administration tab
look for an attribute called "Dump medias"
download the media file where attribute Realfilename starts with "sync_dump_"
The downloaded file should contain comma seperated values.
Example:
8796256994364;8796256961596;;actions,allDocuments,...,uid,urlLink,visible;;false
The entries represent the following data:
the PK of the source item
the PK of the target item
(timestamp)
a list of attributes, that could not be synchronized
?
item has been victim to a deadlock
Now you can troubleshoot your synchronization by evaluating source and target items and pending attributes.
Sometimes there is a problem when referencing an item, that does not exist in the target catalog, sometimes a uid is already existing in the target catalog. Sometimes an initial attribute needs change. There are a lot of pitfalls. In this case you can try to use this property to get more details about the exception that is thrown during sync:
synchronization.itemcopycreator.stacktraces=true
Here is some additional information:
https://www.sap.com/cxworks/article/2589632280/catalog_synchronization#CatalogSynchronization-TroubleshootingFailure

SAP HYBRIS [Y] : How to restrict a customersupportagentrole user from cancelling or returning orders

I created a user and assigned it as customersupportagentrole,
This user logs as customersupportagentrole to backoffice
I want this user to see the orders but not to manipulate them,
For example canceling or returning orders.
I am tinkering 'Permission Management - null ( [customersupportagentgroup])'
section. Even i disable all selections related with return & order,
this user can still cancel an order, or return it.
Is there a way to accomplish this task?
If you want to disable cancel/return order buttons, you must change canPerform() method of your order actions/return actions. Canperform() provide that visible or invisible according to your choice. You can check user's role in this method. If user's role equals to 'customersupportagentrole', you can disable this button.

is plugin execution synchronized for delete message over multiple records?

I am new to Dynamics CRM and I could not find any information so far that would apply to my scenario.
We have a Program entity that can have/reference multiple program dates entities, and each program date can have/reference multiple event entities.
We have a view displaying all events associated with the program, and on the program form we want to display in a text the total number of events. From the view user can select multiple events then click delete button. This is a button that comes with CRM, not a custom one.
If I create a plugin for Delete message on event entity and want to query both program and Program date filed that keeps the total number of events then subtract one I am not sure these plugins will execute in sequence or concurrently thus having a race condition.
Now using javascript I also do not know if it is possible to read entity records PK and hook up into the pop up Confirm Deletion dialog box and execute after that a web service call
Any ideas?
Thanks
Dan
The deletes will process synchronously for the current user, but there is nothing that is preventing another user from performing deletes on Events that are also associated to the Program.
One option that you could look at is creating a flag on the Program and Program Date entities called "Events Deleted". Then create another plugin on the read that checks to see if it's "Events Deleted" flag has been flipped, and if so, recalculates the value, updates it and clears it's flag so it doesn't get calculated again.

Disable Word/Sharepoint Integration

I have a requirement to disable the integration between Sharepoint and Word in a project that I am working on. This requirement comes from the request that the user is able to edit the properties of the document but not edit the document itself. The request has also been made to disable the Shared Workspace toolbar that appears when a document is open. The solution must exist on the server as some of the users are external. The users have also requested that they are able to use the Outlook/Sharepoint Integration. Does anyone have any thoughts on how this can be accomplished?
I'm guessing they want to change some document properties, apply those as new field values and print - but not change the original.
Here are some ideas, not sure how useful they could be.
1) apply a password for editing the Word document - It may still allow changing properties & printing.
2) strip out doc the properties and put them in a sharepoint list, with the document itself as an attachement - the document then remains as read-only, but the properties are held separately
3) If your documents are in a list, Allow changes on the list, but demand changes be approved, so users only get to see their own changes, no-one else sees the changes they made. Changes will sit there pending approval. Periodically you can go and reject any changes.

Resources