Wednesday, June 18, 2014

Let Richard Whaley know how much he’s helped

image

Our friend Richard Whaley is in poor health. In fact, he is in hospice care right now. Richard didn’t want anyone to know how poor his health was, because he didn’t want any of us to worry. Well, it’s time to worry – and to pray.

Beyond that, it’s time to let Richard know just how much he’s helped you, and meant to you, if he has. Whether with his books, or webinars, or forum responses, or just stopping by during one of the conferences for a chat. I don’t think he realizes just how much of a difference he’s made to this community.

So, let’s fill his mailbox at rwhaley@accoladepublications.com or  Richard.Whaley@IntegratedBusinessGroup.com. Trend on twitter with #ProfessorWhaley, or however you can get the message to Richard that he has been a giant amongst us Dynamics GP folks. We forgive him for ever supporting Macola – we all make mistakes Smile.

I’ll be flying to Orlando tomorrow from Dallas to see Richard. I hope by the time I see him his mailbox will be full!

Bless you all who care.

Leslie

P.S.  I’m kind of mad at him myself, I was just starting to like him. Winking smile

Tuesday, June 17, 2014

GP 2013 R2 Ribbons

Not only is there a Dex.ini switch to disable the new ribbons (EnableWCRibbons=FALSE), but you can set a User Preference as to how you would like them to display.

I thank Heather Roggeveen for pointing out this new User Preference. When you launch the User Preferences window, there’s a new option. Check out the screen shot below:

image

You have three choices: Action Pane, Action Pane Strip, or Menu Bar. Each are described below:

Window Command Display

Select how to display commands in a window. Refer to the following table to view how commands can be displayed in a window.

Window Command Display selections

Action Pane

image

Action Pane Strip

image

Menu Bar

image

In addition, you can use a Dex.ini switch to turn off the Action Pane for all users at the workstation level. To turn off the Action Pane for the workstation, put the following in your Dex.ini file:  EnableWCRibbons=FALSE 

Enjoy!

Leslie

Monday, June 16, 2014

Another new Dex.ini switch EnableWCRibbons=FALSE

Boy what a day, another new dex.ini switch to add to my collection. I’m guessing R2 of GP2014 has many more that I have not discovered yet. Please let me know if you find new ones.

Here’s what this one does. If you set it to FALSE the new ribbon bars go away and the windows look like they did prior to the R2 release. If you set it to TRUE, you get the fancy new ribbon bars. Here’s an example:

EnableWCRibbons=TRUE

clip_image002

EnableWCRibbons=FALSE

clip_image004

If you don’t like the ribbon bars, you can hide them. I’m guessing you should learn to love them because I bet at some point this switch won’t work anymore.

Enjoy!

Leslie

A New Dex.ini Switch – VBADisable=TRUE

Here’s one more for the collection.

I ran into an issue today after I loaded the patch to update my GP 2013 to build 1745. After the patch was loaded, I no longer had access to Modifier. I’m a pretty heavy Modifier user, so this was a big problem for me. I searched around the Internet a bit and didn’t find anything. I looked on the forum, even posted a question, but didn’t get an answer.

Next, I looked at the Dex.ini file for the new build and compared it to the old build. A Ha! There was a new Dex.ini switch that appeared in my build 1745 install. The switch read: VBADisable=TRUE. That sounded to me like it might be the problem. I changed the TRUE to FALSE and tried again.

Sure enough, the Modifier tool was once again available. This is probably documented somewhere, but I couldn’t find it. If you should run into this, here’s your answer.

Enjoy!

Leslie

Sunday, June 15, 2014

Setting up Multicurrency

I developed my own cheat sheet / checklist for setting up the Multicurrency module. I wanted something that I could fit on a single page just to remind me of what I needed to do next.

Recently, I’ve had a few colleagues ask me whether I had some kind of easy to follow checklist and I’ve been sending them this one. It seems more and more companies are implementing multicurrency these days, so I thought I’d share it with the community. It’s not fancy, nor does it provide any explanations – but it does provide the navigation to the various widows.

I welcome your comments on ways to improve it or if you think things should be re-ordered.

1. Create Currency (use the ISO code for the ID, don’t use the ‘Z’ entries)
Administration | Setup | System | Currency

2. Create Exchange Table
Administration | Setup | System | Exchange Table
Exchange Table naming convention suggestion:
  Segment 1 = Functional Currency
  Segment 2 = Originating/Reporting Currency
  Segment 3= Usage, such as BUY, SELL or AVG (optional)

3. Establish Rates
Administration | Setup | System | Exchange Table | [Rates button]
Rate calculation is Originating Currency * Rate
OR
Originating Currency / Rate
You can use up to seven decimals

4. Grant Company access to currency and rate table (all must exit Dynamics)
Administration | Setup | System | Multicurrency Access

5. Set Rate Types
Financial | Setup | Financial | Rate Types

