- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 11:04 PM
I'm trying to create new project request after Clicking on Sav or \Submit button it's showing error.
and redirecting to other page.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2020 12:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 11:08 PM
That would mostly be because the number is not unique. I suggest you to do the following.
1. Look for System Log >> All for some decriptive message that shows up when you try to insert.
2. Look if there are any Business rule that runs before & has current.update()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 11:17 PM
Thanks Jaspal, I have created two business rules which runs after and has current. update.
I set them deactivated but I need them to work because it's linked with one of related links on the form. Can you help me to change the script.
var milestone = new GlideRecord("u_milestone");
milestone.u_project = current.sys_id;
milestone.insert();
current.u_milestone = milestone.sys_id;
current.update();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 11:32 PM
Afer marking Business rule as in-active did you get any error message? Also, what I understand you need to have milestone inserted with current project number & then update the project with that milestone number. If so, try using below in before insert business rule on project table.
var milestone=new GlideRecord('u_milestone')
milestone.initialize();
milestone.u_project = current.sys_id;
milestone.insert();
current.u_milestone = milestone.sys_id;
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 11:34 PM
It's creating duplicate records.