• vfDeveloper.ax341
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 7
    Replies
Is that possible to package "Remote Site Setting" ?

I'm packaging application which uses external .net web service. In order to use that service i have enter web service's ip
in Setup->Administration Setup->Security Controls->Remote Site Settings first.

These settings are not deployed with created package.

Any advice would be great. Thanks

Is that possible to package overriden view.

.
For instance  go to : Setup->App Setup->Leads->Buttons and links -> Override View and then package your changes.

I was not able to find anything like that  when played with packages.

Thanks


Does anybody knows about ability to package page layouts ?

Found some info about that (SalesForce IdeaExchange)http://ideas.salesforce.com/article/show/88019/Package_Page_Layouts_for_Standard_Objects

But seems this is not implemented in winter 9.



Thanks



I faced INVALID_SESSION_ID  exception calling getUserInfo() of SalesforceAppExPartnerAPI.SforceService from my .net web service.


my code:
Code:

SalesforceAppExPartnerAPI.GetUserInfoResult userInfoResult = Binding.getUserInfo();


 Binding is property where _authHeader.EXTSessionID and _authHeader.EXTServerLocation are values passed to web service from salesforce portal.
_autHeader.ExtSessionID value retrieved via apex code : UserInfo.getSessionId() and _authHeader.ExtServerLocation is
https://na6-api.salesforce.com/services/Soap/u/12.0/511500D80000000Kb2v

Code:

    private SalesforceAppExPartnerAPI.SforceService Binding {
            get {
        
                    try {                        

                        // binding
                        SalesforceAppExPartnerAPI.SforceService binding = new SalesforceAppExPartnerAPI.SforceService();
                        // by setting these values, we are essentially logged in to the API as this user
                        binding.SessionHeaderValue = new SalesforceAppExPartnerAPI.SessionHeader();
                        binding.SessionHeaderValue.sessionId = _authHeader.EXTSessionID;
                        binding.Url = _authHeader.EXTServerLocation;
                                    

                        return binding;
                    } catch (System.Web.Services.Protocols.SoapException exsoap) {
                        if (exsoap.Code.ToString().Contains("API_DISABLED_FOR_ORG")) {
                            throw new EXTAPIAuthFail("This edition of salesforce.com does not provide API access."
                                + "API access is a standard feature of Enterprise "
                                + "and Unlimited Editions.<br>"
                                + "Certify your application to gain API access to "
                                + "Professional Edition as well.<br><br>", exsoap);
                        } else {
                            throw new EXTAPIAuthFail("SoapException: Unable to validate incoming web call.", exsoap);
                        }
                    } catch (System.UriFormatException uriEx) {
                        throw new EXTAPIAuthFail("The Server URL is invalid. " + uriEx.Message, uriEx);
                    } catch (Exception e) {
                        throw new EXTAPIAuthFail("Unable to connect to the API. " + e.Message, e);
                    }
                } else {
                    return _binding;
                }
            }
        }


 
Exception Stack trace:

Code:

