- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2023 07:14 AM - edited 08-16-2023 07:44 AM
Hi Team,
am writing the below before BR in incident table for creating a problem record for inc which moves to resolved state, am able to get the problem record creation, but first reported by(field inside problem record) and problem id( field inside inc record) is not getting mapped. The same code is working in my PDI, but not in my dev instance.(highlighted code in red is not working in dev instance but working in my pdi)
Can someone please suggest the modifications that is required
var prbGR = new GlideRecord("problem");
prbGR.initialize();
prbGR.description = current.description;
prbGR.short_description = current.short_description;
prbGR.cmdb_ci = current.cmdb_ci;
prbGR.impact = current.impact;
prbGR.urgency = current.urgency;
prbGR.priority = current.priority;
prbGR.company = current.company;
prbGR.business_service = current.business_service;
prbGR.service_offering = current.service_offering;
prbGR.sys_domain = current.sys_domain;
prbGR.first_reported_by_task = current.getUniqueValue();
prbGR.insert();
current.problem_id = prbGR.sys_id;
gs.addInfoMessage(gs.getMessage("Problem {0} created", prbGR.number));
action.setRedirectURL("incident.do?sys_id=" + current.sys_id.toString());
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 01:13 AM
Thank you so much for investing time on this. I found the issue. It was with setting the display value to true for a different field in the problem table instead of number field. Once the change is made to the table level columns the issue got resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 07:10 AM
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2023 07:19 AM
did you also check logs if there is something flagged related to this business rule execution?
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2023 07:28 AM
can you please help me out with the log code which needs to be used