<@UD4BG0THC> The leadsource when coming from the w...
# suitescript
k
@Dominic B The leadsource when coming from the website is usually set as WEB automatically.
d
var record = nlapiCreateRecord('lead'); record.setFieldValue('leadsource','1234');
Not sure which features are involved, but our leadsources are linked to marketing campaigns. This works in suitescript:
k
yeah that would work.
you could set it after lead is created.
d
But in SSP/Commerce API, this doesn't work:
session.registerCustomer(customer);
sorry, meant this:
customer.leadsource = '1234'; session.registerCustomer(customer);
where session is a Commerce API object and customer a standard object with name, etc set
k
I think the commerce api sets the lead source and there is no control.
Best option would be a script that changes it after creation.
or a workflow.
That's what i did before.
d
The commerce API documentation clearly says there's a leadsource input field on registerCustomer, but it won't accept any value I've tried. I've had another instance where support advised that a documented function 'simply didn't work' and was unlikely to change. I suspect the same in this case.
k
what module is register customer in?
d
This is in the standard commerce API ShoppingSession method being used in a custom web application.
k
ah right.
no idea then.
d
thanks for trying anyway!