6. Set Posting Account Defaults. The system will search for an account in the order listed below. As soon as it finds one, it stops looking. If all should share the same account, enter it at the Company level.

Rate Type Accounts
     Financial | Setup | Financial | Rate Types | [Accounts button]

Currency ID
     Administration | Setup | System | Currency | [Accounts button]
OR
     Financial | Setup | Financial | Currency Accounts

Company-level Posting Accounts
     Administration | Setup | Posting | Posting Accounts | Display ‘Financial’ from drop list

7. Assign Currency Access to your GL Accounts. Identify which accounts should accept transactions in a foreign currency.
Financial | Cards | Financial | Account Currencies
OR
Financial | Cards | Financial | Currency Account Update
OR
Financial | Cards | Financial | Account History | [Currencies button]
OR
Financial | Cards | Financial | Account | [Currency button]

8. Assign Currency ID and Rate Type ID to Checkbook ID
Financial | Cards | Financial | Checkbook

9. Assign default Currency ID and Rate Type ID to appropriate Customers (or roll down from Customer Classes) and set revaluation options
Sales | Cards | Customer | [Options button]

10. Assign default Currency ID and Rate Type ID to appropriate Vendors (or roll down from Vendor Classes) and set revaluation options
Purchasing | Cards | Vendor | [Options button]

Enjoy!

Leslie

What’s in a date? PM Transactions

cat calendar
Recently, I worked with a group that needed to make changes to the dates of some of their posted payables transactions. Of course, you can’t do that through the user interface, so it was SQL to the rescue. While the initial job sounded easy, I was astonished to see just how many different date fields were in the tables. This post will review the various date fields in the following three tables:

Physical Name
Display Name
Date Fields
PM20000
PM Transaction OPEN File
10
PM30200
PM Paid Transaction History File
11
PM30300
PM Apply To History File
6

For each table, I’ll give the physical name for each relevant field and a short explanation of what I know about that date field. Some of the fields are obvious. Some, well, not so much.
I need a better explanation for the Purchase Date. Please add a comment to this post if you have more information on how this field is populated.

  PM20000

  PM Transaction Open File - 10 dates

VCHRNMBR
Voucher Number
VENDORID
Vendor ID
DOCTYPE
Document type of transaction. (Invoice, Return, Payment, etc.)
DOCDATE
Document date on the invoice or payment. This date is used by the subsidiary module (Payables Management)  to 'age' the document and to calculate it's due date.
DISCDATE
Date by which the invoice must be paid to earn the terms discount
DUEDATE
Date the invoice is due. After this date it is delinquent
POSTEDDT
System date when user pushed the [Post] button when the doc was originally posted.
MODIFDT
User date when transaction was last modified
DINVPDOF
The apply date from the final document applied to the invoice. This is the date the invoice or pmt became fully applied. Voided is fully applied, written-off can be fully applied. A document in the Open table should not have a value in this field, because no documents in the open table should be ‘paid off’.
PSTGDATE
Posting date for the invoice or payment; set by the user on batch window or doc date expansion window. This is the date of the transaction on the General Ledger - the date attached to the Journal Entry created by the transaction.
Tax_Date
Date that should be used to calculate and/or report sales tax, defaults to Document date; set by user on window
PRCHDATE
Physical date of transfer of goods/services
DEX_ROW_TS
Dex Row Timestamp – system date & time when last modified


  PM30200

  PM Paid Transaction History File - 11 dates


VCHRNMBR
Voucher Number
VENDORID
Vendor ID
DOCTYPE
Document type of transaction. (Invoice, Return, Payment, etc.)
DOCDATE
Document date on the invoice or payment. This date is used by the subsidiary module (Payables Management) to 'age' the document and to calculate it's due date.
DISCDATE
Date by which the invoice must be paid to earn the terms discount
DUEDATE
Date the invoice is due. After this date it is delinquent
POSTEDDT
System date when user pushed the [Post] button when the doc was originally posted.
MODIFDT
user date when trx last modified an ‘apply’ is a modification, a void is not.
DINVPDOF
Apply date of the document that caused the invoice or pmt to be fully applied. Voided is fully applied, written-off can be fully applied. The DATE1 field for the final apply record in the PM30300 table becomes the DINVPDOF.
PSTGDATE
Posting date for the invoice or payment; set by the user on batch window or doc date expansion window. This is the date of the transaction on the General Ledger - the date attached to the Journal Entry created by the transaction.
VOIDPDATE
The Posting Date (GL date) for the Void -The sub ledger void date becomes the DINVPDOF
Tax_Date
Date that should be used to calculate and/or report sales tax, defaults to Document date; set by user on window
PRCHDATE
Physical date of transfer of goods/services
DEX_ROW_TS
Dex Row Timestamp – system date & time when last modified, includes voids.

  PM30300

  PM Apply to History File - 6 dates

