Sage CRM Developers Course Entities and the Data Model (Part 2)

Slides:



Advertisements
Similar presentations
DIGIDOC A web based tool to Manage Documents. System Overview DigiDoc is a web-based customizable, integrated solution for Business Process Management.
Advertisements

Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
The Relational Model and Relational Algebra Nothing is so practical as a good theory Kurt Lewin, 1945.
Sage CRM Developers Course
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Database Systems More SQL Database Design -- More SQL1.
Employee Central Presentation
Sage CRM Developers Course
Sage CRM Developers Course Programming for the Advanced Manager.
Protect your data with Security John Ykema, Director of Sales & Marketing.
Sage CRM Developers Course
Sage CRM Developers Course Using the.NET API (2).
Sage CRM Developers Course
Sage CRM v7.2 Developers Course An Introduction to the Developer Program.
Sage CRM Developers Course
Sage CRM Developers Course
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Project Implementation for COSC 5050 Distributed Database Applications Lab2.
1 Keith Vicens, Managing Consultant CRM Housing Solution Extending Your Case Management Capabilities.
Creating databases for web applications SQL. Systems design. ER diagrams. Data flow diagrams. Storyboards. Homework: Plan database and applications for.
Sage CRM Developers Course
Part 06 – A More Complex Data Model Entity Framework and MVC NTPCUG Tom Perkins.
CSE314 Database Systems More SQL: Complex Queries, Triggers, Views, and Schema Modification Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
HAP 709 – Healthcare Databases SQL Data Manipulation Language (DML) Updated Fall, 2009.
Concepts of Database Management Seventh Edition
Actors and Use Case Diagrams Month Day, Year. Agenda Training Plan Overview Review Detailing Requirements with Requisite Pro Concepts Setting Up XDE Integration.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Sage CRM Developers Course Using the Component Manager.
IS 230Lecture 6Slide 1 Lecture 7 Advanced SQL Introduction to Database Systems IS 230 This is the instructor’s notes and student has to read the textbook.
Sage CRM Developers Course
Master Data Management & Microsoft Master Data Services Presented By: Jeff Prom Data Architect MCTS - Business Intelligence (2008), Admin (2008), Developer.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
Salesforce.com Requirement Gathering Workshop Presented by:Lily Ho.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
The Power of Sage CRM 5.8 Jeff Richards Education and Development Program Manager Sage Technologies Dublin
What’s New in Sage CRM 6.0 Jeff Richards
1 Welcome! DBT544 students to the iSeries, DB2 Universal Database And SQL interface.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
CSC314 DAY 8 Introduction to SQL 1. Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SQL OVERVIEW  Structured Query Language  The.
 CONACT UC:  Magnific training   
Web Content And Customer Relationship Management Solution. Transforming web sites into a customer-focused, revenue generating channel with less stress.
Sagecrm.com Sage CRM An Introduction to the Developer Program.
Company LOGO Sage CRM – Marketing Sage CRM 7.3 provides a new integration with MailChimp for marketing campaigns. In this.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Interstage BPM v11.2 1Copyright © 2010 FUJITSU LIMITED INTRODUCTION TO INTERSTAGE BPM.
Web Content And Customer Relationship Management Solution. Transforming web sites into a customer-focused, revenue generating channel with less stress.
SQL - Training Rajesh Charles. Agenda (Complete Course) Introduction Testing Methodologies Manual Testing Practical Workshop Automation Testing Practical.
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Getting started with Accurately Storing Data
Prepared by : Moshira M. Ali CS490 Coordinator Arab Open University
Database Systems: Design, Implementation, and Management Tenth Edition
Cameron Blashka| Informer Implementation Specialist
TE004 Smart Change Management with Sage CRM Component Manager
Using the Set Operators
Housing application Presented by Phil Callaghan MD Caltech CRM
Enhance BI Applications and Simplify Development
More SQL: Complex Queries, Triggers, Views, and Schema Modification
Primary key Introduction Introduction: A primary key, also called a primary keyword, is a key in a relational database that is unique for each record.
SQL Fundamentals in Three Hours
SQL DATA CONSTRAINTS.
Contents Preface I Introduction Lesson Objectives I-2
Database Systems: Design, Implementation, and Management Tenth Edition
September 12-14, 2018 Raleigh, NC.
Using the Set Operators
Adv. Reports & Dashboard
Overview of Databases and Salesforce Chapter 1
Presentation transcript:

