Monday, July 6, 2009

A simple business scenario was put up to me by one of our clients on displaying values of fields in the product catalog on the opportunity revenue page once the product is selected. R 16 includes a new workflow function called joinfield which was used for this case.

The syntax can be used for pulling data and crossing them over to different record types.

For this particular scenario, there were custom fileds created on the product catalog; namely List price, Discount price , Discount percentage etc.

The following syntax shows you how to accomplish copying one of the field values.

JoinFieldValue('<Product>',[<ProductId>],('<ListPrice>'))

The first parameter in the function is Record type name. The second parameter is the foreign key which maybe unique for each record type. and finally the third parameter is the field value which is supposed to be copied over. The syntax was created for Revenue record type , with the trigger event "Before modifed record saved".

A simple and a effective sloution

Feel free to leave a comment


Monday, June 8, 2009

Date/Time

Business Scenario.

So I came across this business scenario which was quite a challenge for me . It dealt with the all so gruesome Date/Time fields. The requirement was to display the GMT time from the local time of the server. The location of the server was Southern california i.e; PST. And GMT time is 8 hours ahead of PST. As most developers , this seemed to me as a simple sql query of adding 8 hours to the current date/time . I was surprised to find out that the basic sql function of TimestampADD was not supported under workflow conditions. After putting much thoughts and thanks to the bits and pieces of info in OTN forums , I figured out a way to add hours to current time stamp using the following.

The logic used was to conver the date/time field value in to string and extracting date and time from it using the Mid function and then hours as numeric to each extracted value. here's The syntax.

Mid(Timestamp()+(8.0/24.0),1,2)+'/'+Mid(Timestamp()+(8.0/24.0),4,2)+'/'+Mid(Timestamp()+(8.0/24.0),7,4)+' '+Mid(Timestamp()+(8.0/24.0),12,8)

The Timestamp() gets the current timestamp at the local server. The (8.0/24.0) adds the hours (ofcourse you can use some brains and convert the fraction to minutes). The remaining parameters states the position of the date value and the time value.

If only the following syntax is used

Mid(Timestamp(),1,2)+'/'+Mid(Timestamp(),4,2)+'/'+Mid(Timestamp(),7,4)+' '+Mid(Timestamp(),12,8)

then it displays the current date/time. You can use the above syntaxes both at the workflow level and field validation level.

Feel free to ask more.

Cheers!

Monday, June 1, 2009

Picklist Values

Business Scenario -

1) A basic and simple scenario I come across is when clients ask to send out email notifications or create tasks when Picklist values change.

a) Function - PRE
i) Usage - PRE(('<Field_name>')) <>[<Field_name>]

The above syntax can be used to send email or create tasks when a/any change happens on that picklist field. There are times when the need is to fire the workflow when a particular picklist value is changed to a particular value. An example of this would be when a account type is changed from "Prospect" to "Customer".

The syntax would be
PRE(('<AccountType>'))=LookupValue("OCC_Account_Type", "Prospect") AND PRE((' <AccountType>' )) <>[<AccountType>] AND [<AccountType>] = LookupValue("OCC_Account_Type", "Customer")

Hope the above helps.. Feel free to leave a comment or let me know about any queries on other business scenarios.!

CRM

CRM - Customer Relationship Management. The three words which matter a lot in today's economy. Every organization be it a huge corporate,a mid-level organization, a small business, from any type of industry be it manufacturing,services,consulting,education right down to a individual who is an independant contractor requires CRM to run their businesses.

And ofcourse , since every business knows the importance , they try to implement a CRM software which helps them keep the relation smooth with their customers and use it to increase their customer base.

There are many CRM softwares available in the market.; the leaders being Sales force.com,Oracle CRM on Demand, Sugar CRM and so on. As a consultant associated with Oracle's CRMOD, this blog will mainly focussed on Oracle's CRM application named ; Oracle CRM on demand.

You can find many blogs dedicated to this product, hence i decided to create this blog in to a mini knowledge base. I have been associated with this application for more than 2 years now and the one thing which challenges and interests me the most are the workflows. I will be posting business requirements which i have come across with my clients and the work arounds whic h were designed to fill the gaps through the workflows...

Enjoy the posts