VENDORID
Vendor ID
VCHRNMBR
Voucher number of the payment document. The ‘apply from’ voucher number.
APFRDCNM
Document number of the payment ( check number). The ‘apply from’ Document number
DOCTYPE
Document type of the payment. The ‘apply from’ document type.
APTVCHNM
Voucher number of the invoice being paid. The ‘apply to’ voucher number.
APTODCNM
Document number of the invoice being paid. The ‘apply to’ invoice number
APTODCTY
The type of document the pmt is being applied to; invoice, debit memo, etc. The ‘apply to’ document type.
DOCDATE
Document date of the payment being applied; check date. The ‘apply from’ document date.
DATE1
The date the sub ledger uses for the ‘apply date’. This is set by the user on the apply window and used by the system in the HITB and to determine when the 1099 amount is reportable.
GLPOSTDT
Posting date to the general ledger, if an entry is necessary, like in a write-off. Set by user on the apply window
APTODCDT
Document date of the invoice being paid. The ‘apply to’ document date
ApplyToGLPostDate
Original GL posting date of the invoice being paid. The ‘apply to’ GL posting date.
ApplyFromGLPostDate
Original GL posting date of the payment document. The ‘apply from’ GL posting date.

Live the Dream!
Leslie

Tuesday, June 10, 2014

GP 2013 R2 updates to Report Writer Functions

David Musgrave posted an article about updates and additions he has made to the User-Defined functions he added to Report Writer back in release 7.0. I have added a list and description of those functions to my section about User-Defined Report Writer functions.

There are some incredibly handy functions now available. Check out his post by following this link.
David Musgrave's updates to Report Writer functions
I have copied his entire article below:

"By David Musgrave, View Profile8 Jun 2014 6:00 PM

You might remember the story about how I created a suite of Report Writer functions and got them added to the version 7.0 Dynamics.dic core dictionary. The aim for these functions was to make it easier for partner consultants and customers to modify the reports without needing custom scripting in Visual Basic for Applications (VBA) or Dexterity. They are documented in the Report Writer Functions document in the Software Developers Kit (SDK).

Based on feedback I have received from the community, I have made some changes to a few of the Report writer functions and submitted them to the development team for inclusion in the Microsoft Dynamics GP 2013 R2 (Service Pack 3) code. Below is a summary of the Report Writer (RW) functions changed and what new functionality is available.

RW_CoAddrIDInfo()
  • If an empty string is passed as the Address ID (first) parameter, the address data is pulled from the Company Master (SY_Company_MSTR, SY01500) table instead of Location Master (SY_Location_MSTR, SY00600) table.
RW_PMAddrIDInfo()
  • If an empty string is passed as the Address ID (second) parameter, the address data is pulled from the Vendor Master (PM_Vendor_MSTR, PM00200) table instead of Vendor Address Master (PM_Address_MSTR, PM00300) table.
RW_RMAddrIDInfo()
  • If an empty string is passed as the Address ID (second) parameter, the address data is pulled from the Customer Master (RM_Customer_MSTR, RM00101) table instead of Customer Address Master (RM_Customer_MSTR_ADDR, RM00102) table.
  • For the Field (third) parameter, The values 14 and 15 have been added for the User Defined 1 and User Defined 2 fields respectively.
RW_GetInternetText()
  • Updated Field (sixth) parameter, so that it works without errors. The values of 10 (to), 11(cc) and 12(bcc) return email addresses, any other value returns the internet text field.
RW_ConvertToWordsAndNumbers()
  • Added new mode to support full conversion of dollars and cents to words. The Mode (third) parameter now supports the following three values:
0 = Whole Number in words, Parts in numbers
1 = Whole Number in numbers, Parts in numbers
2 = Whole Number in words, Parts in words *NEW
RW_ConvertToWordsAndNumbersParse()
  • Added new mode to support full conversion of dollars and cents to words. The Mode (third) parameter now supports the following three values:
0 = Whole Number in words, Parts in numbers
1 = Whole Number in numbers, Parts in numbers
2 = Whole Number in words, Parts in words *NEW
Here are some examples of the RW_ConvertToWordsAndNumbers() function in action:
  • RW_ConvertToWordsAndNumbers( 1234.56   ""   0 )
One Thousand Two Hundred Thirty Four Dollars and 56 Cents
  • RW_ConvertToWordsAndNumbers( 1234.56   ""   1 ) returns
** 1,234 Dollars and 56 Cents
  • RW_ConvertToWordsAndNumbers( 1234.56   ""   2 ) returns
One Thousand Two Hundred Thirty Four Dollars and Fifty Six Cents (the above function is incredible; it’s one we’ve wanted for years!) For more information, check out the following blog articles:
Hope you like the improvements.”

Enjoy!

Leslie




















RW Functions Global Scripts

These User-Defined Report Writer functions were added to Report Writer back in release 7.0 by David Musgrave (thank you David!)
 In the GP Software Development Kit (SDK), you can the document this posting was copied from, as well as a sample report using each one of these functions You can find the SDK in the Tools folder of the DVD installation media.
