Sales Order Entry - Rule

I will need to make a rule in the sales order entry. I go on the customization, I create my rule, if availablequantity less than 0 than error. And after I click on update code. After, I will need to execute this rule only if OrderHed.RequestDate - OrderHed.Orderdate < 48 then execute the rule. But I don't know when to write

if OrderHed.RequestDate - OrderHed.Orderdate < 48.... How to write this ?

Thanks.

Vantage 8.03.305k