• Mark Fazekas
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello all!

I am collecting some ideas and where I am going wrong.
My project is about a company who sells product with the help of sales people.
Whenever i create a product move, i want to trigger the creation of a delivery, and the delivery fires the creation of a feedback.
should i use the master detail relationship each time, and use the workflow triggers?
in this case i think i have to give a delivery at the creation of a product move. (experience)

how should I do it? what is your opinion?
Hello all !
I am new to SFDC, so I could use some help

I have to custom objects
Product Move and Deliveries
I want a trigger that makes a delivery when I make an order
with the delivery named after my product move
trigger ProductMoveTrigger on Product_Move__c ( after insert) {

    List<Delivery__c> deliveries= new List<Delivery__c>();

    for(Product_Move__c c : Trigger.new)
    {
        Delivery__c d = new Delivery__c();
        d.Name = c.Store__c + c.Product__c;

        deliveries.add(d);
    }

    try {
        insert deliveries;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }   
}

where am I going wrong?

Thanks for the help
Hello all!

I am collecting some ideas and where I am going wrong.
My project is about a company who sells product with the help of sales people.
Whenever i create a product move, i want to trigger the creation of a delivery, and the delivery fires the creation of a feedback.
should i use the master detail relationship each time, and use the workflow triggers?
in this case i think i have to give a delivery at the creation of a product move. (experience)

how should I do it? what is your opinion?
Hello all !
I am new to SFDC, so I could use some help

I have to custom objects
Product Move and Deliveries
I want a trigger that makes a delivery when I make an order
with the delivery named after my product move
trigger ProductMoveTrigger on Product_Move__c ( after insert) {

    List<Delivery__c> deliveries= new List<Delivery__c>();

    for(Product_Move__c c : Trigger.new)
    {
        Delivery__c d = new Delivery__c();
        d.Name = c.Store__c + c.Product__c;

        deliveries.add(d);
    }

    try {
        insert deliveries;
    } catch (system.Dmlexception e) {
        system.debug (e);
    }   
}

where am I going wrong?

Thanks for the help