The functions are separated into five different categories:
  • Numeric Functions
  • String & Text Functions
  • Date & Time Functions
  • Data Functions
  • Multicurrency Functions
Below is a listing of each function and how to use it:  

Numeric Functions

RW_Abs

clip_image002
Module: System Manager
Series: System
Script type: Global function
Category: Numeric Manipulation
Description: Returns the absolute value for the currency or vcurrency value supplied. Uses the Dexterity abs() function.
Parameters: in vcurrency IN_value.
Return Value: function returns vcurrency OUT_value. 

RW_ConvertToWordsAndNumbers

clip_image002[1]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Convert currency value to Words and Numbers, using descriptive terms from the Currency ID supplied. Prerequisites: none Parameters: in currency IN_Value. { Value of Currency } in string IN_Currency. { Currency ID of Currency - Leave Blank for Functional } in integer IN_Mode. { non-zero = Use Numbers and Words instead of only Words } Return Value: function returns string OUT_string.

RW_ConvertToWordsAndNumbersParse

clip_image002[2]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Convert currency value to Words and Numbers, using descriptive terms from the Currency ID supplied. Returns the result parsed into lines of a specified length. Uses the Dexterity Field_ParseText() function. Prerequisites: none Parameters: in currency IN_Value. { Value of Currency } in string IN_Currency. { Currency ID of Currency - Leave Blank for Functional } in integer IN_Mode. { non-zero = Use Numbers and Words instead of only Words } in integer IN_Characters. { Number of Characters per Line } in integer IN_Line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_Format

clip_image002[3]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Converts the contents of a currency or variable currency field to a string, applying the specified formatting. Uses the Dexterity format() function. IN_neg_type should use the following values:- 1 = SYSTEMNEG 2 = MINUSNEG 3 = PARENNEG 4 = CRNEG add 100 to display with % symbol Prerequisites: none Parameters: in vcurrency IN_currency. { value to format } in integer IN_cur_symbol. { non zero = display currency symbol } in integer IN_thou_sep. { non zero = display thousands separator }in integer IN_dec_places. { number of decimal places } in integer IN_neg_type. { how to display negative values } Return Value: function returns string OUT_string.

RW_MaxCurr

clip_image002[4]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the maximum of the two currency or vcurrency values supplied. Uses the Dexterity max() function. Prerequisites: none Parameters: in vcurrency IN_Value1. in vcurrency IN_Value2. Return Value: function returns vcurrency OUT_Max.

RW_MaxInt

clip_image002[5]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the maximum of the two integer or long values supplied. Uses the Dexterity max() function. Prerequisites: none Parameters: in long IN_Value1. in long IN_Value2. Return Value: function returns long OUT_Max.

RW_MinCurr

clip_image002[6]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the minimum of the two currency or vcurrency values supplied. Uses the Dexterity min() function. Prerequisites: none Parameters: in vcurrency IN_Value1. in vcurrency IN_Value2. Return Value: function returns vcurrency OUT_Min.

RW_MinInt

clip_image002[7]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the minimum of the two integer or long values supplied. Uses the Dexterity min() function. Prerequisites: none Parameters: in long IN_Value1. in long IN_Value2. Return Value: function returns long OUT_Min.

RW_PadZero

clip_image002[8]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns a zero padded string of specified based on the currency value supplied. The number of decimal places and whether to show the decimal separator can be selected. Prerequisites: none Parameters: in currency IN_Amount. { Currency value to Pad } in integer IN_Length. { Length of returned string } in integer IN_Decimal. { Number of Decimal Places } in integer IN_Dec_Sep. { non-zero = Show Decimal Separator } Return Value: function returns string OUT_String.

RW_Round

clip_image002[9]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the rounded value of a specified field. The field can be rounded on either side of the decimal separator. Uses the Dexterity round() function. IN_side should use the following values:- 0 = DECIMALRIGHT 1 = DECIMALLEFT IN_mode should use the following values:- 0 = ROUNDMODE_UP 1 = ROUNDMODE_DOWN 2 = ROUNDMODE_HALF_UP 3 = ROUNDMODE_HALF_DOWN 4 = ROUNDMODE_HALF_EVEN 5 = ROUNDMODE_CEILING 6 = ROUNDMODE_FLOOR Prerequisites: none Parameters: in vcurrency IN_value. { Currency or vcurrency value to be rounded } in integer IN_side. { Side of Decimal Separator to be rounded } in integer IN_dec_places. { Number of places to round to } in integer IN_mode. { Method to use for Rounding } Return Value: function returns vcurrency OUT_value.

RW_Truncate

clip_image002[10]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns the truncated value of a specified field. The field can be truncated on either side of the decimal separator. Uses the Dexterity truncate() function. IN_side should use the following values:- 0 = DECIMALRIGHT 1 = DECIMALLEFT Prerequisites: none Parameters: in vcurrency IN_value. Return Value: in vcurrency IN_value. { Currency or vcurrency value to be truncated } in integer IN_side. { Side of Decimal Separator to be truncated } in integer IN_dec_places. { Number of places to truncate }

