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

Post on 13-Jan-2016

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Leveraging .NET in SalesLogixBuilding 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

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

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

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

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

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

Sample .NET Customizations

Sample Customizations• Better Presentation of Data

• Make difficult tasks easy

• Do what can’t be done

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

SalesLogix COM Library

SalesLogix “Application” object• Same object exposed in scripts

Only available while the SalesLogix client is running.

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);}

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)

Win32 API

Provide ability to embed in SalesLogix

Gives info about host form in SalesLogix to .NET code

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);

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;

}

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{ //…}

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

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?

Discussion

Questions or Comments?

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

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

top related