Showing posts with label DOCLINKS. Show all posts
Showing posts with label DOCLINKS. Show all posts

Tuesday, 1 November 2022

Restrict a User to Delete an Attachment from an Approved PO | Maximo

The requirement is to lock the record so that nobody can delete a record if the purchase order is approved.

And the solution is with a small automation script on DOCLINKS object:


object: DOCLINKS

event: BEFORE SAVE

Type: Object Launch Point

Script: Jython


owner=mbo.getOwner()

if owner and owner.getName()=="PO" and owner.getInternalStatus()=="APPR" 

    service.error("","Purchase Order is approved. ")



Also ideal to control it via the signature option, create a new signature option from the application designer and grant access using the relevant security groups then just use it in your code. thanks to Steven Shull.

owner.sigopGranted("DELETEATTACH"): 



Monday, 27 April 2020

Attachment Functionality into your Custom Application | Maximo

1. Drag the attachment control in Application Designer
2. create a RELATIONSHIP to DOCLINK OBJECT

Application Name: Custom_App
Relationship: DOCLINKS
child Object: DOCLINKS
Where Clause: ownertable='Custom_App' and ownerid=:Custom_AppID
3. Enlist you custom application in APPDOCTYPE table, for that run this insert statement
INSERT INTO MAXIMO.APPDOCTYPE (APP, DOCTYPE, APPDOCTYPEID) VALUES ('Custom_App', 'Attachments', (NEXT VALUE FOR MAXIMO.APPDOCTYPESEQ));

Friday, 4 May 2018

Attached Docs Edit Restriction When Record Is Not In Workflow Assignment Using Automation Script | IBM Maximo

Its a continuation from my last post in which a record is not in certain user's assignment, then it cannot be edited. Only assigned user can edit that record.
But there is one problem, the users cannot edit PR record but they can edit attached docs associated with corresponding record and it doesn't apply on attached documents. Because technically, the attach docs object is different.
We have implemented this requirement with different object event condition (using doclinks, pr and wfassignment objects) using automation script on Purchase Requisitions Application.

Object Launch Point :  DOCLINKS

Script : Jython

Object Event Condition: 

(select count(ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
AND ownerid in (select prid from pr where prid =:ownerid) )>0
and
(select count(ownerid) from wfassignment where ownertable='PR' and assignstatus='ACTIVE'
and assigncode IN (:&USERNAME&) AND ownerid in (select prid from pr where prid =:ownerid) )=0

Events: Save, Add, Update, Delete, Before Save

Thursday, 14 April 2016

DOCLINKS Configuration (Attachments) | IBM Maximo

1. Create your doclinks folder
Create a folder, e.g. c:\doclinks
and a sub-folder, e.g. c:\doclinks\default

2. Configure System Properties
You need to configure the following system properties
  • mxe.doclink.doctypes.defpath => c:\doclinks\default
  • mxe.doclink.doctypes.topLevelPaths => c:\doclinks
  • mxe.doclink.path01 => c:\doclinks=http://<servername>/doclinks

Restart your MXServer.

3. Change httpd.conf (e.g. in my case C:\IBM\HTTPServer\conf\httpd.conf)
Open the httpd.conf and add the following section to the end of the file
Alias /doclinks "D:/doclinks"
<Directory "D:/doclinks">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Friday, 25 December 2015

Error Message 'ADD not allowed on DOCLINKS' appears when trying to add an attachment - IBM Maximo



When you get this message, it means user must have a default insert site within his user application profile.
BMXAA0024E - The action ADD is not allowed on object DOCLINKS. Verify the business rules for the object and define the appropriate action for the object
Goto > Security > Users
  1. Select Default Insert Site

And you are done.