RW_Value

clip_image002[11]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Numeric Manipulation Description: Returns a numeric value containing the first set of numeric value encountered in a specified string. Uses the Dexterity value() function. Prerequisites: none Parameters: in string IN_string. Return Value: function returns vcurrency OUT_value.

String & Text Functions

RW_Left
clip_image003
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns the left hand specified number of characters from the string supplied. Prerequisites: none Parameters: in string IN_String. in integer IN_Length. Return Value: function returns string OUT_string.

RW_Length

clip_image003[1]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns the number of characters in string supplied. Uses the Dexterity length() function. Prerequisites: none Parameters: in string IN_String. Return Value: function returns integer OUT_length.

RW_Lower

clip_image003[2] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a string in which all the alphabetic characters of a specified string have been converted to lower case. Uses the Dexterity lower() function. Prerequisites: none Parameters: in string IN_String. Return Value: function returns string OUT_string.

RW_Pad

clip_image003[3] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a padded string based on the string supplied, padded in the specified direction with the characters supplied. Uses the Dexterity pad() function. IN_Direction should use the following values:- 1 = LEADING 2 = TRAILING 3 = LEADING+TRAILING Prerequisites: none Parameters: in string IN_String. { String to Pad } in integer IN_Direction. { Direction to pad } in string IN_Pad. { Character to pad with } in integer IN_Length. { Length of returned string } Return Value: function returns string OUT_string.

RW_ParseString

clip_image003[4] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns the string of the specified line when parsing the supplied string field into lines of a specified length. Uses the Dexterity Field_ParseText() function. Prerequisites: none Parameters: in string IN_string. { String Field to Parse } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_Pos

clip_image003[5] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a numeric value indicating the starting position of a string within a string. Uses the Dexterity pos() function. Prerequisites: none Parameters: in string IN_target. { The string you want to search in } in string IN_search. { The string you want to search for } in integer IN_start. { The position at which the search will start in the target string } Return Value: function returns integer OUT_pos.

RW_Proper

clip_image003[6] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a string in which all the alphabetic characters of a specified string have been converted to Proper or Title case. This means that the first letter of each word will be uppercase and the rest of the letters will be lowercase. Prerequisites: none Parameters: in string IN_String. Return Value: function returns string OUT_string.

RW_Replace

clip_image003[7] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Allows you to overwrite characters in a string by replacing existing characters in the string. Uses the Dexterity replace() function. Prerequisites: none Parameters: in string IN_target. { A string or string field containing the characters you wish to replace } in string IN_replacement. { A string you wish to replace characters in target with } in integer IN_start. { The position in the target string where you want to put the replacement characters } in integer IN_length. { The number of characters from the replacement string you want to replace characters in the target string with } Return Value: function returns string OUT_string.

RW_Right

clip_image003[8]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns the right hand specified number of characters from the string supplied. Prerequisites: none Parameters: in string IN_String. in integer IN_Length. Return Value: function returns string OUT_string.

RW_Strip

clip_image003[9] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a string based on the supplied string with all occurrences of the specified character stripped out. Prerequisites: none Parameters: in string IN_String. in string IN_Strip. Return Value: function returns string OUT_string.

RW_Substitute

