You need to sign in to do that
Don't have an account?
Chelsea Lukowski
Trigger to create Record when one doesn't exist
I need help creating a trigger, below are the details.
Commission_Program__c that is a Parent Object with Commission_Product__c as the Child
Commission_Product__c is a Parent Object with Commission_Acocunt__c as the Child
When an Titan_Invoice__c is created I need a Commission_Account__c created based on the Titan_Invoice__r.Account__r.Channel_of_Distribution__c matching the Commission_Program__r.Customer_Type__c
and
Commission_Program__r.Active equals True
and
Titan_Invoice__r.Product__c matching the Commission_Product__r.Product_Description__c.
The Commission_Account__c should only be created once and be assiciated with the correct Commission Product. I did create a key field on Commission_Account_c called Account_Column_key__c that is a formula field populating a unique string.
Hopefully this makes since. I need help getting started with creating the Commission_Acocunt__c trigger. We want to track commission based on the invoice that are populating from our ERP system.
Commission_Program__c that is a Parent Object with Commission_Product__c as the Child
Commission_Product__c is a Parent Object with Commission_Acocunt__c as the Child
When an Titan_Invoice__c is created I need a Commission_Account__c created based on the Titan_Invoice__r.Account__r.Channel_of_Distribution__c matching the Commission_Program__r.Customer_Type__c
and
Commission_Program__r.Active equals True
and
Titan_Invoice__r.Product__c matching the Commission_Product__r.Product_Description__c.
The Commission_Account__c should only be created once and be assiciated with the correct Commission Product. I did create a key field on Commission_Account_c called Account_Column_key__c that is a formula field populating a unique string.
Hopefully this makes since. I need help getting started with creating the Commission_Acocunt__c trigger. We want to track commission based on the invoice that are populating from our ERP system.
Please correct syntax error's if any, populate field values of Commision_Account record to be inserted
Let me know, how it works
Let me know, how it works
Have made correction at line 20.
Mark it as BEST ANSWER, if it solves your problem.