- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2017 10:30 PM
I know we have a page "Sc_cat_item" where we have a "SC Catalog Item" widget which helps in dispalying catalog item and all.but it takes input when we click on any record producer its sys_id and page id. I want to place a specified record producer on home page.
Any leads would be greatly appreciated.
Thanks,
Gautham
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 03:12 AM
Hello Gautham,
First of all clone the SC Catalog Item" widget and place the widget in your home page.
And you need to do slight modifications in the server side script:
You have to place your home page id and sys id of the record producer in above lines where I have pointed in screenshot.
Thanks,
Surya Amara
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2017 03:12 AM
Hello Gautham,
First of all clone the SC Catalog Item" widget and place the widget in your home page.
And you need to do slight modifications in the server side script:
You have to place your home page id and sys id of the record producer in above lines where I have pointed in screenshot.
Thanks,
Surya Amara
PS: Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 10:43 AM
Hello,
If i answered your query.Can you mark the thread close and correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2017 08:55 AM
Thanks again Surya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2018 02:36 PM
Hi Surya,
I have similar requirement with a record producer.
I need to put a record producer in a section of a page.
I tried your solution but its showing error.
My server script on cloned widget after update is:
(function() {
// portal can specify a catalog and catalog category home page
data.sc_catalog_page = $sp.getDisplayValue("sc_catalog_page") || "sc_home";
data.sc_category_page = $sp.getDisplayValue("sc_category_page") || "sc_category";
options.show_add_cart_button = (options.show_add_cart_button == "true");
if (options.page) {
var pageGR = new GlideRecord("sp_page");
options.page = (pageGR.get(options.page)) ? pageGR.getValue("id") : null;
}
if (options.table) {
var tableGR = new GlideRecord("sys_db_object");
options.table = (tableGR.get(options.table)) ? tableGR.getValue("name") : null;
}
var page = 'is_nps_survey';
var sys_id='05a1cc75e4c17100ad69e266d72e396a';
options.url = options.url || "?id={page}&table={table}&sys_id={sys_id}";
data.showPrices = $sp.showCatalogPrices();
var m = data.msgs = {};
m.submitMsg = gs.getMessage("Submit");
m.submittedMsg = gs.getMessage("Submitted");
m.createdMsg = gs.getMessage("Created");
m.trackMsg = gs.getMessage("track using 'Requests' in the header or");
m.clickMsg = gs.getMessage("click here to view");
m.dialogTitle = gs.getMessage("Delete Attachment");
m.dialogMessage = gs.getMessage("Are you sure?");
m.dialogOK = gs.getMessage("OK");
m.dialogCancel = gs.getMessage("Cancel");
m.largeAttachmentMsg = gs.getMessage("Attached files must be smaller than {0} - please try again", "24MB");
m.renameSuccessMsg = gs.getMessage("Attachment renamed successfully");
m.deleteSuccessMsg = gs.getMessage("Attachment deleted successfully");
if (input)
data.sys_id = input.sys_id;
else if (options.sys_id)
data.sys_id = options.sys_id;
else
data.sys_id = $sp.getParameter("sys_id") || $sp.getParameter('sl_sys_id');
if (!data.sys_id)
return;
data._attachmentGUID = gs.generateGUID();
var validatedItem = new sn_sc.CatItem('' + data.sys_id);
if (!validatedItem.canView())
return;
data.sc_cat_item = $sp.getCatalogItem(data.sys_id, true);
if (data.sc_cat_item.category) {
var categoryJS = new sn_sc.CatCategory(data.sc_cat_item.category);
data.category = {
name: categoryJS.getTitle(),
url: '?id='+data.sc_category_page+'&sys_id=' + data.sc_cat_item.category
}
}
$sp.logStat('Catalog View', data.sc_cat_item.sys_class_name, data.sys_id, data.sc_cat_item.name);
})()
--------------------------
Am I doing something incorrectly? Please let me know.
Thanks
Shihab