wsiSMSLocation
Table Name: SV00200
Other tables affected: RM00102
Other stored procedures called: taCreateCustomerAddress
Description:
This procedure allows the insert/update of records into the Service Location table. A customer number and address code can be specified and the taCreateCustomerAddress procedure will be called to populate the RM Address Code Table (RM00102)
Element Name | Data Type | Length | Required | Default | Description |
---|---|---|---|---|---|
@I_vCustomerNumber | char | 15 | Yes |
| Validated in SV00100 and RM00101, convert to upper case |
@I_vAddressCode | char | 15 | Yes |
| Converted to upper case. , Not required if update., Created or updated in RM00102 |
@I_vLocationName | char | 31 | Yes |
| Not required on updates. |
@I_vWennsoftAffiliate | char | 15 | Yes |
| Existing Affiliate in sv00015. Only required if 'Use Global Record Identification Records' is marked on in Service. Not Required on Updates |
@I_vWennsoftRegion | char | 15 | Yes |
| Existing Region in sv00015. Only required if 'Use Global Record Identification Records' is marked on in Service. Not Required on Updates |
@I_vWennsoftBranch | char | 15 | Yes |
| Existing Branch in sv00015. Only required if 'Use Global Record Identification Records' is marked on in Service. Not Required on Updates |
@I_vLaborGroupName | char | 15 | Yes |
| Existing Labor Rate Group in SV000122 or SV000123 (if "Use Overhead Amounts From Job Cost" Service_Option_Box_35 is marked in sv00196 SV_Setup2_MSTR). |
Convert to uppercase |
|
|
|
|
|
Not required on update | if sv00196.Record = 1 and sv00196.Service_Option_Box_35 = 0 then check SV000122.Labor_Group_Name if sv00196.Record = 1 and sv00196.Service_Option_Box_35 = 1 then check SV000123.Labor_Group_Name |
|
|
|
|
@I_vPricingMatrixName | char | 15 | Yes |
| Existing PriceMatrix in SV00143, Convert to upper case, Not required on update SV00143.Pricing_Matrix_Name |
@I_vUserID | char | 15 | No |
| If empty or null a truncated SQL Server login is used |
@I_vTechnicianID | char | 15 | No |
| Technician ID in SV_Lookup_Technician_MSTR |
@I_vTechnicianTeam | char | 15 | No |
|
|
@I_vCustomerName | char | 65 | No |
|
|
@I_vPhone1 | char | 21 | No | ########### | Defaults to zero. |
Is right padded to fill with zeros |
|
|
|
|
|
Not formatted (i.e. 262-821-4100 Ext: 3619 would be 26282141003619) Length can't be greater than 14 |
|
|
|
|
|
@I_vMapGrid | char | 15 | No |
|
|
@I_vFax | char | 21 | No | ########### | Defaults to zero. |
Is right padded to fill with zeros |
|
|
|
|
|
Not formatted (i.e. 262-821-4100 Ext: 3619 would be 26282141003619) Length can't be greater than 14 |
|
|
|
|
|
@I_vServiceArea | char | 15 | No |
|
|
|
|
|
|
|
|
@I_vState | char | 29 | No |
|
|
@I_vZip | char | 11 | No |
|
|
@I_vCountry | char | 61 | No |
|
|
@I_vPhone2 | char | 21 | No | ########### | Defaults to zero. |
Is right padded to fill with zeros |
|
|
|
|
|
Not formatted (i.e. 262-821-4100 Ext: 3619 would be 26282141003619) Length can't be greater than 14 |
|
|
|
|
|
@I_vPhone3 | char | 21 | No | ########### | Defaults to zero. |
Is right padded to fill with zeros |
|
|
|
|
|
Not formatted (i.e. 262-821-4100 Ext: 3619 would be 26282141003619) Length can't be greater than 14 |
|
|
|
|
|
@I_vAddress1 | char | 61 | No |
|
|
@I_vAddress2 | char | 61 | No |
|
|
@I_vAddress3 | char | 61 | No |
|
|
@I_vCity | char | 35 | No |
|
|
@I_vSalespersonID | char | 15 | No |
| Existing SalespersonID in RM00301 |
@I_vTechnician | char | 11 | No |
|
|
@I_vTechnician2 | char | 11 | No |
|
|
@I_vTechnicianID2 | char | 15 | No |
|
|
@I_vContactPerson | char | 61 | No |
|
|
@I_vContactName | char | 15 | No |
|
|
@I_vHoldTransactionID | int | 0 | No |
|
|
@I_vSafetyFlag | tinyint | 0 | No |
|
|
@I_vBlanketPOCheckbox | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vBlanketPONumber | char | 17 | No |
| Not validated. |
@I_vOriginalBlanketPOAmount | numeric | 19;5 | No |
| >= 0. Not available on updates. Typically zero. |
@I_vBlanketPOAmountSpent | numeric | 19;5 | No |
| >= 0. Not available on updates. Typically zero. |
@I_vBlanketPOAmountRemainin | numeric | 19;5 | No |
| > = 0. Not available on updates. Typically zero. |
@I_vBlanketPOExpirationDate | datetime | 0 | No | 1/1/1900' | valid dex date |
@I_vUserDefine1a | char | 31 | No |
|
|
@I_vUserDefine2a | char | 31 | No |
|
|
@I_vUserDefine3a | char | 31 | No |
|
|
@I_vUserDefine4a | char | 31 | No |
|
|
@I_vUserDefine5a | char | 31 | No |
|
|
@I_vUserDefine6a | char | 31 | No |
|
|
@I_vPORequired | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vOutofServiceFlag | tinyint | 0 | No |
|
|
@I_vAlarmFlag | tinyint | 0 | No |
|
|
@I_vSupervisorsID | char | 15 | No |
|
|
@I_vSupervisorsHoldFlag | tinyint | 0 | No |
|
|
@I_vCorporateCustomerNumber | char | 15 | No |
| Only available if 'Use Corporate Customer ID' option is marked in Service Setup - Service Options. |
Converted to upper case. |
|
|
|
|
|
@I_vDivisions | char | 15 | No |
| A valid Division in SV_Division_MSTR |
@I_vTravelRateName | char | 15 | No |
|
|
@I_vSVServiceLevelID | char | 11 | No |
| A valid SV Service Level ID in SV_Service_Level_MSTR |
@I_vBillCustomerNumber | char | 15 | No |
| A valid customer in the RM00101 |
@I_vBillAddressCode | char | 15 | No |
| A valid bill to customer and bill to address code in SV00200 |
@I_vLongitude | numeric | 19;5 | No |
|
|
@I_vLatitude | numeric | 19;5 | No |
|
|
@I_vPriorityofCall | char | 1 | No |
|
|
@I_vServiceUserDefine1 | char | 21 | No |
|
|
@I_vServiceUserDefine2 | char | 21 | No |
|
|
@I_vServiceUserDefine3 | char | 31 | No |
|
|
@I_vServiceUserDefine4 | char | 31 | No |
|
|
@I_vServiceUserDefine5 | int | 0 | No |
|
|
@I_vServiceUserDefine6 | int | 0 | No |
|
|
@I_vServiceUserDefine7 | int | 0 | No |
|
|
@I_vServiceUserDefine8 | int | 0 | No |
|
|
@I_vServiceUserDefine9 | datetime | 0 | No | 1/1/1900' | valid dex date |
@I_vServiceUserDefine10 | datetime | 0 | No | 1/1/1900' | valid dex date |
@I_vServiceUserDefine11 | datetime | 0 | No | 1/1/1900' | valid dex date |
@I_vServiceUserDefine12 | datetime | 0 | No | 1/1/1900' | valid dex date |
@I_vServiceUserDefine18 | tinyint | 0 | No |
| bool |
@I_vServiceUserDefine19 | tinyint | 0 | No |
| bool |
@I_vServiceUserDefine20 | tinyint | 0 | No |
| bool |
@I_vServiceUserDefine21 | tinyint | 0 | No |
| bool |
@I_vServiceUserDefine22 | numeric | 19;5 | No |
|
|
@I_vServiceUserDefine23 | numeric | 19;5 | No |
|
|
@I_vServiceUserDefine24 | numeric | 19;5 | No |
|
|
@I_vServiceUserDefine25 | numeric | 19;5 | No |
|
|
@I_vTimeZone | char | 3 | No |
|
|
@I_vTimeZoneTag | char | 5 | No |
| Existing time zone tag in SV00045 |
@I_vSVLanguageID | smallint | 0 | No |
| Defaults to zero. |
@I_vBaseCurrencyID | char | 15 | No |
|
|
@I_vBillingCurrencyID | char | 15 | No |
|
|
@I_vLocalCurrencyID | char | 15 | No |
|
|
@I_vCivic1Alpha | char | 5 | No |
|
|
@I_vCivic1Num | smallint | 0 | No |
|
|
@I_vCivic1Dir | char | 5 | No |
|
|
@I_vCivic2Alpha | char | 5 | No |
|
|
@I_vCivic2Num | smallint | 0 | No |
|
|
@I_vCivic2Dir | char | 5 | No |
|
|
@I_vStreetName | char | 31 | No |
|
|
@I_vStreetType | char | 7 | No |
|
|
@I_vPostDir | char | 5 | No |
|
|
@I_vSecAddType1 | char | 13 | No |
|
|
@I_vSecAddNum1 | smallint | 0 | No |
|
|
@I_vSecAddAlpha1 | char | 5 | No |
|
|
@I_vSecAddType2 | char | 13 | No |
|
|
@I_vSecAddNum2 | smallint | 0 | No |
|
|
@I_vSecAddAlpha2 | char | 5 | No |
|
|
@I_vUseTaxSchedule | char | 15 | No |
|
|
@I_vRateClass | char | 15 | No |
|
|
@I_vStateCode | char | 3 | No |
|
|
@I_vSutaState | char | 3 | No |
|
|
@I_vLocalTax | char | 7 | No |
|
|
@I_vWSReservedCB1 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB2 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB3 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB4 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB5 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB6 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB7 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB8 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB9 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedCB10 | tinyint | 0 | No |
| Bool. Defaults to zero. |
@I_vWSReservedSTR1 | char | 11 | No |
|
|
@I_vWSReservedSTR2 | char | 11 | No |
|
|
@I_vDEXROWID | int | 0 | No |
|
|
@I_vUpdateIfExists | tinyint | 3 | Yes | 1 | It can only be 0 for don't update or 1 update if exists |
@I_vWennSoftTablesOnly | tinyint | 3 | Yes | 0 | Defaults to false. |
@I_vOnlyValidate | tinyint | 3 | Yes | 0 | Defaults to false |
@I_vUSRDEFND1 | char | 50 | No |
|
|
@I_vUSRDEFND2 | char | 50 | No |
|
|
@I_vUSRDEFND3 | char | 50 | No |
|
|
@I_vUSRDEFND4 | varchar | 8000 | No |
|
|
@I_vUSRDEFND5 | varchar | 8000 | No |
|
|
@I_vReturnErrorText | tinyint | 3 | No | 1 | Defaults to false |
@O_iErrorState | int | 10 | No | 0 |
|
@oErrString | varchar | 255 | No |
|
|
Error Codes
Error Code | Description |
---|---|
51102 | The customer is empty |
51000 | Customer Number does not exist in Service |
51001 | Customer Number does not exist in Microsoft Business Solutions |
52189 | Address Code field is empty |
52177 | Affiliate, region and branch are not valid |
52190 | Location Name field is empty |
52242 | Labor Rate Group field is empty |
52198 | Labor Rate Group is invalid. |
52263 | Price Matrix field is empty. |
52199 | Price Matrix is invalid |
52191 | Phone 1 field contains an invalid value (length > 14). |
52192 | Phone 2 field contains an invalid value (length > 14). |
52193 | Phone 3 field contains an invalid value (length > 14). |
52280 | Fax field contains an invalid value (length > 14). |
52194 | Technician ID is invalid |
52195 | Corporate Customer Number field contains data, but the Use Corporate Customer ID option is not marked in setup. |
52197 | Salesperson ID is invalid |
52102 | Division does not exist |
52060 | Service Level ID does not exist |
52157 | Bill to customer number does not exist |
52296 | The Bill To Address does not exists for the Bill To Customer in RM00102 (RM_Customer_MSTR_ADDR). |
52200 | Blanket PO Check box is invalid. |
52241 | Original Blanket PO Amount is invalid. |
52201 | Blanket PO Amount Spent is invalid. |
52202 | Blanket PO Amount Remaining is invalid. |
52204 | Time Zone Tag is invalid. |