You need to sign in to do that
Don't have an account?
Rajeev Satapathy
Want to insert list of products from Opportunity to a custom object
I want to insert list of products present on the opportunity to a custom object . Any suggestions/code snipets
So, Fetch tose records byu filtering by opportunity id and then insert with new opportunity Id.
If this solves your problem, kindly mark it as the best answer.
Hit Like, if it saved your work :-)
Regards,
Magulan
http://www.infallibletechie.com
Written a trigger .... wanted to insert a new salesorder record when quote status changes to 'Approved' .. this code is not working
--------------------------------------------------------------------------------------------------------------------
trigger Create on Quote (before update) {
List <SCRB_SalesOrder__c> SOlist = new List<SCRB_SalesOrder__c>();
For(Quote Q : trigger.new)
{
if(Q.Status == 'Approved')
{
SCRB_SalesOrder__c SO = new SCRB_SalesOrder__c();
SO.OpportunityId__c = Q.Opportunity.ID; // Data not getting populated
SO.Amount__c = Q.Opportunity.Amount ; // Data not getting populated
SO.StatusCode__c = 'Billed';
SOlist.add(SO);
}
}
insert SOlist;
}
----------------------------------------------------------------------------------------------------------------------------------