clip_image003[10] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Substitutes specified values for replacement markers in the specified string. Function handles up to 5 Substitutions (ie. markers %1 through to %5. Uses the Dexterity substitute command. Can be used with the RW_GetMsg() function. Prerequisites: none Parameters: in string IN_String. in string IN_Sub1. in string IN_Sub2. in string IN_Sub3. in string IN_Sub4. in string IN_Sub5. Return Value: function returns string OUT_string.

RW_Substring

clip_image003[11] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a portion of a specified string field. Uses the Dexterity substring() function. Prerequisites: none Parameters: in string IN_String. { A string value containing the substring you want } in integer IN_Start. { An integer indicating the starting position to use } in integer IN_Length. { An integer indicating the number of characters you want to return } Return Value: function returns string OUT_string.

RW_Token

clip_image003[12] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns the string value in the specified position from the supplied string using the token character as a separator. For example: RW_Token(“One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten”,”|”, 6) will return the string “Six”. Prerequisites: none Parameters: in string IN_string. { String containing values separated by token character } in string IN_token. { Token character used in String } in integer IN_position. { Position of value to return } Return Value: function returns string OUT_string.

RW_Trim

clip_image003[13] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Remove a specified string from the beginning, end or both the beginning and end of another specified string. Uses the Dexterity trim() function. IN_Direction should use the following values:- 1 = LEADING 2 = TRAILING 3 = LEADING+TRAILING Prerequisites: none Parameters: in string IN_String. { String to trim } in integer IN_Direction. { Direction to trim } in string IN_Trim. { Characters to trim } Return Value: function returns string OUT_string.

RW_Upper

clip_image003[14] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: String & Text Manipulation Description: Returns a string in which all the alphabetic characters of a specified string have been converted to upper case. Uses the Dexterity upper() function. Prerequisites: none Parameters: in string IN_String. Return Value: function returns string OUT_string.

Date & Time RW Functions

RW_AddMonth
clip_image003[15]
  Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Allows you to adjust the month portion of a date by a specified amount. Uses the Dexterity addmonth() function. Prerequisites: none Parameters: in date IN_date. in integer IN_months. Return Value: function returns date OUT_date.

RW_DateToString

clip_image004
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Returns the specified date as specified by the format string supplied. For example: RW_DateToString(RW_MakeDate(1,1,2001), "dddd, DD-mmmm-YYYY") returns “Monday, 01-January-2001” ddd = day of week as 3 letters dddd = day of week in full N = day of year NN = day of year (padded) D = day of month DD = day of month (padded) M = month of year MM = month of year (padded) mmm = month of year as 3 letters mmmm = month of year in full YY = year of date (2 digits) YYYY = year of date (4 digits) Prerequisites: none Parameters: in date IN_Date. in string IN_Format. Return Value: function returns string OUT_String.

RW_DiffDate

clip_image004[1] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Returns the long integer difference between two date values supplied. Prerequisites: none Parameters: in date IN_start. in date IN_end. Return Value: function returns long OUT_diff.

RW_EndOfMonth

clip_image004[2] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Returns the date of the last day of the month for a specified date. Uses the Dexterity eom() function. Prerequisites: none Parameters: in date IN_date. Return Value: function returns date OUT_date.

RW_MakeDate

clip_image004[3] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Creates a date value from three integer values. Uses the Dexterity mkdate() function. Prerequisites: none Parameters: in integer IN_month. in integer IN_day. in integer IN_year. Return Value: function returns date OUT_date.

RW_MakeTime

clip_image004[4] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Creates a time value as a string from three integer values. Uses the Dexterity mktime() function. Prerequisites: none Parameters: in integer IN_hour. in integer IN_minute. in integer IN_second. Return Value: function returns string OUT_time.

RW_SetDate

clip_image004[5] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Creates a date value or modifies a date value from three integer values. Uses the Dexterity setdate() function. Prerequisites: none Parameters: in date IN_date. in integer IN_month. in integer IN_day. in integer IN_year. Return Value: function returns date OUT_date.

RW_SysDate

clip_image004[6] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Returns current System Date. Uses the Dexterity sysdate() function. Prerequisites: none Parameters: in integer IN_mode. { non-zero = SQL Server Date } Return Value: function returns date OUT_date.

RW_SysTime

clip_image004[7] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Date & Time Manipulation Description: Returns current System Time as a string. Uses the Dexterity systime() function. Prerequisites: none Parameters: in integer IN_mode. { non-zero = SQL Server Time } Return Value: function returns string OUT_time.

Data Functions

RW_CityStateZip
clip_image004[8] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Used from reports to concatenate the City, State and Zip Code into a string value using the trim function to remove trailing spaces. Prerequisites: none Parameters: in string inCity; in string inState; in string inZipCode; Return Value: function returns string outCityStateZip. 

RW_CoAddrIDInfo

clip_image004[9]
 Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns a string field from the Company Address table for the given Address ID. Leave IN_Address_Code blank for company default location. IN_Field should use the following values:- 1 = Contact Name 2 = Address 1 3 = Address 2 4 = Address 3 5 = City 6 = State 7 = Zip 8 = Country 9 = Phone 1 10 = Phone 2 11 = Phone 3 12 = Fax 13 = Country Code 14 = County 15 = Address Name 16 = Address ID Prerequisites: none Parameters: in 'Address Code' IN_Address_Code. { Leave Blank for Default } in integer IN_Field. { Field to Return } Return Value: function returns string OUT_String.

RW_GetCommentText

clip_image004[10] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns Comment Text field as strings of given length for the specified Comment ID. Prerequisites: none Parameters: in string IN_CommentID. { Comment ID of Comment } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_GetInternetInfo

clip_image004[11] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns Additional Internet Information fields 1 to 8 for the specified Master Type, Master ID and optional Address ID. Passing in the value of 9 will retrieve the Messenger Address value. IN_MasterType should use the following values:- CMP = CO_INETADDRS_COMPANY VEN = CO_INETADDRS_VENDOR CUS = CO_INETADDRS_CUSTOMER EMP = CO_INETADDRS_EMPLOYEE ITM = CO_INETADDRS_ITEM SLP = CO_INETADDRS_SALESPERSON IN_field must have a value between 1 and 9. Prerequisites: none Parameters: in string IN_MasterType. in string IN_MasterID. in string IN_AddressID. in integer IN_field. Return Value: function returns string OUT_string.

RW_GetInternetPrompt

clip_image004[12] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns Additional Internet Information prompts 1 to 8 for the current company. IN_field must have a value between 1 and 8. Prerequisites: none Parameters: in integer IN_field. Return Value: function returns string OUT_string.

RW_GetInternetText

clip_image004[13] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns Additional Internet Information Text field as strings of given length for the specified Master Type, Master ID and optional AddressID. IN_MasterType should use the following values:- CMP = CO_INETADDRS_COMPANY VEN = CO_INETADDRS_VENDOR CUS = CO_INETADDRS_CUSTOMER EMP = CO_INETADDRS_EMPLOYEE ITM = CO_INETADDRS_ITEM SLP = CO_INETADDRS_SALESPERSON Prerequisites: none Parameters: in string IN_MasterType. { MasterType Code } in string IN_MasterID. { Master ID } in string IN_AddressID. { Optional Address ID } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } optional in integer IN_field {Text field desired, 10(to), 11(cc) 12(bcc) defaults to INetInfo} Return Value: function returns string OUT_string.

