Sie sind auf Seite 1von 1

Business Object - InvoiceEMailToCustomer

General Properties Field Expressions Object Validation Rules


Standard Fields Object Functions Field Triggers
Custom Fields Object Triggers Field Validation Rules

General Properties Top


Name (API Name): InvoiceEMailToCustomer (InvoiceEMailToCustomer_c)
Description: Invoice E-Mail To Customer
Display Label: Invoice E-Mail To Customer
Plural Label: Invoice E-Mail To Customer
Record Name Label: Invoice Number
Record Name Data Type: Text

Standard Fields Top

Display Label Type API Name Additional Properties

Created By Text CreatedBy Required Yes

Creation Date Date CreationDate Required Yes

Invoice Number Text RecordName Required Yes


Updatable (See Expression)

Last Update Date Date LastUpdateDate Required Yes

Last Updated By Text LastUpdatedBy Required Yes

Record ID Number Id Required Yes


Updatable No

Record Number Text RecordNumber Required Yes

Custom Fields Top

Display Label Type API Name Additional Properties

BCC Contact Text BCCContact_c Display Width 30


Maximum Length 80
Description BCC Contact

BU ID Text BUID_c Display Width 30


Maximum Length 80
Searchable No
Description Business Unit ID

BU Name Text BUName_c Display Width 30


Maximum Length 80
Required Yes
Description Persistent BU Name

Business Type Text BusinessType_c Display Width 30


Maximum Length 80
Required Yes
Description Contract Business Type

CC Contact Text CCContact_c Display Width 30


Maximum Length 80
Description CC Contact

Currency Code Text CurrencyCode_c Display Width 5


Description Invoice Currency Code

Customer Name Text CustomerName_c Display Width 30


Maximum Length 80
Required Yes
Description Customer Account Name

Customer Name Lookup CustomerNameSearch_c Display Width 40


Lookup Display Field CustomerName
Lookup Data Source InvoiceEMailToCustomer_c

Don't Use It Number InvoiceNumber_c Display Width 10


Maximum Length 20
Description AR Invoice Number

DU Name Text DUName_c Display Width 30


Maximum Length 80
Required Yes
Description Persistent DU Name

E-Mail Status Text EMailStatus_c Display Width 20


Maximum Length 30
Required Yes
Description E-Mail Status

From Date Date FromDate_c Description From Date

Invoice Category Text InvoiceCategory_c Display Width 30


Maximum Length 40
Required Yes
Description Invoice Category

Invoice Date Date InvoiceDate_c Required Yes


Description Invoice Date

Invoice Manager Picklist InvoiceManagers_c Required Yes


Lookup Type INVOICE MANAGERS
Description Invoice Manager

Invoice Status Text InvoiceStatus_c Display Width 30


Maximum Length 40
Required Yes
Description Invoice Status

Justification Picklist Justification_c Searchable No


Lookup Type XXPS_INVOICE_RESEND_JUSTIFIC
Description Justification for resening invoice to customer

Last E-Mail Sent By Text LastEmailSentBy_c Display Width 30


Maximum Length 250
Searchable No

Last E-Mail Sent Date Datetime EMailSentDateAndTime_c Date Display Type both
Description E-Mail Sent Date and Time

Last Request ID Text RequestID_c Display Width 30


Maximum Length 80
Searchable No
Description Email ESS Job request ID

Other, Specify Text Comment_c Display Width 30


Maximum Length 1000
Required (See Expression)
Searchable No
Description Invoicing Team Commnent

Persistent Company Text PersistentCompany_c Display Width 30


Maximum Length 100
Required Yes
Description Persistent Company

Persistent Entity Lookup Test_c Display Width 40


Lookup Display Field PersistentCompany
Lookup Data Source InvoiceEMailToCustomer_c

Project Invoice Id Text ProjectInvoiceId_c Default Value 100000000303311


Display Width 30
Maximum Length 80
Searchable No

Project Name Text ProjectName_c Display Width 30


Maximum Length 100
Required Yes
Description Project Name(s)

Request ID Formula LastSuccessfulRequestID_c Maximum Length 0


Formula Type Text
Updatable No
Expression (See Expression)
Depends On RecordNumber

TO Contact Text TOContact_c Display Width 30


Maximum Length 80
Description TO Contact

To Date Date ToDate_c Description To Date

Total Amount Number TotalAmount_c Display Width 10


Maximum Length 20
Required Yes
Description Total Invoice Amount

Field Expressions Top

Field: RecordName

(Back)
Updatable Expression

1 false

Field: Comment

(Back)
Required Expression

1 if ( Justification_c == 'Other') {
2 true
3 } else {
4 false
5 }

Field: LastSuccessfulRequestID

(Back)
Formula Expression

