Skip to Main Content

E-Business Suite

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

SolvedCaseCreateNew Widget Is Creating From the Incorrect Path (Oracle B2C Service)

User_R1YA6Feb 18 2022 — edited Jan 24 2024

The path of our custom widget custom/input/SolvedCaseCreateNew is reopening the case but not within the correct path. The user will select a support contact for either Parts Help Desk or from Parts Distribution Center to create a case. If the user selects Parts Distribution Center to create a case then we have resolved it and the user still needs help they can reopen the case. The user has the option to click on "Need Further Assistance" to reopen the case. Which it does reopen but not under the original path of Parts Distribution Center. It will automatically reopen under the Parts Help Desk no matter how the original case was created. I have provided an attached that shows the code snippet along with a flow chart for additional insight.
I believe we just need to know the correct field information (we might be calling it incorrectly). The field name that is in questioned is 'Incident.CustomFields.c.support_team'
image (1).png (182.68 KB)Below is the code in the view.php file:
<div id="rn_<?= $this->instanceID ?>" class="<?= $this->classList ?>">
<?php if ($this->data['StatusType'] === "Solved") { ?>
<div id="rn_<?= $this->instanceID ?>_Label">
<p><b>Case # <?= $this->data['ReferenceNumber']?> has been closed.</b> If you need further assistance on this case, click the button below.</p>
<!--<p>If you need further assistance, please click the button below to open a reference case for Case # <?= $this->data['ReferenceNumber']?>.</p>-->
</div>

<?php if ($this->data['Team'] == "PDC") {?>
PDC<input type="submit" value="Need Further Assistance"
onclick="window.open('/app/ask_dos/reference_case/<?= $this->data['ReferenceNumber']?>', '_blank');" /> <?php }
else {?>
ELSE<input type="submit" value="Need Further Assistance"
onclick="window.open('/app/ask/reference_case/<?= $this->data['ReferenceNumber']?>', '_blank');" /> <?php }}
?>
</div>

<?php if ($this->data['Incident.CustomFields.c.support_team'] === "PDC") {?>
<input type="submit" value="Need Further Assistance"
onclick="window.open('/app/ask_dos/reference_case/<?= $this->data['ReferenceNumber']?>', '_blank');" /> <?php }
else {?>
<input type="submit" value="Need Further Assistance"
onclick="window.open('/app/ask/reference_case/<?= $this->data['ReferenceNumber']?>', '_blank');" /> <?php }}
?>
</div>

Below is the code for the controller.php file:
<?php
namespace Custom\Widgets\input;

use RightNow\Utils\Url,
RightNow\Connect\v1_3 as RNCPHP;;

class SolvedCaseCreateNew extends \RightNow\Libraries\Widget\Base {
function __construct($attrs) {
parent::__construct($attrs);
}

function getData() {

parent::getData();

$i\_id = Url::getParameter('i\_id');  
logMessage("I\_ID: " . print\_r($i\_id, true));

if ($i\_id) {  
  $incidentQuery = "SELECT I.ReferenceNumber, I.StatusWithType.StatusType.LookupName, I.CustomFields.c.support\_team FROM Incident AS I WHERE I.ID = " . $i\_id;  
  logMessage("Incident Query: " . $incidentQuery);

  $incidents = RNCPHP\\ROQL::query($incidentQuery)->next();

  if ($results = $incidents->next())  
  {  
    logMessage("Incident Results: " . print\_r($results, true));  
    $this->data\['ReferenceNumber'\] = $results\['ReferenceNumber'\];  
    $this->data\['StatusType'\] = $results\['LookupName'\];  
    $this->data\['I.CustomFields.c.support\_team'\] = $results\['Team'\];  
  }  
}  

}
}

This post has been answered by Michael Ferrante-Oracle on Feb 22 2022
Jump to Answer
Comments
Post Details
Added on Feb 18 2022
2 comments
179 views