asset warranty plus warranty term update

This commit is contained in:
Rene Kaßeböhmer
2025-05-19 15:12:23 +02:00
parent d5742d7d30
commit b675a38baf
31 changed files with 77 additions and 37 deletions

View File

@ -0,0 +1,4 @@
ObjectName,FieldName,RawValue,Value
ServiceContract,Status,Active,Active
ServiceContract,Status,Cancelled,Inactive
ServiceContract,Status,Created,Active
1 ObjectName FieldName RawValue Value
2 ServiceContract Status Active Active
3 ServiceContract Status Cancelled Inactive
4 ServiceContract Status Created Active

View File

@ -0,0 +1 @@
python run_insert.py --context qa2 --csv ServiceContract.csv

View File

@ -0,0 +1,23 @@
{
"allOrNone": true,
"excludeIdsFromCSVFiles": true,
"objects": [
{
"query": "SELECT Id FROM Pricebook2 WHERE Name LIKE 'NL%'",
"operation": "Readonly",
"externalId": "Id",
"master": false
},{
"query": "SELECT Id FROM Account WHERE BillingCountry__c = 'NL'",
"operation": "Readonly",
"externalId": "Id",
"master": false
},{
"query": "SELECT PKey__c,Status,BillingCountryCode,AccountId,Service_Recipient__c,IoT_Registration_Status__c,Pricebook2Id, TemplateId__c FROM ServiceContract",
"operation": "Insert",
"useValuesMapping": true,
"useSourceCSVFile": true,
"master": true
}
]
}

View File

@ -0,0 +1,14 @@
import argparse
from sys import path
path.append('../..')
from utils import bulk_insert_records
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Insert ServiceContract records via Bulk API')
parser.add_argument('--context', type=str, required=True,
help='Salesforce org context (e.g., "qa2", "prod")')
parser.add_argument('--csv', type=str, default='ServiceContract.csv',
help='CSV file to process (default: ServiceContract.csv)')
args = parser.parse_args()
bulk_insert_records(args.context, 'ServiceContract', args.csv)