dw.catalog
Class PriceBookMgr

Price book manager provides methods to access price books.
Properties
allPriceBooks
:
Collection
(Read Only)
All price books defined for the organization.
applicablePriceBooks
:
Collection
A collection of price books that are set in the user session.
sitePriceBooks
:
Collection
(Read Only)
All price books assigned to the current site.
Please note that this doesn't include parent price books not assigned to the site, but considered by the price lookup.
Please note that this doesn't include parent price books not assigned to the site, but considered by the price lookup.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static assignPriceBookToSite(priceBook
:
PriceBook, siteId
:
String)
:
boolean
Assign a price book to a site.
static getAllPriceBooks()
:
Collection
Returns all price books defined for the organization.
static getApplicablePriceBooks()
:
Collection
Returns a collection of price books that are set in the user session.
static getPriceBook(priceBookID
:
String)
:
PriceBook
Returns the price book of the current organization matching the specified ID.
static getSitePriceBooks()
:
Collection
Returns all price books assigned to the current site.
static setApplicablePriceBooks(priceBooks
:
PriceBook...)
:
void
Sets one or more price books to be considered by the product price lookup.
static unassignPriceBookFromAllSites(priceBook
:
PriceBook)
:
boolean
Unassign a price book from all sites.
static unassignPriceBookFromSite(priceBook
:
PriceBook, siteId
:
String)
:
boolean
Unassign a price book from a site.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
assignPriceBookToSite
Assign a price book to a site. This requires a transaction, see Transaction.wrap(Function)
Parameters:
priceBook
-
price book to be assigned
siteId
-
id of the site to be assigned to, such as 'SiteGenesis'. The site has to be a storefront site.
Returns:
true if price book is assigned to site. Throws an exception if price book doesn't exist or site doesn't exist or site is not a storefront site.
getAllPriceBooks
static getAllPriceBooks()
:
Collection
Returns all price books defined for the organization.
Returns:
All price books of the organization.
getApplicablePriceBooks
static getApplicablePriceBooks()
:
Collection
Returns a collection of price books that are set in the user session.
Returns:
Collection of applicable price books set in the session.
getPriceBook
Returns the price book of the current organization matching the
specified ID.
Parameters:
priceBookID
-
The price book id.
Returns:
Price book or null of not found
getSitePriceBooks
static getSitePriceBooks()
:
Collection
Returns all price books assigned to the current site.
Please note that this doesn't include parent price books not assigned to the site, but considered by the price lookup.
Please note that this doesn't include parent price books not assigned to the site, but considered by the price lookup.
Returns:
All price books assigned to the current site.
setApplicablePriceBooks
static setApplicablePriceBooks(priceBooks
:
PriceBook...)
:
void
Sets one or more price books to be considered by the product price lookup. The information is
stored in the user session. If no price book is set in the user session, all active and valid price books assigned to
the site are used for the price lookup. If price books are set, only those price books are considered by the price
lookup. Note that the system does not assure that a price book set by this API is assigned to the current
site.
Parameters:
priceBooks
-
The price books that are set in the session as applicable price books.
unassignPriceBookFromAllSites
static unassignPriceBookFromAllSites(priceBook
:
PriceBook)
:
boolean
Unassign a price book from all sites. This requires a transaction, see
Transaction.wrap(Function)
Parameters:
priceBook
-
price book to be unassigned
Returns:
true if price book is unassigned from all sites. Throws an exception if price book doesn't exist
unassignPriceBookFromSite
Unassign a price book from a site. This requires a transaction, see
Transaction.wrap(Function)
Parameters:
priceBook
-
price book to be unassigned
siteId
-
id of the site to be unassigned from, such as 'SiteGenesis'. The site has to be a storefront site.
Returns:
true if price book is unassigned from site. Throws an exception if price book doesn't exist or site doesn't exist or site is not a storefront site.