leveraging.net in saleslogix building customizations in.net for your current version of saleslogix...

21
Leveraging .NET in SalesLogix Building Customizations in .NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Upload: dale-tate

Post on 13-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Leveraging .NET in SalesLogixBuilding Customizations in .NET for your Current Version

of SalesLogix and a Look at the Future

Ryan Farley

Customer FX Corporation

Page 2: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

CPE Credit

To receive CPE credit for this session you must attend the entire session• Session code: CRM120

• CPE credit = 1

• Delivery Method = Group-Live

• Field of Study = Specialized Knowledge and Applications

• Enter your credits at the CPE kiosks available in the Tennessee and Presidential Lobbies

Page 3: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Introduction

Ryan Farley - Customer FX Corporation • customerfx.com – CRM and SalesLogix News & Training

“.NET Advocate” – Developed in .NET (C#) since first public beta

Worked with SalesLogix since first public release• slxdeveloper.com – SalesLogix Articles & Forums

• saleslogixblog.com – My blog on SalesLogix development

• ryanfarley.com – My blog on .NET development

Page 4: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Objectives

After participating in this session, you will be able to:

• Understand the benefits of using .NET for SalesLogix customizations

• Identify cases where customizations in .NET make more sense than customizations built in Architect

• Understand what is available today to develop for SalesLogix using .NET

• Understand what changes for all this in version 7

Page 5: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Session Perspectives

Managers, SalesLogix users, SalesLogix Administrators• Benefits, pros & cons

• Examples of .NET customizations in SalesLogix Developers

• “Geek speak” detailing:

• Tools available today for developing in .NET for SalesLogix

• How this changes in SalesLogix version 7

• Pre-Requisites:

• SalesLogix familiarity and basic .NET experience

Page 6: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Benefits of using .NET

Lessens the learning curve• Utilize in-house developers

• Abundance of .NET references, resources, & training available

Take advantage of modern tools & technology• Developing in Visual Studio vs. Architect

• Using C#/VB.NET/Chrome/etc vs. VBScript

• Debugging, Source Control, Unit Testing, list goes on…

• .NET Framework

Page 7: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Benefits of using .NET (Continued)

Think “outside the box”

Make the presentation of your data “make sense” for end users

Make difficult tasks easy for complex customizations Build the kinds of customizations that “are not

possible” in SalesLogix

Page 8: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Sample .NET Customizations

Sample Customizations• Better Presentation of Data

• Make difficult tasks easy

• Do what can’t be done

Page 9: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Development Tools Available

SalesLogix COM Library• SalesLogix.SlxApplication

SalesLogix OLE DB Provider

Win32API for embedding in SalesLogix

.NET ComVisibleAttribute and registering .NET assemblies for COM

Page 10: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

SalesLogix COM Library

SalesLogix “Application” object• Same object exposed in scripts

Only available while the SalesLogix client is running.

Page 11: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

SalesLogix COM Library

SalesLogix.ISlxApplication slx = null;try{ slx = new SalesLogix.SlxApplicationClass();

MessageBox.Show(“Current AccountID: “ + slx.BasicFunctions.CurrentAccountID());

//access anything available in SalesLogix scripts (ie: Application object)

//invoke a plugin slx.BasicFunctions.DoInvoke(“Form”, “System:MyForm”);}finally{ Marshal.ReleaseComObject(slx);}

Page 12: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

SalesLogix OLE DB Provider

Standard OLE DB Provider

Used by all SalesLogix application for data access• Enforces SalesLogix rules• Provides record access security• Ensures data will synchronize

Use with ADO.NET classes (DataSets, OleDbDataReader, OleDbConnection, OleDbCommand, etc)

Connection Strings – provides all details and login info to provider (See slxdeveloper.com for samples)

Page 13: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Win32 API

Provide ability to embed in SalesLogix

Gives info about host form in SalesLogix to .NET code

Page 14: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Win32 API

SetParent• Change parent of your .NET control to a control in

SalesLogix

[DllImport("user32.dll”)]public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

Page 15: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Win32 API

GetWindowRect• Get bounds/size of parent control where your .NET control is embedded

[DllImport("user32.dll”)]public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);

RECT struct

[Serializable, StructLayout(LayoutKind.Sequential)]public struct RECT{

public int Left;public int Top;public int Right;public int Bottom;

}

Page 16: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

COM Exposed .NET Assemblies

ComVisibleAttribute (found in System.Runtime.InteropServices)

• Marks a class as “accessible via COM” (use a .NET class via a COM reference in a SalesLogix VBScript)

• You can make a class “COM visible” and registration is not required

• Can also specify ProgId attribute

[ComVisible(true), ProgId(“MyNamespace.MyClass”)]public class MyClass{ //…}

Page 17: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

COM Exposed .NET Assemblies

Registering Assembly for COM Interop• Registers the assembly to be instanciated via COM (can

be instanciated via CreateObject in VBScript plugins)

• Required to instanciate the .NET class in script[.NET][ComVisible(true), ProgId(“MyNamespace.MyClass”)]public class MyClass{ public void DoSomething() {}}

[VBScript]Dim obj Set obj = CreateObject(“MyNamespace.MyClass”) obj.DoSomething() Set obj = Nothing

Page 18: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

What Changes in SalesLogix version 7?

How do these concepts apply to .NET Extensions in SalesLogix v7?

What does the .NET Extensions feature offer for .NET development?

Page 19: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Discussion

Questions or Comments?

Page 20: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Additional Learning Opportunities

To discuss & learn more about building customizations for your SalesLogix system using .NET visit http://www.slxdeveloper.com/

• Articles

• Forums

• Associate with the best in the SalesLogix community!

Webcasts on SalesLogix development topics via http://www.customerfx.com/Events/Webcasts.fx

Page 21: Leveraging.NET in SalesLogix Building Customizations in.NET for your Current Version of SalesLogix and a Look at the Future Ryan Farley Customer FX Corporation

Your Feedback is Important to Us!

Your feedback helps us improve future conferences Please complete the evaluation form for this session Please include your session code on the evaluation

form CRM120 Contact me via the forums on slxdeveloper.com!

Thank you for your participation