Created
November 29, 2011 07:09
-
-
Save jimmydivvy/1403817 to your computer and use it in GitHub Desktop.
Auto create sales order
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger Auto_Create_Sale on biz3__Order__c (after insert) { | |
| if( Trigger.new.size() == 1 ){ | |
| biz3__Order__c order = Trigger.new[0]; | |
| biz3__Sales_Order__c so = new biz3__Sales_Order__c(); | |
| so.biz3__Contact__c = order.biz3__Contact__c; | |
| so.biz3__Order__c = order.Id; | |
| insert so; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment