Can someone tell me whether this looks all ok?? ``...
# suitescript
k
Can someone tell me whether this looks all ok??
Copy code
function SetSellingPriceDate(scriptContext) {
    		if (context.type === context.UserEventType.CREATE) {
    			var sellingPrice = compRec.getValue({fieldId: 'custrecord_competitor_code_selling_price'});
    			if (!sellingPrice) {
    				var uploadDate = new Date();
    				compRec.setValue({fieldId: 'custrecord_competitor_code_date_price', value: uploadDate});
    			}
    		}
    	}