This is really a non-specific question, as I need to know if I am on the right path...?
We want to be able to generate a new Case whenever a sales Order is submitted. The Case needs to be related to the Sales Order.
I have created a custom CRM field for Cases that lists transactions and filters for Sales orders. This field is Parent. This gives me a field on the Case named Sales Order, and subtab on the Sales Order for Cases. This part works fine.
Still a rookie with scripting (still pretty good, so I am told), but I am working on a server side User Event script to generate the case when a sales order is submitted.
Obviously, I need to set the fields on the case, (customer, case type, issue, etc) and will do this based on the Sales Order fields.
1. Will i be able to set the fields based on arguements such as this:
case(somearguement = '2'):
record.setFieldText('title', 'Installation - New Customer')
record.setFieldText('caseInstallMsg','Some text here')
record.setFieldValue('issue', '54' );
case(somearguement = '3'):
record.setFieldText('title', 'Installalation - Customer Upgrade')
record.setFieldText('caseInstallMsg','A different text here')
record.setFieldValue('issue', '55' );
...etc
2. Will this whole concept even work? Can you see any problems with doing this? Anyone else ever had a need/want for this? Am i wasting my time? 3. Will I be able to capture the Sales Order ID after submit to populate the SalesOrder field on the Case? 4. Any best practices, sample scripts, or advice on how to best achieve this needThanks!