To set fields mandatory before the state can change to 'new'.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:39 PM
Hello,
I want all fields in the planning tab mandatory on before the change request is allow to move out of new. In "New" state nothing is required.
All planning fields are mandatory before the state can change to 'new'.
This task is complete as a Change user if all planning fields are mandatory before the state can change to 'new'
Which is the best practice to proceed with ? also how to do it?
Please give your suggestions.
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:50 PM
Hi Banupriya,
Help me to understand you requirement. The requirement is to set planning fields as mandatory when the status is 'NEW' right?
if so, I suggest you to use UI Policies. You can add State == New under "When to apply" and set Mandatory on fields in UI Policy actions.
Hit like, Helpful or Correct depending on the impact of the response
Thanks
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 10:51 PM
Hi,
Write an On Change Client Script on the Change Request table on the State field as below:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue == 'The Value you want' && oldValue == "Backend Value of new")
{
g_form.setMandatory('field name1',true);
g_form.setMandatory('field name2',true);
}
//Type appropriate comment here, and begin script below
}
Backend Value of New you can get by right click on the State field and then select Show choice List.
Hope this helps. Mark the answer as corretc/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 11:00 PM
When I click on 'create new' from Change request, state will be in 'new' when I submit the request then my CR will be in 'New' state only.
On Load it should not be displayed as 'mandatory fields'. while submitting the request it should display it as 'mandatory fields'. Then User should be able to fill in & submit the request.
On change will not work for this. Also UI policy/Data policy will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2017 11:08 PM
Hi Banupriya,
May I know the issue you are facing from UI Policy? It should work from UI Policy.
Thanks
Prashant