You need to sign in to do that
Don't have an account?
swatijain
Get the URL where the document was just created
Hi,
I want to create folders and upload documents in SalesForce from .net code. I am able to do both.
Next, I want to store information about the user, the created document and the url where he created the document in sql server.
As soon as I create a document using - SFEnterpriseWSDL.SaveResult[] results = binding.create(sdocObj), I get back results.
But, I can not get the URL where the document was created using this. Any idea how can I get this information back.
Swati
Figured the solution ---get the url for the tab documents and attach folder id ....
//Get tab url
string url = "";
SFEnterpriseWSDL.DescribeTabSetResult[] dtsrs = binding.describeTabs();
for (int y = 0; y < dtsrs.Length; y++)
{
SFEnterpriseWSDL.DescribeTabSetResult dtsr = dtsrs[y];
DescribeTab[] tabs = dtsr.tabs;
for (int j = 0; j<tabs.Length; j++)
{
SFEnterpriseWSDL.DescribeTab tab = tabs[j];
if (tab.label.ToString() =="Documents")
url = tab.url;
}
}
//remove the last /0 from url and add folder id
int iLastIndexUrl = url.LastIndexOf("/");
url = url.Substring(0, iLastIndexUrl);
string concatfolderid = folderId.Substring(0, folderId.Length - 3);
url = url + "?fcf=" + concatfolderid;
All Answers
Figured the solution ---get the url for the tab documents and attach folder id ....
//Get tab url
string url = "";
SFEnterpriseWSDL.DescribeTabSetResult[] dtsrs = binding.describeTabs();
for (int y = 0; y < dtsrs.Length; y++)
{
SFEnterpriseWSDL.DescribeTabSetResult dtsr = dtsrs[y];
DescribeTab[] tabs = dtsr.tabs;
for (int j = 0; j<tabs.Length; j++)
{
SFEnterpriseWSDL.DescribeTab tab = tabs[j];
if (tab.label.ToString() =="Documents")
url = tab.url;
}
}
//remove the last /0 from url and add folder id
int iLastIndexUrl = url.LastIndexOf("/");
url = url.Substring(0, iLastIndexUrl);
string concatfolderid = folderId.Substring(0, folderId.Length - 3);
url = url + "?fcf=" + concatfolderid;
Hi,
I have tried the above code but getting error in SysLog: ERROR - Compile error: Invalid type: SFEnterpriseWSDL.DescribeTabSetResult
i want to get the webtab URL from Apex Controller.