{System.Web.Services.Protocols.SoapException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Mindflash.SalesforceAppExPartnerAPI.SforceService.getUserInfo()

 

It works fine before salesforce introduced winter9 release and version 14.0 API.
I faced INVALID_SESSION_ID  exception calling getUserInfo() of SalesforceAppExPartnerAPI.SforceService from my .net web service.


my code:
Code:
SalesforceAppExPartnerAPI.GetUserInfoResult userInfoResult = Binding.getUserInfo();

 Binding is property where _authHeader.EXTSessionID and _authHeader.EXTServerLocation are values passed to web service from salesforce portal.
_autHeader.ExtSessionID value retrieved via apex code : UserInfo.getSessionId() and _authHeader.ExtServerLocation is
https://na6-api.salesforce.com/services/Soap/u/12.0/511500D80000000Kb2v

Code:
 private SalesforceAppExPartnerAPI.SforceService Binding {
   get {
  
     try {      

      // binding
      SalesforceAppExPartnerAPI.SforceService binding = new SalesforceAppExPartnerAPI.SforceService();
      // by setting these values, we are essentially logged in to the API as this user
      binding.SessionHeaderValue = new SalesforceAppExPartnerAPI.SessionHeader();
      binding.SessionHeaderValue.sessionId = _authHeader.EXTSessionID;
      binding.Url = _authHeader.EXTServerLocation;
                           

      return binding;
     } catch (System.Web.Services.Protocols.SoapException exsoap) {
      if (exsoap.Code.ToString().Contains("API_DISABLED_FOR_ORG")) {
       throw new EXTAPIAuthFail("This edition of salesforce.com does not provide API access."
        + "API access is a standard feature of Enterprise "
        + "and Unlimited Editions.<br>"
        + "Certify your application to gain API access to "
        + "Professional Edition as well.<br><br>", exsoap);
      } else {
       throw new EXTAPIAuthFail("SoapException: Unable to validate incoming web call.", exsoap);
      }
     } catch (System.UriFormatException uriEx) {
      throw new EXTAPIAuthFail("The Server URL is invalid. " + uriEx.Message, uriEx);
     } catch (Exception e) {
      throw new EXTAPIAuthFail("Unable to connect to the API. " + e.Message, e);
     }
    } else {
     return _binding;
    }
   }
  }

 
Exception Stack trace:

Code:
{System.Web.Services.Protocols.SoapException: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at Mindflash.SalesforceAppExPartnerAPI.SforceService.getUserInfo()
 

It works fine before salesforce introduces winter9 release and version 14.0 API.







Is that possible to retrieve metadata information about Tabs from apex code?

My use case:
-I have VisualForce Tab, wich is assigned to page.
-I need to redirect to that page from another page and highlight my tab at the same time.

I was able to investigate that for  custom tabs highlight functionality is implemented via query string parameters.Something like that:

?sfdc.tabName=01r40000000Dw3m&sfdc.motif=Custom53

So i need to query metadata (sfdc.tabName,sfdc.motif) to build proper PageReference instance before redirection.

Any help would be nice, thank you in advance.










Message Edited by vfDeveloper on 07-16-2008 04:26 AM
How can i deploy overrided "Buttons and Links" via Eclipse tool to another organization. I can't see such kind of choice at all.
However this functionality  is available when packaging via web-interface.

Thank  you in advance.

does apex supports modulus operator (like % in C#)?


Is that possible in foreseeable future (and when exactly) to have packaging support for Visualforce controls/pages.

We faced problem, that we can not upload our package because it contains visualforce pages.
We need to decide either wait for such kind of support or get rid of visualforce (which means rewrite application completely).

I think we are not first developers, who faced this problem. Any advice in that situation would be great.



I'm unable to upload package wich contains application with  VisualForce tabs.
I'm getting the following error : "Your upload failed. You will receive an e-mail containing additional information".

I asked this question couple of days ago. But this post has more precise definition.

Thank you in advance.



I'm trying to upload my package for testing purposes. I include only application into my package, which contains all neccessary pages.  But i'm getting the following error:

"Your upload failed. You will receive an e-mail containing additional information".

Also i was able to find out that package upload fails only if it contains visualforce pages.

Any help would be great. Thanks in advance.


Is that possible to override UI/ behavior for "Mass EMAIL" process ?

1)I need to pass selected Leads/Contacts ids to Mass Email wizard somehow. ("Create New View" is not suitable for my case : ids should be gerenerated dynamically from another page ).
2)I need to add an extra step to "Mass Email"  wizard, where user can select optional information for template.
3)I need to skip template selection step. (Only one concrete template should be used )

I hope i can override standart controller? Or this is not possible at all and this functionality should be used "as is".

Thank you in advance.





Message Edited by vfDeveloper on 06-19-2008 02:49 AM

