Fieldpine Logo Documentation Home  

Set Customer Request Event

This event is fired when a customer is being set to a sale and this event is called to either allow this customer to be used or disallow the operation. The event may also return an alternative Customer id to be used replacing the current value being used. It is numbered as event #5004


%ctx.number.1%The customer id being set. This will be a non zero value, but can be a positive or negative number
%data.workingsale.???% (P1857) Allows direct access to all symbols on the current sale that fired this event
%data.workingcustomer.???% (P1857) Allows access to all symbols about the customer record involved in this event

Internal Operation

Please refer to Set Customer Event for detailed operation description.

Return Values

This event can return


	// If requesting cid=17, redirect to cid=201
	if data(workingcustomer.cid) == 17 then exit 201

	// If requesting cid=18, ignore request and leave sale as is
	if data(workingcustomer.cid) == 18 then exit 0

	// Generally allow it
	exit 1