1 def vo = newView('EmailHistory_c');
2 def vc = newViewCriteria(vo);
3 def vcr = vc.createRow();
4 def vci = vcr.ensureCriteriaItem('RecordName');
5 vci.setOperator('=');
6 vci.setValue('36');
7 vc.insertRow(vcr);
8 vo.appendViewCriteria(vc)
9 vc.insertRow(vcr);
10 vo.appendViewCriteria(vc);
11 vo.executeQuery();
12 if(vo.first() !=null){
13 return vo.first().getAttribute("RequestID_c");
14 }

Object Functions Top


Function: EmailInvoice ()
Returns: void
Description: Function to email invoice to customer
See Audit Messages Below

1 if (TOContact_c != null) {
2
3 //Schedule Invoice Email ESS Job
4 def description = 'Customer Invoice Email Job'
5 def application = 'FscmEss'
6 def requestedStartTime = now()
7
8 def jobDefinitionId = [
9 name: 'customerInvoiceEmailJob',
10 packageName: '/oracle/apps/ess/custom/ppm/billing/invoices/',
11 type: 'JOB_DEFINITION'
12 ]
13
14 def requestParameters = [
15 parameter: [
16 [
17 dataType: 'STRING',
18 name: 'submit.argument1',
19 value: RecordName
20 ]
21 ]
22 ]
23
24 def res
25 res = adf.webServices.ESS_JOB_WEBSERVICE.submitRequest(description, jobDefinitionId, application, requestedStartTime, r
26
27 setAttribute('RequestID_c', res)
28
29
30 //Update E-Mail sent By and E-Mail sent Date
31
32 def lastEmailSentBy = adf.context.getSecurityContext()?.getUserProfile()?.getDisplayName()
33 setAttribute('LastEmailSentBy_c', lastEmailSentBy)
34
35 def lastEmailSentDate = now()
36 setAttribute('EMailSentDateAndTime_c', lastEmailSentDate)
37
38 def emailHistoryJustification = Justification_c
39
40 //Email History Creation
41
42 def parentRecordId = Id
43 def invoiceEmailVO = newView('InvoiceEMailToCustomer_c')
44 def found = adf.util.findRowByKey(invoiceEmailVO, parentRecordId)
45 if (found != null) {
46 def emailHistories = found.EmailHistoryDetail_c
47 def newEmailHistory = emailHistories.createRow()
48
49 emailHistories.insertRow(newEmailHistory);
50
51 newEmailHistory.setAttribute('EmailSentDate_c', lastEmailSentBy);
52 newEmailHistory.setAttribute('EMailSentDates_c', lastEmailSentDate);
53 newEmailHistory.setAttribute('RequestID_c', res);
54 newEmailHistory.setAttribute('Justification_c', emailHistoryJustification);
55 if (EMailStatus_c == 'Email Sent') {
56 newEmailHistory.setAttribute('Action_c', "Resend")
57 } else {
58 newEmailHistory.setAttribute('Action_c', "Send")
59 }
60 }
61
62 // Update E-Mail status
63 def emailStatus = 'Email Sent'
64 setAttribute('EMailStatus_c', emailStatus)
65
66 }

[Audit Results]
WARNING(46, 24) : No such property: EmailHistoryDetail_c for class: Object
WARNING(47, 25) : Cannot find matching method java.lang.Object#createRow(). Please check if the declared type is right and if the method exists.
WARNING(49, 3) : Cannot find matching method java.lang.Object#insertRow(java.lang.Object). Please check if the declared type is right and if the method exists.
WARNING(51, 3) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.lang.String). Please check if the declared type is right and if the method
exists.
WARNING(52, 3) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.sql.Timestamp). Please check if the declared type is right and if the
method exists.
WARNING(53, 3) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.lang.Object). Please check if the declared type is right and if the method
exists.
WARNING(54, 3) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.lang.String). Please check if the declared type is right and if the method
exists.
WARNING(56, 4) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.lang.String). Please check if the declared type is right and if the method
exists.
WARNING(58, 4) : Cannot find matching method java.lang.Object#setAttribute(java.lang.String, java.lang.String). Please check if the declared type is right and if the method
exists.
WARNING(25, 8) : Extended type is not defined, some properties/methods may be unchecked for expression: adf.webServices
Back To Function

Function: Warning ()
Returns: void
Description:

1 adf.util.raiseWarning("Error")

Object Triggers (AfterChangesPosted) Top


Name: toContactValidationTrigger
Description: TO Contact Validation Trigger
Error Message: TO Contact is required to send the Invoice email to customer. Please update To Email contract at Contact Level.

1 if(TOContact_c != null){
2 true
3 }else {
4 false
5 }

Object Validation Rules Top

Field Triggers Top

Field Validation Rules Top

Das könnte Ihnen auch gefallen