Use PDIs? Take our 5-minute survey to help shape the PDI roadmap.

Catalog Item Component - "Request Generated" event is not working in Workspace

NirmalyaB
Tera Contributor

My requirement is to be able to show a popup modal with the Catalog Item form and be able to submit it from there. 

 

I have created a UI Page within the Risk BU Modals page collection. Within the page I have simply added a Catalog Item component and hardcoded the Catalog Item Sys ID. 

 

The Catalog item form is loading however, when I click on the "Order Now" button nothing happens and it stays disabled. I added an event handler for the "Request generated" event so it closes the modal post submission. However it seems to be not working i.e. no Requests/Requested Items are created.

 

I also added a handler for the "Item Submission cancelled" event, which seems to be working fine, wherein I was able to close the modal with the help of a Client Script. 

 

I tried applying the same Client Script handler to the "Request Generated" event, but again with no success. 

 

NirmalyaB_0-1777364260969.png

NirmalyaB_1-1777364286682.pngNirmalyaB_2-1777364312029.png

 

4 REPLIES 4

Maham Tahir
Mega Guru

Hi @NirmalyaB

 

This issue occurs cuz Catalog Item component in UI Builder (Workspace) requires a Data Resource to handle the actual submission logic, component itself is just the UI layer.

 

The "Order Now" button won't process unless it's linked to a submission action.

  • In UI Builder, add the "Submit Catalog Item" Data Resource to your page.

  • Ensure the sys_id in the Data Resource matches the Catalog Item you are showing.

If you find my response helpful, mark it as helpful and accepted solution.

 

Regards, 

Maham Tahir.

Hi @Maham Tahir 

Thank you for your reply, however I didn't find any such Data Resource. 

NirmalyaB_0-1777916774198.png

 

pavan_yadav
Tera Contributor

Hi @NirmalyaB and @Maham Tahir ,

I have also tried to locate "Submit Catalog Item" but did not find it, Is there anything else to workaround on this?
Please help here, I have followed different way:
1.  Created a separate record page in the page variant.

2.  From the catalog item component > Event handler > I have selected "Open page or URL" and selected the "Record page" created in 1st step.

3. It worked for me, when I click on submit button it is created a record and opened in another page on same workspace.


I'm looking for different way to proceed. 
My requirement is when I click on submit button it should create a record and open in the same page or a number on the same page with a link on it, when we click on it then it should open a record.

Please help me out here!!

Hi @pavan_yadav ,

 

You will need to create a data resource 'Create a record' on the Request table. Use the mapping used on the flow to set the field values and bind it to the variables. Once successful, on the data resource, you can  show success message on the popup as required.