You need to sign in to do that
Don't have an account?
Guru Vemuru 1
I want to restrict one order for quote?
Hello I am Guru , a Freasher..I want to restrict creation of order from quote if a quote name is already present in order ....I mean to avoid multiple order for same quote..Please help me out
These is my code .Please Help me.
trigger RestrictMultipleOrder on Order (before insert)
{
List<Order> ord=[Select Quote__c from Order];
For(Order o:Trigger.New)
{
if(o.Quote__c==ord)
{
o.addError('Duplicate Order cannot be generated');
}
}
}
These is my code .Please Help me.
trigger RestrictMultipleOrder on Order (before insert)
{
List<Order> ord=[Select Quote__c from Order];
For(Order o:Trigger.New)
{
if(o.Quote__c==ord)
{
o.addError('Duplicate Order cannot be generated');
}
}
}
Hi,
If the above solution works for you then please mark it as the best answer
All Answers
Please try the above trigger and please modify the API name accordingly.
Hope the given solution works for you!
If not please let me know.
Hi,
If the above solution works for you then please mark it as the best answer