Before save trigger: Some sale values not changed

Hi,

Is there a reason why this does not change the current sale to "Sold"?

#setLanguageLevel 3;

EventData eventData;

eventData = getEventData();

eventData.setOutputValue( "SaleStatus", "2" );

RE: Before save trigger: Some sale values not changed

Hi,

Guess the following is obvious for the gurus here, but mentioning it anyways :-)

I just found a field name and value pair that has the intended effect on setOutputValue()"SaleEntity.Rating.Id" = "-2".

Also  the field name "SaleEntity.CompletedBool" has no effect on the completed checkbox on a sale, but the field name and value pair "SaleEntity.Completed" = "Completed" has the intended effect.

So, with these changes it works.

Af: Chris-Anton Eriksen 16. nov 2020

RE: Before save trigger: Some sale values not changed

One field I don't seem to be able to change via setOutputValue() however, is the "Stalled" checkbox in the sale.

I have tried the following statements, none of them seem to check the "Stalled" checkbox:

eventData.setOutputValue( "SaleStalled", "true" );
eventData.setOutputValue( "SaleStatus", "4" );
eventData.setOutputValue( "SaleEntity.Status", "Stalled" );

Is there a way to change the value of the "Stalled" field when using a "before saving sale" trigger?

Af: Chris-Anton Eriksen 16. nov 2020

RE: Before save trigger: Some sale values not changed

Hi Chris-Anton,

One thing I don't see in that list, which I believe should work is :

eventData.setOutputValue( "SaleEntity.Status", "4" );

Hope this helps!

Af: Tony Yates 16. nov 2020

RE: Before save trigger: Some sale values not changed

Hi Tony,

Thanks for you reply.

Unfortunately this does not work either I'm afraid.

Af: Chris-Anton Eriksen 16. nov 2020