IBM Maximo - empty Reported Date required field on the Service Request application - maximo

When I create a new record on the Service Request (SR) application (Maximo 7.6), I would like to set the required Reported Date (SR.REPORTDATE) field blank. Before save action, the user will input data into that field. I wonder how this could be done?
Thanks for the help.

If you look in Database Configuration to see if REPORTDATE has a Default Value, I think you'll find &SYSDATE& in there. If I'm right, then you can delete that default value, save your changes, and apply your changes. Otherwise, you'll need to do as #Dex suggested.

My mind immediately goes to an automation script. A default value control or the default value setting in Database Configuration may work too and is recommended before a script if you have the expertise to confirm or deny this theory.
As for the automation script, I think you can create one with an object launch point on SR on the "add" event. The script would simply set that field to null, which shouldn't change the "required" flag either, so the rest of your needs will still be met.
mbo.setValueNull("REPORTDATE");

Related

Set Transaction Type to RETURN conditionally in maximo

In Work order tracking application in actuals tab materials section when user clicks on New row by default the transaction type = ISSUE . I would like to change this by default to RETURN and remove issue from the look up (I was able to remove ISSUE from the lookup). This requirement should only work for PM type work orders. Hence I tried to write an automation script on MATUSETRANS.ISSUETYPE attribute launch point however it throws null pointer expection which trying to perform setValue. I tried using 2L,7L and 11L however it doesn't work.
if(onadd) ==True:
mbo.setValue("ISSUETYPE",'RETURN')
Is there any other way to do this?
We basically need to trigger the code on a field that sets after ISSUETYPE is set using the out of the box code so I tried on field like currencycode or condrate (attribute launch point) and it works like charm. You will have to use 7L though to the existing code.

Maximo 7.6 Change status dialog box (Notification E-mail field) default blank

Seeking for guidance, in Maximo 7.6 the change status dialog box has a field (toemailaddr) Label: Notification E-mail for work Order change status. See the picture below.
What I am seeking guidance on is how do I edit that field to where I make it to default blank over populating the user logged in e-mail by default? Is this even possible?
I have looked in the change status dialog on WOTRACK as well extracted Library.XML and did not find a way to change from it filling in by default with users e-mail to just remaining blank.
I apologize in advance if it shows to be tagged incorrectly.
Picture of what I am looking to change to show blank
It's the Maximo "psdi.app.workorder.virtual.WOChangeStatus" MBO class that is defaulting that value in.
If the presentation-level default values run after the MBO add() code, then a simple presentation "Default Value" control should allow you to override that.
If that doesn't work then you can try an automation script. It would need to be against the WOCHANGESTATUS object and on the "add" action. If that runs after the Java code then you could grab that field (toEmailAddr) and set it back to an empty string. I assume the screen would still update with that change.
I have not looked at the code for any downstream effects clearing this field might have. It could be that Maximo is coded to always send out that email and if the email address is empty it would likely error at that point.
create an automation script named WOCHANGESTATUS.NEW
(automation scripts that are named after a mbo followed by .NEW are executed when a new instance of a MBO is created, they can be used to initialize column values. )
put a single line in the script.
mbo.setValueNull("TOEMAILADDR")
mark script active and save it

Can a you restrict a Sharepoint user from editing a list item after adding it via a workflow?

We currently have a number of workflows in our organization that require users to add an item to a list via a form, but then not be able to edit that item unless given special permission to do so.
For example a user submits a leave of absence request and it is routed to their manager. The 1st level manager might approve this request and the workflow continues. While the request is in the managers hands it cannot be modified by the original submitter, however if the manager rejects it or requires revision the original submitter should then be able to edit.
Is this possible? The best strategy we could come up with for this is multiple Lists to handle the different levels of security required for this. Are there better ways of doing this?
SharePoint seems to have a very open concept of security within an SP site and maybe were just trying to fit a square peg in a round hole.
Thanks!
How about Remove permission for that user/for all user using workflow itself?
http://spcycle.blogspot.jp/2012/01/how-to-create-workflow-to-change-item.html
http://shareapointkiran.blogspot.jp/2012/06/addremove-permissions-using-sharepoint.html
And then give it back when manager approves/rejects
I had a similar problem and solved it with a quick and dirty solution.
In our case this quick and dirty solution might be even easier.
You could add a hidden field that has an default value of for example 0.
Then you add a (formating) rule to one of the fields that should be deactived.
The rule should deactivate the field if the value of the hidden field is not 0.
This rule can be copied to every field that should be deactivated too.
Now add a set field action to your workflow that set the value of the hidden field to something else than 0, for example 1.
To make a hidden field you can define formating rule with a condition that is always true.
Now if someone creates a form the workflow will set the value of your hidden field to 1. The rule of the fields that should be deactived will now deactivate the fields.
Hide the field
Deactivate the field rule

have set the required property via formula but now there is no option to have a message

I have set the required property to #IsDocBeingSaved but then there is no option to enter s validation message. How do you make a control required under specific conditions and still have a message when it is required
You need to edit the source. Or: check it as required, enter the message, then switch to the computation. The message doesn't get deleted
Actually what I ended up doing is creating a under the validators properties I created a validateRequired and added code to the loaded and disableValidators to make it only active during saving. Works well, just not real obvious. I have used some validators before but not often. Need to keep remembering to go there.

Dynamics CRM 2011 how can I set the string field to be unique?

I want to add a field "Single Line of Text" to my custom entity which should be unique.
How can I make Crm to throw me an exception when I try to create the duplicating value of the
record?
You have to create a plugin for this requirement which handles the Pre-Create/Pre-Update step for this entity. In this plugin you have to check whether the passed value is unique or not. If it's not, you throw an exception which cancels the operation and displays a dialog to the user (if the plugin runs synchronously).
throw new InvalidPluginExecutionException("Value passed for 'attribute' is not unique.");
You can't do this through configuration, as far as I know.
You would need to use some client code to query existing values for that field to see if the newly entered value is unique. You could use something like jQuery and the CRM REST service (ODATA) to perform an asynchronous validation on the field; it might not be instant though, you may need to consider how this is presented to the user.
Alternatively you could do this with workflow, but that'd be even less instant - it'd probably have to be triggered after the save.
Another option is to create unique SQL index directly in database.

Resources