Sage CRM Developers Course Entities and the Data Model (Part 2)

Looking ahead to the classes DP01: Introduction to the Development Partner Program DP02: Entities and the Data Model (Part 1 of 2) DP03: Entities and the Data Model (Part 2 of 2) DP04: Implementing Screen Based Rules (Part 1 of 2) DP05: Implementing Screen Based Rules (Part 2 of 2) DP06: Screen and User Independent Business Rules DP07: Workflow (Part 1 of 2) DP08: Workflow (Part 2 of 2) DP09: Using the API Objects in ASP Pages (Part 1 of 2) DP10 : Using the API Objects in ASP Pages (Part 2 of 2) DP11: Using the Component Manager DP12: Programming for the Advanced Manager DP13: Using the Web Services API DP14: Using the Web Services API (Part 2 of 2) DP15: Coding the Web Self Service COM API (Part 1 of 2) DP16: Coding the Web Self Service COM API (Part 2 of 2) DP17: Using the.NET API (Part 1 of 2) DP18: Using the.NET API (Part 2 of 2)

Agenda Use of SQL in Blocks Use of SQL in Interface Building Views Entities and the Security Model Tips for Building views with Derived Fields

Use of SQL in Blocks, Use of SQL in Interface

Using SQL & CRM CRM must use SQL for all its database actions. Uses vendor specific SQL e.g. Oracle SYSDATE SQL Server GETDATE() SQL Trace (SQL Profiler) allows developer to identify actual data manipulation. Views Utilized Actual DML passed (c.f. Security Territories & mail merge –user info) Developer will need to establish requirement to support Databases within component View Syntax Differences

