You need to sign in to do that
Don't have an account?
ZANE PRATER
Dynamically create record name
I have a batch job that looks at when a contract end date is greater than today, that it then creates a new record for renewal. I am trying to dynamically set the name of the record of the original contract and append each time/counter it has been renewed. For example, contract A is past the end date, contract B is created and Contract B name is 'contract A name' + renewed 01. Then if contract B is past the end date, contract C is created and Contract C name is 'contract B name' + renewed 02. Etc...
Every time the batch runs it query all the contracts which as passed the date.
So on your batch code's Execute() method, where the scope is being processed.
Inside the scope, traverse loop where new contracts are being created and add a logic there to name them as
Thanks
Tejender Mohan
2. I got the substring of the paragmt name using IdexOf 'renewed' +8. This will prevent adding renewed to the name when renewed is already in the Name.
So here is the working code. Thanks for giving me the direction.