You need to sign in to do that
Don't have an account?

How to skip Record Type selection when calling a prepopulated edit page.
Hello, I have the following problem: I made an S-Control which is triggered by a button in custom object "Repair" and redirects to "new opportunity" edit screen with some values prepopulated from the Repair. However we use record types in opportunities and each time I have to select the record type first before the edit page appears (despite all opportunities created from Repairs should have the same record type). Is it possible to pass the record type in the URL, so the manual record type selection will be skipped? Here is the code:
Code:
var newUrl = "{!URLFOR($Action.Opportunity.New,null,[saveURL=URLFOR($SControl.Update_Repair, Repair__c.Id), retURL = $Request.retURL] ,true)}"; newUrl = newUrl + "&opp3=" + "Repair for " + {!Repair__c.Name} + "&00N200000003EQc=" + 'Repair' + "&opp4=" + "{!Repair__c.Account__c}"; window.parent.location.replace(newUrl);
var newUrl = "/006/e?retURL=%2F{!Repair__c.Id}&opp3=Repair for {!Repair__c.Name}&00N200000003EQc=Repair&opp4={!Repair__c.Account__c}&RecordType="+someRecordTypeVar;
That should take care of what you need. You'll need to do a query to find the record type by name, and get the Id.
Did this work for anyone?
Cool_D