RW_GetMsg

clip_image004[14] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: This function will receive a integer value and return the string of the getmsg Prerequisites: none Parameters: in integer imsg; Return Value: function returns string smsg;

RW_GetMsgDisplay

clip_image004[15] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Decomposes a GetMsg into two strings to be displayed on a report. The first 80 chars are returned in sFront with the next 80 chars returned in sTail. The returned values are then passed in as legends. Prerequisites: none Parameters: in integer nGetMsg; out string sFront; out string sTail;

RW_GetNoteText

clip_image004[16] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns Note Text field as strings of given length for the specified Note Index. Prerequisites: none Parameters: in currency IN_NoteIndex. { Note Index of Note } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_GetPOPTypeString

clip_image004[17] 
Module: Distribution Series: Purchasing Script type: Global function Form (If a form global): Category: Data Retrieval Description: Takes the POP Type field (integer) and outputs the POP Type string. POP_DOCTYPE_SHIPMENT POP_DOCTYPE_INVOICE POP_DOCTYPE_SHIPMENT_INVOICE POP_DOCTYPE_RETURN POP_DOCTYPE_RETURNCREDIT POP_DOCTYPE_INVENTORYRETURN POP_DOCTYPE_INVENTORYRETURNCREDIT Prerequisites: none Parameters: in 'POP Type' nPOPType; Return Value: function returns string sPOPType;

RW_GetPOTypeString

clip_image004[18] 
Module: Distribution Series: Purchasing Script type: Global function Form (If a form global): Category: Data Retrieval Description: Takes the PO Type field (integer) and outputs the PO Type string. POP_DOCTYPE_PO POP_DOCTYPE_DROPSHIP POP_DOCTYPE_BLANKET POP_DOCTYPE_BLANKET_DROPSHIP Prerequisites: none Parameters: in 'PO Type' nPOType; Return Value: function returns string sPOType;

RW_GetSOPTypeString

clip_image004[19] 
Module: Distribution Series: Sales Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns the SOP type as a string value SOP_QUOTE SOP_ORDER SOP_INVOICE SOP_RETURN SOP_BACK_ORDER SOP_FULFILLMENT_ORDER Prerequisites: none Parameters: in integer nSOPType; Return Value: function returns string rw_GetSOPTypeString;

RW_GetWFApprovalStatusStr

clip_image004[20] 
Module: System Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns the Workflow Approval Status as a string value WF_APPROVAL_STATUS_NOTSUBMITTED WF_APPROVAL_STATUS_SUBMITTED WF_APPROVAL_STATUS_NOAPPROVALNEEDED WF_APPROVAL_STATUS_PENDINGAPPROVAL WF_APPROVAL_STATUS_PENDINGCHANGES WF_APPROVAL_STATUS_APPROVED WF_APPROVAL_STATUS_REJECTED WF_APPROVAL_STATUS_WORKFLOWENDED WF_APPROVAL_STATUS_NOTACTIVATED WF_APPROVAL_STATUS_DEACTIVATED Prerequisites: none Parameters: in 'Workflow Approval Status' nWrkflwApprvlStatus; Return Value: function returns string rw_GetWFApprovalStatusStr;

RW_GetWFPriorityStr

clip_image005 
Module: System Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns the Workflow Approval Status as a string value WF_PRIORITY_LOW WF_PRIORITY_NORMAL WF_PRIORITY_HIGH Prerequisites: none Parameters: in 'Workflow Priority' nWrkflwPriority; Return Value: function returns string rw_GetWFPriorityStr;

RW_PMAddrIDInfo

clip_image005[1] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns a string field from the Vendor Master Address table for the given Vendor ID and Address ID. IN_Field should use the following values:- 1 = Contact Name 2 = Address 1 3 = Address 2 4 = Address 3 5 = City 6 = State 7 = Zip 8 = Country 9 = Phone 1 10 = Phone 2 11 = Phone 3 12 = Fax 13 = Country Code Prerequisites: none Parameters: in 'Vendor ID' IN_Vendor_ID. in 'Address Code' IN_Address_Code. in integer IN_Field. Return Value: function returns string OUT_String.

