You need to sign in to do that
Don't have an account?
chrismclaren
</script>
S-Control to create new opportunity from product and delete product
I am trying to create an s-control that, from an opportunity product, will create a new opportunity and then delete the opportunity product. I have managed to get it to create a new opportunity but I am having trouble getting ti to delete the product,
This is the code I currently have :-
<script type="text/javascript">
window.parent.location.href="{!URLFOR($Action.Opportunity.New
,Opportunity.Id, [opp3=Opportunity.Name , opp7= OpportunityLineItem.TotalPrice ])};"
,Opportunity.Id, [opp3=Opportunity.Name , opp7= OpportunityLineItem.TotalPrice ])};"
({!$Action.OpportunityLineItem.Delete}), {!$ObjectType.OpportunityLineItem})
</script>
Unfortunately this currently bring up nothing, but if I take away " ({!$Action.OpportunityLineItem.Delete}), {!$ObjectType.OpportunityLineItem})" it bring up the new opportunity page but obviously does not delete the product. Any suggestions???
you will probably have to use two scontrols , one to create the opp, one to delete the product.
or you can use an scontrol that takes advantage of the API to create the opp, delete the product , then "goto" the newly created opp (do this last.)