Hi Jacob,
There are 2 ways to do what you are asking. You can use the create short method url action from within method itself. (You can read up on it at http://www.methodintegration.com/method/kb.aspx?folder=methodcrm&article=Create-Short-Method-URL&id=165)
The second way is using the API, I will provide examples below. My examples are in C# and assume you have already added the appropriate service references in your code. I also replaced companyaccount, login, and password with XXX, YYY, and ZZZ respectively. You should be able to tweak them to meet your needs
Using MethodAPIGetScreenURLV2
Let's assume you have a tab called customers, with a tablink called New Customers.
string ResponseFromAPI = MethodAPI.MethodAPIGetScreenURLV2(XXX, YYY, ZZZ, "", "New Customer", "Customers", "");
if you look at ResponseFromAPI it is actually an xml string like the following
<?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Success" URL = "http://link.methodintegration.com/XXXXX" ></MethodAPI>
You can then parse the xml grab the url and send it to your users. When the screen loads they will be at the new customer screen
Using MethodAPIGetScreenURLV3
Continuing the example from above, you have more parameters on the function signature. The two of interest that must be populated in this case are DomainLinkOrMIurl(with the value of 'link' or 'miurl') and isportal(true or false). A parameter you may or may not want to set is RecordID, this will take the user to a specific record when the screen loads. In this case we left it as an empty string
string ResponseFromAPI = MethodAPI.MethodAPIGetScreenURLV3(XXX, YYY, ZZZ, "", "link", "Customers", "New Customer", "", "", "", false, "");
if you look at ResponseFromAPI it is actually an xml string like the following
<?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Success" URL = "http://link.methodintegration.com/XXXXX" ></MethodAPI>
You can then parse the xml grab the url and send it to your users. When the screen loads they will be at the new customer screen
Using MethodAPIGetScreenURLV4
Still continuing our customer example from above let's actually set a customer recordid this time. Let's also assume you have a screen called edit customer
string ResponseFromAPI =MethodAPI.MethodAPIGetScreenURLV4(XXX, YYY, ZZZ, "", "link", "Customers", "Edit Customer", "68", "", "", false, "", "");
if you look at ResponseFromAPI it is actually an xml string like the following
<?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Success" URL = "http://link.methodintegration.com/XXXXX" ></MethodAPI>
You can then parse the xml grab the url and send it to your users, and this time when the screen loads it will be prepopulated with customer 68.
Dave