advanced peopletools tips and techniques session #: 23422 chris heller, grey sparling solutions

25
<Insert Picture Here> Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Upload: alicia-christine-heath

Post on 17-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Advanced PeopleTools Tips and TechniquesSession #: 23422

Chris Heller, Grey Sparling Solutions

Page 2: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Agenda

• About This Session• Presenter Overview• PeopleTools Tips and Techniques

• Drilling Into Application Designer• Security Drilling / Portal Administration Drilling• Dynamic Tracing or Row Level Security• Enhancing PeopleSoft User Experience• Automating “Save As” Processing• Grab Bag

• Questions

Page 3: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

About This Session

• Hands On• Demo Intensive• Existing Experience with Application Designer is assumed• Focus is on PeopleTools 8.4x

• But techniques can be applied to earlier versions• Don't worry about trying to type code snippets in your

notes!

Page 4: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

More about the Presenters• David Bain

• PeopleSoft Employee 1996 - 2005• PeopleTools Development Manager / Product Strategy• Currently Splitting Time between Fusion and PeopleTools for Oracle

• Chris Heller• PeopleSoft Employee 1993 - 2005• Director, PeopleTools Product Strategy 1999 – 2005• Currently Chief Architect at Grey Sparling Solutions

Page 5: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Who is Grey Sparling Solutions?

We Enhance the PeopleSoft Experience

• Our Products• Address common PeopleSoft needs.• Leverage your existing PeopleSoft infrastructure.• Enable functionality with minimal cost and effort

Page 6: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Products that Enhance

Administrative Experience• Operations Productivity• Application Support Productivity• Developer Productivity

Auditing Experience• Compliance and Accountability• Security

End-User Experience• End-user Productivity• Enhanced Reporting

Page 7: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Application Designer Drilling

Page 8: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Application Designer Drilling

• Go from online page into underlying objects in Application Designer

• Drill from other environments• Web• Email• Windows Explorer

Page 9: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Calling ViewObject from PeopleCode

Page 10: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Application Designer Drilling

• Free Enterprise wide License for Grey Sparling PSIDE Helper for PeopleSoft customers attending this session.

• Send an email to [email protected]• Don't use your hotmail address :-)

Page 11: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Sidebar – Programmatic “Where Used”

• Problem : How to programmatically determine where a given PeopleTools definition is used? • For example, where is a Component Interface used?

• Solution : Query against PSPCMNAME• Definition references in PeopleCode are stored here• Have to do a little bit of decoding of values

• 1 = Record• 2 = Field• etc.

Page 12: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Security Drilling / Portal Administration Drilling

Page 13: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Understanding Bookmarklets

• Mini Javascript programs that execute in the context of the current page

• See http://www.bookmarklets.com/ for examples• Has to be one line of JavaScript as a browser favorite

Page 14: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Security Drill Bookmarklet Expanded

var w = window.frames['TargetContent'];

if (!w) { w = window; }

if (w.strCurrUrl.search(/PAGE=([A-Z0-9_]+)/)>0) {

document.location = '/psc/ps/EMPLOYEE/ERP/q/?ICAction=ICQryNameURL=PUBLIC.PT_SEC_PAGES_PLIST&BIND2=' + RegExp.$1;

}

else {

alert('Could not figure out page name.');

}

Page 15: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Dynamic Tracing

Page 16: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Dynamic Tracing

• Leverage iScript capabilities to avoid tracing an entire session

Function IScript_PCTraceOff()

SetTracePC(0);

End-Function;

Function IScript_PCTraceAll()

SetTracePC(3596);

End-Function;

Page 17: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Dynamic Tracing

• See also post on ERP Associates weblog about accessing PeopleSoft log files via a web browser

• http://www.erpassociates.com/peoplesoft-corner-weblog/peopletools/browse-the-app-server-filesystem-via-iscript.html

Page 18: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Enhancing PeopleSoft User Experience

Page 19: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Enhancing PeopleSoft User Experience

• Judicious use of JavaScript on PeopleSoft generated pages

• Multiple ways to add JavaScript• HTML Areas• Web Server plugins• PeopleTools HTML objects

Page 20: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Minimizing impact with JavaScriptfunction addEvent(obj, evType, fn, useCapture){

if (obj.addEventListener){

obj.addEventListener(evType, fn, useCapture);

return true;

} else if (obj.attachEvent){

var r = obj.attachEvent("on"+evType, fn);

return r;

} else {

alert("Handler could not be attached");

}

}

addEvent(document, "keydown", function (e) { gridKeyHandler(e); }, false);

Page 21: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

function gridKeyHandler(evt) {

evt = getEvent(evt);

var src = getEventSource(evt);

if (typeof src === "undefined") { return; }

var key = evt.keyCode;

if (key === 38 || key === 40) {

var tokens = /(.+)\$(\d+)/.exec(src.id);

var newRowNbr = parseInt(tokens[2]) + ((key === 38) ? - 1 : 1);

var moveToID = tokens[1] + '$' + newRowNbr;

var moveTo = document.getElementById(moveToID);

if (moveTo) { moveTo.focus(); }

}

} { gridKeyHandler(e); }, false);

Page 22: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

<Insert Picture Here>

Automating “Save As” functionality

Page 23: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Automating “Save As” Functionality

• Load Project with “Save As” code• Identify/Create Component Interface for Component

• Don't forget about security!

• Copy level 0 Record• Delete all fields except for keys• Change Record type to Work Record

• Create Page with fields from new record• Add “Save As” subpage• Add page to component• Grant security to Save As page for authorized users• Optional

• Add additional PeopleCode logic around “Save As” logic

Page 24: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Save As PeopleCode

• This gets added to RowInit for your work record

GS_CI_UTILS_WRK.RECNAME = "GS_VNDR_SAVE_AS";GS_CI_UTILS_WRK.BCNAME = "VNDR_ID_EXCEL";GS_CI_UTILS_WRK.PANELNAME = "VNDR_ID1_SUM";

• Optionally copy PeopleCode from delivered “Save As” push button to add application specific logic• Example : Auto-numbering, etc.

&level0RecordNew.GetField(Field.VENDOR_ID).Value = &newCI.GetPropertyByName("VENDOR_ID");

Page 25: Advanced PeopleTools Tips and Techniques Session #: 23422 Chris Heller, Grey Sparling Solutions

Questions?

• http://blog.greysparling.com/• Lots of good PeopleTools Tips and Techniques posted