List Blocks in ASP pages var comp_companyid = CRM.GetContextInfo('company','comp_companyid'); var projectlist = CRM.GetBlock('list'); with (projectlist) { //Table project is a custom added table //SelectSQL is property of CRM ListBlock object SelectSQL = 'select * from project, opportunity where oppo_projectid = proj_projectid ' SelectSQL += ' and proj_companyid =' + comp_companyid; var proj_name = AddGridCol('proj_name'); var proj_userid = AddGridCol('proj_userid'); } CRM.AddContent(projectlist.Execute()); Response.Write(CRM.GetPage());

# Codes CodeMeaning Escalation Rules SQL Dashboard Blocks SQL OrderQuotes Configuration #UCurrent User ID  #LCurrent User Logon Name  #TCurrent System Date/Time  #CCurrent User Team ID  #DCurrent User Team Name  #RRecent List Info  #OCurrent Opportunity ID  #N Current Version Order/Quote 

Tab SQL clause Provides simple control access to tabs U: 4,5 –Only user with user_userid equal to 4 or 5 can use tab C: 4,5 (user_primarychannelid) –Only user in team 4 or 5 can use tab

Tab SQL clause Where Clause only E.g. in My CRM opportunities tab only appears for users with opportunities assigned to them. –exists (select * from opportunity where oppo_assigneduserid = user_userid) Can reference either current user or entity in context NOT both

Groups –SQL feature Full control over SQL statement. Change automatic ‘and’ clauses to ‘or’ Groups and their access via Key Attributes allow Companies to be grouped.

Entities and the Security Model

Entity Relationships Entity Concept used in: Security Workflow Data Upload Reporting & Groups Coding –Context –Entity & Table level scripts Entity Definition Contingent on Context within CRM Can define own Entities to be managed by CRM VIEWS govern entity/context definition

Simple vs Complex Entities Relationships Consider Leads & Company & Opportunity Role of personlink table and Person and Company relationship Related Companies and the multipleentitylink table Communications and Comm_link

Person_link table Example Intersection Table Person_link Address_link Person and Company relationship Direct foreign key relationship between Parent Company and Child Person E.g. pers_companyid Also Intersection Table used to allow recording of ‘role’ of person within company. Direct Relationship used in most views, exceptions vListPerson vUserContacts vReportUserContacts Person_Link table used in peoplelist action called from company tab. Type of Person maintained via Translations

Userid, Createdby, Channelid, SecTerr CasesCommunicationCompanyLeadOpportunityPerson case_assigneduseridcmli_comm_useridcomp_primaryuseridlead_assigneduseridoppo_assigneduseridpers_primaryuserid case_channelidcomm_channelidcomp_channelidlead_channelidoppo_channelidpers_channelid case_secterrcomm_secterrcomp_secterrlead_secterroppo_secterrpers_secterr case_createdbycmli_createdbycomp_createdbylead_createdbyoppo_createdbypers_createdby Intersection tables do not have these columns. person_link comm_link Multipleentitylink Security is cumulative User must have rights on all tables referenced in view before can access record. E.g. to see communication for a company and person, then user must have rights on communication, company and person.

Building Views, Tips for Building views with Derived Fields

Changing or Adding Views Add & edit database views using the CRM Interface. Custom_views Recommend creation of new views not editing of existing views where possible. Typical views changed Merge views Reports Target Lists

Mail Merge Views Sage CRM v7.1sp2 onwards ContextView CompanyvMailMergeCompany PersonvMailMerge OpportunityvMailMergeOpportunity CasevMailMergeCase OrdersvMailMergeOrders vMailMergeChildrenOrders QuotesvMailMergeQuotes vMailMergeChildrenQuotes LeadvListLead

Expressions in Views Date Ranges Calculations Concatenations SELECT DATEDIFF(day, oppo_opened, getdate()) AS oppo_days FROM opportunity WHERE oppo_status = 'In Progress';

Example of Expression in View The Case List "caselist" uses the view "vListCases". CREATE VIEW vListCases AS SELECT RTRIM(ISNULL(Pers_FirstName, '')) + ' ' + RTRIM(ISNULL(Pers_LastName, '')) AS Pers_FullName, CASE WHEN Case_Status <> 'closed' AND Case_SLACloseBY 'closed' AND Case_SLAAmberCloseBy < GETDATE() THEN 'Amber' ELSE 'Green' END AS Case_Color, Pers_PersonId, Pers_CreatedBy, Cases.*, Comp_Name, Comp_CompanyId, Comp_CreatedBy, Pers_SecTerr, Comp_secTerr, Pers_PrimaryUserId, Comp_PrimaryUserId, Pers_ChannelId, Comp_ChannelId, Chan_ChannelId, Chan_Description, Comp_ Address, Pers_ Address FROM Cases LEFT OUTER JOIN Person ON Pers_PersonId = Case_PrimaryPersonId LEFT OUTER JOIN Company ON Comp_CompanyId = Case_PrimaryCompanyId LEFT OUTER JOIN Channel ON Comp_ChannelId = Chan_ChannelId WHERE Case_Deleted IS NULL CASE statement CASE WHEN Case_Status <> 'closed' AND Case_SLACloseBY 'closed' AND Case_SLAAmberCloseBy < GETDATE() THEN 'Amber' ELSE 'Green' END AS Case_Color which evaluates whether the green, amber or red colour should be used.

Case_Color The column "case_color" DOES NOT exist in the database. It is an entirely derived "alias". In order for this derived column to look like it is part of CRM it must have meta data to control its properties. select * from custom_edits where colp_colname = 'case_color‘ select * from custom_captions where capt_family = 'colnames' and capt_code = 'case_color'

SQL on external tables May need to reference external database on same server: Reporting Graphing Use fully qualified table names select vusers.user_firstname,vusers.user_lastname, northwind..orders.* from vusers left join northwind..orders on user_userid = employeeid;

Q&A

Looking ahead to the classes DP01: Introduction to the Development Partner Program DP02: Entities and the Data Model (Part 1 of 2) DP03: Entities and the Data Model (Part 2 of 2) DP04: Implementing Screen Based Rules (Part 1 of 2) DP05: Implementing Screen Based Rules (Part 2 of 2) DP06: Screen and User Independent Business Rules DP07: Workflow (Part 1 of 2) DP08: Workflow (Part 2 of 2) DP09: Using the API Objects in ASP Pages (Part 1 of 2) DP10 : Using the API Objects in ASP Pages (Part 2 of 2) DP11: Using the Component Manager DP12: Programming for the Advanced Manager DP13: Using the Web Services API DP14: Using the Web Services API (Part 2 of 2) DP15: Coding the Web Self Service COM API (Part 1 of 2) DP16: Coding the Web Self Service COM API (Part 2 of 2) DP17: Using the.NET API (Part 1 of 2) DP18: Using the.NET API (Part 2 of 2)