문제

I have a custom VisualForce page and would like via javascript to get the url to create a new account/contact.

I know I can do the following in the main apex code but I want to do something dynamically. Create New Account

What is the easiest way to get the url to create a new object via javascript?

도움이 되었습니까?

해결책

You can use this code in Javascript (if your script tag is inside a visualforce page):

var newAccountEndpoint = '{!URLFOR($Action.Account.New)}';
var newOpptyEndpoint = '{!URLFOR($Action.Opportunity.New)}';

Or as I stated before refer to pre made list of standard salesforce object prefixes

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top