Using EMC Classes

This chapter discusses the EMC classes:

Click to jump to parent topicUnderstanding EMC Classes

EMC classes provide the functions to send and retrieve email approvals. They are included in the application package EOAW_EMC.

Click to jump to parent topicEmailFormManager Class

This class provides the utility methods to send collaborative emails.

Click to jump to parent topicEmailFormManager Class Methods

This section describes the public methods of interest to application developers for emailFormManager, in alphabetical order.

Click to jump to top of pageClick to jump to parent topicaddRecipient

Syntax

addRecipient(&emailAddress, &userID)

Description

Users added via this method will be allowed to act on the email form.

Parameters

&emailAddress

Email address, as string. Required.

 

&userID

User ID, as string. Optional.

Returns

None.

Click to jump to top of pageClick to jump to parent topicaddCC

Syntax

addCC(&emailAddress)

Description

Email addresses added via this method will be copied on every email sent out.

Parameters

&emailAddress

Email address, as string. Required.

Returns

None.

Click to jump to top of pageClick to jump to parent topicaddBCC

Syntax

addBCC(&emailAddress)

Description

Email addresses added via this method will be blind copied on every email sent out.

Parameters

&emailAddress

Email address, as string. Required.

Returns

None.

Click to jump to top of pageClick to jump to parent topicaddAttachment

Syntax

addAttachment(&filePath, &filePathType, &fileName, &fileTitle)

Description

Adds an attachment to be sent along with the email.

Parameters

&filePath

A string consisting of the complete path to the file and the filename itself.

&filePathType

A number representing type of file path used in first parameter. Use tools system variables such as %FilePath_Relative.

&fileName

A string representing the name of the file being attached.

&fileTitle

A string consisting of the title of the file. The titles appear near the attachment icons in place of the fully qualified filename.

Returns

None.

Click to jump to top of pageClick to jump to parent topicsendEmails

Syntax

sendEmails(&sentToCheckOnReturn )

Description

Does the actual send of the email once all other information is ready.

Parameters

&sentToCheckOnReturn

If set to true, the EMC will verify that the user to whom the email was sent is the same as the user who sent the response. If this is not true, an error will be inserted into the error stack allowing the implementing application to handle it as they see fit.

Click to jump to parent topicEmailFormManager Class Properties

This section describes the emailFormManager class properties.

Click to jump to top of pageClick to jump to parent topicinlineText

Description

A string of text that the user will see if the deliveryMethod property is set to inline but their mail client does not support HTML emails. A default is provided. inlineText and attachmentText will never be delivered in the same email.

Click to jump to top of pageClick to jump to parent topicattachmentText

Description

A string of text that the user will see if the deliverMethod property is set to attachment. This text will generally be used as instructional text telling them to detach the html form and submit it. A default is provided. inlineText and attachmentText will never be delivered in the same email.

Click to jump to top of pageClick to jump to parent topicsubject

Description

The subject of the email to be sent. Default is PeopleSoft Collaborative Email Routing. Keep language considerations in mind when using this property.

Click to jump to top of pageClick to jump to parent topicsubmitMessage

Description

A string of text that the user will see if the deliveryMethod property is set to inline but their mail client does not support HTML emails. A default is provided. inlineText and attachmentText will never be delivered in the same email.

Click to jump to top of pageClick to jump to parent topicfrom

Description

The name of the person or account sending this email.

Click to jump to top of pageClick to jump to parent topicfromEmail

Description

The email address of the person or account sending this email.

Click to jump to top of pageClick to jump to parent topicreplyTo

Description

The address users should reply to if there is a problem. This defaults to the same email address that form responses are fielded from.

Click to jump to top of pageClick to jump to parent topicpropendText

Description

Use this variable to include any text you would like inserted before the form being emailed.

Click to jump to top of pageClick to jump to parent topicappendText

Description

Use this variable to include any text you would like inserted after the form being emailed

Click to jump to top of pageClick to jump to parent topicdeliveryMethod

Description

Specifies whether to send the emails as inline html or attachments. Attachments will include a better user interface as the browser used to view the html attachment is likely to support more JavaScript and DHTML than email clients like Lotus Notes. Valid values are I for Inline and A for attachment.

Click to jump to parent topicEOAW_EMC:utils Class

This class contains methods that support the main functionality of EMC

Click to jump to parent topicEOAW_EMC:utils Class Methods

This class provides the utilities to

This section describes utils class methods.

Click to jump to top of pageClick to jump to parent topicgetAppRS

Syntax

getAppRS(&msgRS )

Description

This method provides a single point from which to retrieve the applications rowset from the message definition rowset, as the message definition should have the application rowset starting at level 2. Given the rowset object representing your entire message, this rowset will return just the part of the overall rowset representing your transaction.

Parameters

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Click to jump to top of pageClick to jump to parent topicgetErrorCodesRS

Syntax

getErrorCodesRS(&msgRS )

Description

This method provides a single point from which to retrieve the error codes rowset from the message definitions rowset.

Parameters

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Click to jump to top of pageClick to jump to parent topicgetPromptsRS

Syntax

getPromptsRS(&msgRS)

Description

This method provides a single point from which to retrieve the prompts rowset from the message definition's rowset, as the message definition should have the prompts rowset starting at level 2.

Parameters

&msgRS

The rowset object representing your entire message.

Returns

Rowset.

Click to jump to top of pageClick to jump to parent topicgetRowFromPath

Syntax

getRowFromPath(&startingRS, &path, &createIfNull)

Description

This method is useful for error processing. When your message expects a date or number field to be returned by the user, but the EMC cannot cast the value it gets back into one of those data types, it will put an error code in the exceptions stack . Along side that code in the stack, will be a row path. A row path is the path you need to follow to get to a specific row in a rowset. It follows the format (n)SCROLLNAME[(n)...] where n is a row number and SCROLLNAME is the name of the record comprising the rowset you want to retrieve in that row. When you get an error of one of these 2 types, you can call this method, passing in your message rowset, the rowpath in the error stack, and false. You will be returned the exact row where the error occurred (the name of the record and field are also in the error stack.

Parameters

&startingRS

The rowset from which to start searching for a row, as rowset.

&path

Path to the desired row, as string. Syntax - (n)[SCROLLNAME(n)...] where n is the row in the scroll preceding it. The rowset preceding the first n is &startingRS

&createIfNull

If set to true, the method will insert as many rows as necessary to retrieve the row successfully. If set to false and the row is not present, an exception will be thrown.