I need to acces Partner server url global variable from apex code in order to pass it into web service.

In visualforce i can write the followin statement in page layout  {!$Api.Partner_Server_URL_120} which renderes something like that https://na5.salesforce.com/services/Soap/u/12.0/461200D70000000IfeF

How can i access {!$Api.Partner_Server_URL_120}  variable from apex code?

Thanks in advance


I use couple of enums in my .net web service
For example
    public enum ResponseCode {
        Success,
        Fail,
        ServerError,
        AuthenticationFail
    }

When i import my wsdl, apex code creates  empty class
public class ResponseCode {
}


instead of enumeration. However when i create web reference in other .net project (to test web service calls) everything works just fine.

How can i solve this? Or may there is some workaround for enums?

Thanks


I'm trying to integrate saleseforce with some system via .net web services.
I use soap headers in order to receive some custom authentication info from salesforce and
send back responce information(Like errorCode, ErrorMessage etc.)


My web service code snippet:

[WebMethod]
[SoapHeader("AuthHeader", Direction = SoapHeaderDirection.InOut)]
[SoapHeader("ResponseHeader", Direction = SoapHeaderDirection.Out)]
public void SomeMethod()
{
    ...
}




The problem is that i can initialize AuthHeader from salesforce and handle on web service side.
But i can not handle response header on salesforce side. With "system log" window i can trace and
see that Response heder exists in soap message.Seems that salesforce does not handle this and does not
initialize ResponseHeader member of proxy class generated from WSDL.


I understand that i can return ResponseHeader as part of web service method return type, but it is not acceptable from our architecture point of view.

How can i resolve this issue?

Hi,

Is it possible (and how ) to use Session in salesforce? (for instance like in ASP.NET). In my case in need to develop couple of pages and keep some authentication token info from external web service.

Thanks

Documentation says that inputField corresponds to a field on a Salesforce object.I need the same functionality for Controller's property. So if i have property of DateTime i would like to see DatePicker, if i have property of Boolean type than checkbox etc. When i try to do this error appears: "Could not resolve the entity from <apex:inputField> value binding ('Name of controller property').
Hi, Is that possible to pass data between components? Thanks.
Is that possible to package "Remote Site Setting" ?

I'm packaging application which uses external .net web service. In order to use that service i have enter web service's ip
in Setup->Administration Setup->Security Controls->Remote Site Settings first.

These settings are not deployed with created package.

Any advice would be great. Thanks

Does anybody knows about ability to package page layouts ?

Found some info about that (SalesForce IdeaExchange)http://ideas.salesforce.com/article/show/88019/Package_Page_Layouts_for_Standard_Objects

But seems this is not implemented in winter 9.



Thanks



Is that possible in foreseeable future (and when exactly) to have packaging support for Visualforce controls/pages.

We faced problem, that we can not upload our package because it contains visualforce pages.
We need to decide either wait for such kind of support or get rid of visualforce (which means rewrite application completely).

I think we are not first developers, who faced this problem. Any advice in that situation would be great.



I'm trying to upload my package for testing purposes. I include only application into my package, which contains all neccessary pages.  But i'm getting the following error:

"Your upload failed. You will receive an e-mail containing additional information".

Also i was able to find out that package upload fails only if it contains visualforce pages.

Any help would be great. Thanks in advance.


Is that possible to override UI/ behavior for "Mass EMAIL" process ?

1)I need to pass selected Leads/Contacts ids to Mass Email wizard somehow. ("Create New View" is not suitable for my case : ids should be gerenerated dynamically from another page ).
2)I need to add an extra step to "Mass Email"  wizard, where user can select optional information for template.
3)I need to skip template selection step. (Only one concrete template should be used )

I hope i can override standart controller? Or this is not possible at all and this functionality should be used "as is".

Thank you in advance.





Message Edited by vfDeveloper on 06-19-2008 02:49 AM
Hi, Is that possible to pass data between components? Thanks.