- The ability to track multiple copies of the same book title.
- The ability to track the branch location of a particular book (expect to have multiple branches)
- The ability to track individual library patrons and see current and previous lending activity.
- Declarative
Example: Roll-up summary field on Book__c
- Visualforce
Example: Release notes/readme page
- Lightning Web Component
Example: LWC on Book Loan record page
- Apex Trigger
Example: Trigger on insert/update record on Book Copy object. Example: Trigger on insert/update record on Book Loan object.
- Experience Cloud
Example: Catalog look-up on Book object.
Browse Book copies
Browse locations - (view map)
- Tableau CRM Analytics
Example: Analytics on Book object.
- OpenAI API
Query the dataset
- Github
Example: Uploaded package.xml https://github.com/sdooley-dev/mclean-library-project/blob/main/README.md
Login as librarian - View Permissions
trigger BookCopyMasterTrigger on Book_Copy__c ( before insert, after insert, before update, after update, before delete, after delete, after undelete) {
// check if it is a before event if (trigger.isBefore) { if (trigger.isInsert) { BookCopyHandlerB.updateBookCopyDetails(trigger.new); } if (trigger.isUpdate) { // call method here } if (trigger.isDelete) { // call method here } } // check if it is an after event if (trigger.isAfter) { if (trigger.isInsert) { // call method here } if (trigger.isUpdate) { // call method here } if (trigger.isDelete) { // call method here } if (trigger.isUndelete) { // call method here } }
}
public class BookCopyHandlerB {
// method to update Book_Copy_Number_D__c, Loan_Status__c public static void updateBookCopyDetails(List<Book_Copy__c> copies) { Set<Id> bookIds = new Set<Id>(); // find the book copy in [Book__c] and add it for (Book_Copy__c copy : copies) { if (copy.Book__c != null) { bookIds.add(copy.Book__c); } } Map<Id, Book__c> booksMap = new Map<Id, Book__c>([SELECT Id, Number_of_Copies__c FROM Book__c WHERE Id IN :bookIds]); for (Book_Copy__c copy : copies) { if (copy.Book__c != null) { Book__c book = booksMap.get(copy.Book__c); // if a book copy already exist if ( book.Number_of_Copies__c != null ) { // increment copy number by 1 for that book title copy.Book_Copy_Number_D__c = book.Number_of_Copies__c + 1; } // if no book copy exist yet, make the copy = 1 if (book.Number_of_Copies__c == null) { copy.Book_Copy_Number_D__c = 1; } // insert status copy.Loan_Status__c = 'Checked In'; // insert date for first check-in copy.Last_Checked_In__c = Date.today(); } }
} }
(uses Book Loan Trigger)
Custom component uses the
mailto
link
Browse links Navigate to Homepage
- Browse catalog
- Browse book details
- Browse related
- Browse Book copies
- Browse locations (view map)
Browse dashboards
Query the dataset on Github
- Package.xml for Library org | https://github.com/sdooley-dev/mclean-library-project/blob/main/package.xml
- Readme.md file | https://github.com/sdooley-dev/mclean-library-project/blob/main/README.md
- Experience Cloud / McLean Library Home Page Mock-up | https://sdooley.org/mclean-library-project/
- OpenAI Docs | https://platform.openai.com/docs/introduction
- OpenAI Demo | https://sdooley.org/open-ai-api/
- Tableau CRM Analytics Demo (login required) | https://boozallen2-dev-ed.develop.my.salesforce.com/
- BAH SFA Practice Org (login required) | https://dhs000000pijamas-dev-ed.develop.my.salesforce.com/
- Links to LinkedIn, Salesforce/Trailhead, GitHub profiles: https://sdooley.org/
What custom objects are used for the data schema for the McLean Library Salesforce org? Book__c, Book_Copy__c and Book_Loan__c are the custom objects used in the Salesforce data schema for the McLean Library Management system.
What standard objects are used for the data schema for the McLean Library Salesforce org? Account, Contact and User are the standard objects used in the Salesforce data schema for the McLean Library Management system.