RW_POPHDRCommentText

clip_image005[2] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns POP Header Comment Text field as strings of given length for the specified Document. Prerequisites: none Parameters: in string IN_Number. { POP Number of Document } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_POPLINECommentText

clip_image005[3] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns POP Line Comment Text field as strings of given length for the specified Line. Prerequisites: none Parameters: in integer IN_Type. { POP Type of Document } in string IN_Number. { POP Number of Document } in long IN_Ord. { Ord Number of Line } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_RMAddrIDInfo

clip_image005[4] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns a string field from the Customer Master Address table for the given Customer ID and Address ID. IN_Field should use the following values:- 1 = Contact Name 2 = Address 1 3 = Address 2 4 = Address 3 5 = City 6 = State 7 = Zip 8 = Country 9 = Phone 1 10 = Phone 2 11 = Phone 3 12 = Fax 13 = Country Code Prerequisites: none Parameters: in 'Customer Number' IN_Customer_Number. in 'Address Code' IN_Address_Code. in integer IN_Field. Return Value: function returns string OUT_String.

RW_SOPHDRCommentText

clip_image005[5] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns SOP Header Comment Text field as strings of given length for the specified Document. Prerequisites: none Parameters: in integer IN_Type. { SOP Type of Document } in string IN_Number. { SOP Number of Document } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

RW_SOPLINECommentText

clip_image005[6] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns SOP Line Comment Text field as strings of given length for the specified Line. Prerequisites: none Parameters: in integer IN_Type. { SOP Type of Document } in string IN_Number. { SOP Number of Document } in long IN_LineItem. { Line Item Sequence of Line } in long IN_Component. { Component Sequence of Line } in integer IN_characters. { Number of Characters per Line } in integer IN_line. { Line Number to Return } Return Value: function returns string OUT_string.

Multicurrency Functions

RW_ConvertToReportingCurrency

clip_image005[7] 
Module: System Manager Series: System Script type: Global function Form (If a form global): Category: Data Retrieval Description: Used by Report Writer to convert functional amounts to reporting amounts given what the currency is to be printed in, the rate calculation method, and the reporting exchange rate. Prerequisites: none Parameters: in 'Print Currency In' nPrintCurrencyIn; in currency cyFunctionalAmt; in 'Rate Calculation Method' nRateCalcMethod; in 'Reporting Exchange Rate' cyReptExchRate; Return Value: function returns currency cyReportingAmt;

RW_CurrencyIndex

clip_image005[8] 
Module: System Manager Series: Financial Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns the Currency Index for a report by calling the GetCurrencyIndex Prerequisites: none Parameters: In 'Currency ID' IN_CurrencyID; Return Value: function returns integer 'Currency Index';

RW_Currency_GetIndexForView

clip_image005[9] 
Module: Distribution Series: Purchasing Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns the Currency Index to use for Currency amounts for reports dependant on the View selected – Functional, Originating or Reporting. Prerequisites: none Parameters: in integer nCurrencyView; { View selected: CURRENCYVIEW_FUNCTIONAL, CURRENCYVIEW_ORIGINATING, CURRENCYVIEW_REPORTING} In integer nCurrencyIndex; { Document's Currency Index } Return Value: function returns integer rw_Currency_GetIndexForView;

RW_DecCurr

clip_image005[10] 
Module: Distribution Series: Inventory Script type: Global function Form (If a form global): Category: Data Retrieval Description: Given a specific number of decimal places, the multiple format selector value needed to display a currency value is returned. Prerequisites: none Parameters: in integer iDecCurr; Return Value: function returns integer DecCurr;

RW_DecQty

clip_image005[11]
  Module: Distribution Series: Inventory Script type: Global function Form (If a form global): Category: Data Retrieval Description: Given a specific number of decimal places, the multiple format selector value needed to display a quantity value is returned. Prerequisites: none Parameters: in integer iDecQty; Return Value: function returns integer DecQty;

RW_FormatCurrencyToString

clip_image005[12] 
Module: Distribution Series: Purchasing Script type: Global function Form (If a form global): Category: Data Retrieval Description: Formats the currency amount to the specified currency index using the format() function and returns it as a string value. If the currency index is not specified, it will be formatted to the functional currency. Prerequisites: none Parameters: in integer nCurrencyIndex; in currency cyCurrencyValue; Return Value: function returns string rw_FormatCurrencyToString;  

RW_MCTransaction

clip_image005[13]
  Module: System Manager Series: Financial Script type: Global function Form (If a form global): Category: Data Retrieval Description: Returns : True for MCUR registered & Include MC Info is marked False for MCUR registered & Include MC Info is not marked False for MCUR is not registered Prerequisites: none Parameters: in integer nControlType; in string sTransactionCurrencyID; in string sReceiptCurrensyID; Return Value: function returns boolean fReturn; Last Modified: 14-Sep-2005
Enjoy!
Leslie