• Kunlun
  • NEWBIE
  • 25 Points
  • Member since 2007

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 97
    Questions
  • 88
    Replies
I use .net api to login with portal user, the user name and password are correct, but threw exception as below,

Anyone can help me? Thanks very much.

Client found response content type of 'text/html;charset=UTF-8', but expected 'text/xml'.
The request failed with the error message:
--


<!-- ...................................................................................................
       ...................................................................................................
       ...................................................................................................
       ................................................................................................... -->

<div style="display:none;" id="errorTitle">Unable to Access Page</div>
<div style="display:none;" id="errorDesc">The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.</div>
<table cellspacing="10">
<tr><td><span style="font-weight: bold; font-size: 12pt;">Unable to Access Page</span></td></tr>
<tr><td>
The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.
<br><br>

<a href="javascript:history.back()" class="back">Back</a>
</td></tr>
</table>
</td></tr>
</table>




<!-- Body events -->
<script type="text/javascript">function bodyOnLoad(){if(window.PreferenceBits){window.PreferenceBits.prototype.csrfToken="null";};}function bodyOnBeforeUnload(){}function bodyOnFocus(){}function bodyOnUnload(){}</script>
  
</body>
</html>


<!--
...................................................................................................
...................................................................................................
...................................................................................................
...................................................................................................
-->

--.
  • February 22, 2014
  • Like
  • 0

Hi,

 

I would like to create a visual force page, which contains lookup fields.

 

And I would like to set some basic value in lookup field text box. So that user can click the "lookup" button to query with some basic condition.

 

For example:
<inputField value="a"/> (text field)
<inputField value="b"/> (lookup field)

 

User will set a value first, maybe "company", then I would like to copy the value of a ("company") to b's text box, so that I can query b with conditon of a ("company").

 

Any one can help me?

 

Thanks

Kunlun

  • August 26, 2013
  • Like
  • 0

 

The operation is coner to MD5.

-----------------------------------------------------

Blob input = Blob.valueOf(stringToHash);
Blob bob = Crypto.generateDigest('MD5', input);
String rawHex = EncodingUtil.convertToHex(bob);
-----------------------------------------------------

Hi All,

 

We have a default portal in custom portal setting.

 

There is a trigger, which needs to get user's organization id and portal id, I checked document and get the organization id, but can not get portal id.

 

I found portal object is defined in medadata, which is "Portal" object. Is it possible to get default portal id in apex class?

 

Thanks

Kunlun

Hi All,

 

I need to make some ajax code in a visual force page, that user can input username, password and security token to login and made some query in the instance.

 

My ajax code is like below:
        var result = sforce.connection.login(strUserName, strPassword + strSecurityToken);

 

I can login successfully with the login info in current instance, but failed with other instantce login info.

 

Is it possible to login with other instance login info?

 

Thanks

Kunlun

Hi All,

 

We can create list view in account tab, contact tab. Is it possible to create a visual force page that user can create list view there?

 

Thanks

Kunlun

  • April 24, 2013
  • Like
  • 0

Hi All,

 

I created some php code as below to create case in SFDC.

 

When I run the code, it threw an error as below, but created in SFDC successfully.  I checked all the code are correct, is there any suggestion?

 

"An invalid XML character (Unicode: 0x1) was found in the element content of the document."

 

Below is the code:


    $createFields = array (
        'Shipment_Tracking_No__c' => $chexTracking,
        'AccountId' => $accountId,
        'ContactId' => $contactId,

        ........
    );

 

    $sObject1 = new SObject();
    $sObject1->fields = $createFields;
    $sObject1->type = 'Case';
    $debugLog .= "<br/>Creating New Case...<br/><br />";
    $createResult = $sforce->create(array($sObject1));

 

Thanks

Kunlun

  • March 23, 2013
  • Like
  • 0

Hi All,

 

I'm trying to create a database with <Apex:datatable/>. There are too many records in this datatable, so scroll is needed. But I need to make the table head fixed, and only can scroll the table body, Is it possible?

 

Thanks

Kunlun

  • February 06, 2013
  • Like
  • 0

Hi All,

 

I'm doing a project with SFDC api, to upload object values. See some objects have fields as xx__cSpecified, which is a bool type.

 

If there si  a field a__c, there should be a new field a__cSpecified

 

b__c, b__cSpecified

c__c, c__cSpecified.

 

if I upload a field value to SFDC, I ned to write

 

obj.a__c = "xx";

 

Should I set value for a__cSpecified? such as below code:

obj.a__cSpecified = true;

 

Thanks

Kunlun

  • December 20, 2012
  • Like
  • 0

Hi All,

 

We made a php api program to upload case to SFDC on our server. Mainly it works fine, but sometime the uploading program doesn't work and threw error message as "Could not connect to host".

 

I checked the error code, it occurred on api login salesforce ($loginResult = $sforce->login(xxxx, yyyy);). So it seems that our programe can not login SFDC with php api at that time. It works most of time, but error occurred about 5-10 times every day.

 

 

So there might be some issues:

1. Server can not connect SFDC at that time. 

2. SFDC reject the connection from our server.

3. Time out for connection


For 1#, we can access SFDC manually.

For 3#, The default socket timeout of php configration is 60 second. I think it should be OK.

 

For 2#, I researched something from internet, some one solve this issue with below action:

----------------------------------------

turned out that the firewall of the ticketing system we were connecting to had a setting that limited the maximum number of connections from a single I.P. address. Since all the API requests were coming from one IP (the webserver) we were hitting this limit which triggered the error.

To fix it an exception was added for our IP and we haven't seen it since.
----------------------------------------

What should I do in salesforce to do above setting?

 

 

Any one met this issue before? Who can help me, thanks

 

Kunlun

  • October 13, 2012
  • Like
  • 0

Hi All,

 

We made a php api program to upload case to SFDC on our server. Mainly it works fine, but sometime the uploading program doesn't work and threw error message as "Could not connect to host".

 

I checked the error code, it occurred on api login salesforce ($loginResult = $sforce->login(xxxx, yyyy);). So it seems that our programe can not login SFDC with php api at that time. It works most of time, but error occurred about 5-10 times every day.

 

 

So there might be some issues:

1. Server can not connect SFDC at that time. 

2. SFDC reject the connection from our server.

3. Time out for connection


For 1#, we can access SFDC manually.

For 3#, The default socket timeout of php configration is 60 second. I think it should be OK.

 

For 2#, I researched something from internet, some one solve this issue with below action:

----------------------------------------

turned out that the firewall of the ticketing system we were connecting to had a setting that limited the maximum number of connections from a single I.P. address. Since all the API requests were coming from one IP (the webserver) we were hitting this limit which triggered the error.

To fix it an exception was added for our IP and we haven't seen it since.
----------------------------------------

What should I do in salesforce to do above setting?

 

 

Any one met this issue before? Who can help me, thanks

 

Kunlun

 

 

 

 

 

  • October 05, 2012
  • Like
  • 0

Hi All

 

I need to query the distinct value for a field, which is like "select xxx(number field) from yyy group by xxx(number field)." But system threw error as "field 'xxx' can not be grouped in a query call". 

 

Is there any way to implement such distinct query for a number field?

 

Thanks

Kunlun

  • August 08, 2012
  • Like
  • 0

Hi All

 

I wrote apex code to send email as below, but it threw error "Too many Email Invocations: 1". I searched on internet, it said the sending email limitation is 10, but I can not send 1 email. It really made me crazy. Should I make some configuration to open email sending service in SFDC?

 

Thanks

Kunlun

public with sharing class PortalTestController{
    public PageReference dataRequest(){
        sendRequestEmail();
        return null;
    }
    public void sendRequestEmail(){
        //Messaging.reserveSingleEmailCapacity(10);            
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {'kunlun.software@gmail.com'};
        String[] ccAddresses = new String[] {'kunlun.software@gmail.com'};
        mail.setToAddresses(toAddresses);
        mail.setCcAddresses(ccAddresses);
        mail.setReplyTo('kunlun.software@gmail.com');
        mail.setSenderDisplayName('Salsforce');
        mail.setSubject('Salsforce Email');
        mail.setBccSender(false);
        mail.setUseSignature(false);
        mail.setPlainTextBody('xxxx');        
        mail.setHtmlBody('xxxx');
        Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});        
    }         
}

 

<apex:page controller="PortalTestController" sidebar="false" showHeader="false" standardStylesheets="true" readOnly="true" >
    <apex:form >

    <apex:commandButton action="{!dataRequest}" value="Download Your Data" />
</apex:form>
</apex:page>

 

Hi All

 

We installed a pckage xxx, so after we login home page, there should be info like "Developing xxx(package name), latest version" on the right top of page.

 

We need to display the xxx(package name) to some visual force page. So can I make apex code to get the xxx(package name)?

 

Thanks

Kunlun

Hi All

 

I made a VF page for portal user, which needs to display the application name. How can I get the name with apex or VF coding?

 

Thanks

Kunlun

Hi All

 

Some user don't have permission to schedule report. We would like to write some apex to schedule report and email to them.

 

Is it possible?

 

Thanks

Kunlun

  • March 18, 2012
  • Like
  • 0

Hi All

 

I made an account VF. Make contact related list as <apex:relatedList subject="{!account}" list="contacts" />.

 

I want to only show the contacts which has email in this related list. Is it possbile?

 

Thanks

Kunlun

  • February 26, 2012
  • Like
  • 0

Hi All

 

I created a VF to override standard creating page of custom object. All that works fine in salesforce.

 

But it can not work for custom portal user, which threw error message "You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.".

 

Then I restore the creating page to SF standard one. It works for custom portal user. 

 

So there should be some permission setting for this VF to custom portal user.  How can I set it?

 

Thanks

Kunlun

  • February 13, 2012
  • Like
  • 0

We have "Customer Portal Manager" user lisence.

 

There are some custom objects which lookup to an account. Some portal users will be created from the contacts under this account. We want these portal user can see all custom object records which are related to this account.

 

I created a portal user and add custom object in portal, but can not see any records for this objects, which are under portal user's account.

 

Any one can help me how to share it?

 

Thanks

  • January 20, 2012
  • Like
  • 0

Hi All,

 

I'm doing a project with SFDC api, to upload object values. See some objects have fields as xx__cSpecified, which is a bool type.

 

If there si  a field a__c, there should be a new field a__cSpecified

 

b__c, b__cSpecified

c__c, c__cSpecified.

 

if I upload a field value to SFDC, I ned to write

 

obj.a__c = "xx";

 

Should I set value for a__cSpecified? such as below code:

obj.a__cSpecified = true;

 

Thanks

Kunlun

  • December 20, 2012
  • Like
  • 0

Hi All,

 

We made a php api program to upload case to SFDC on our server. Mainly it works fine, but sometime the uploading program doesn't work and threw error message as "Could not connect to host".

 

I checked the error code, it occurred on api login salesforce ($loginResult = $sforce->login(xxxx, yyyy);). So it seems that our programe can not login SFDC with php api at that time. It works most of time, but error occurred about 5-10 times every day.

 

 

So there might be some issues:

1. Server can not connect SFDC at that time. 

2. SFDC reject the connection from our server.

3. Time out for connection


For 1#, we can access SFDC manually.

For 3#, The default socket timeout of php configration is 60 second. I think it should be OK.

 

For 2#, I researched something from internet, some one solve this issue with below action:

----------------------------------------

turned out that the firewall of the ticketing system we were connecting to had a setting that limited the maximum number of connections from a single I.P. address. Since all the API requests were coming from one IP (the webserver) we were hitting this limit which triggered the error.

To fix it an exception was added for our IP and we haven't seen it since.
----------------------------------------

What should I do in salesforce to do above setting?

 

 

Any one met this issue before? Who can help me, thanks

 

Kunlun

  • October 13, 2012
  • Like
  • 0

Hi All,

 

We made a php api program to upload case to SFDC on our server. Mainly it works fine, but sometime the uploading program doesn't work and threw error message as "Could not connect to host".

 

I checked the error code, it occurred on api login salesforce ($loginResult = $sforce->login(xxxx, yyyy);). So it seems that our programe can not login SFDC with php api at that time. It works most of time, but error occurred about 5-10 times every day.

 

 

So there might be some issues:

1. Server can not connect SFDC at that time. 

2. SFDC reject the connection from our server.

3. Time out for connection


For 1#, we can access SFDC manually.

For 3#, The default socket timeout of php configration is 60 second. I think it should be OK.

 

For 2#, I researched something from internet, some one solve this issue with below action:

----------------------------------------

turned out that the firewall of the ticketing system we were connecting to had a setting that limited the maximum number of connections from a single I.P. address. Since all the API requests were coming from one IP (the webserver) we were hitting this limit which triggered the error.

To fix it an exception was added for our IP and we haven't seen it since.
----------------------------------------

What should I do in salesforce to do above setting?

 

 

Any one met this issue before? Who can help me, thanks

 

Kunlun

 

 

 

 

 

  • October 05, 2012
  • Like
  • 0

Hi All

 

I need to query the distinct value for a field, which is like "select xxx(number field) from yyy group by xxx(number field)." But system threw error as "field 'xxx' can not be grouped in a query call". 

 

Is there any way to implement such distinct query for a number field?

 

Thanks

Kunlun

  • August 08, 2012
  • Like
  • 0

Hi All

 

I wrote apex code to send email as below, but it threw error "Too many Email Invocations: 1". I searched on internet, it said the sending email limitation is 10, but I can not send 1 email. It really made me crazy. Should I make some configuration to open email sending service in SFDC?

 

Thanks

Kunlun

public with sharing class PortalTestController{
    public PageReference dataRequest(){
        sendRequestEmail();
        return null;
    }
    public void sendRequestEmail(){
        //Messaging.reserveSingleEmailCapacity(10);            
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {'kunlun.software@gmail.com'};
        String[] ccAddresses = new String[] {'kunlun.software@gmail.com'};
        mail.setToAddresses(toAddresses);
        mail.setCcAddresses(ccAddresses);
        mail.setReplyTo('kunlun.software@gmail.com');
        mail.setSenderDisplayName('Salsforce');
        mail.setSubject('Salsforce Email');
        mail.setBccSender(false);
        mail.setUseSignature(false);
        mail.setPlainTextBody('xxxx');        
        mail.setHtmlBody('xxxx');
        Messaging.sendEmail(new Messaging.SingleEmailMessage[]{mail});        
    }         
}

 

<apex:page controller="PortalTestController" sidebar="false" showHeader="false" standardStylesheets="true" readOnly="true" >
    <apex:form >

    <apex:commandButton action="{!dataRequest}" value="Download Your Data" />
</apex:form>
</apex:page>

 

Hi All

 

I know we can wirte code as <apex:inputField required="true"/> to make this field required highlight and checking.

 

Can we make code same style for other component? such as <apex:selectList>, <apex: inputText>

 

I wrote as <apex:selectList required="true"/>, but no required highlight on visualforce page.

 

Anyone can help me?

 

Thanks

Kunlun

I created a customer portal in my salesforce, and made portal user. But when I set portal sharing object, I can not find the contact object.

 

And also I selected "Account" object in portal sharing, but I can not see "Account" after I login custom portal.

  • January 20, 2012
  • Like
  • 0

Hi All

 

I checked all the document in apex code, but could not find any sample to use Analytic Snapshots.

There is only some description, which said "Analytic Snapshots can be used in api".

 

Any one can help me?

 

Kunlun

  • November 07, 2011
  • Like
  • 0

Hello,

 

I create a apex class, which contains some dynamic SOQL. The function is similar as searching product in price book.

 

All of them works fine. But I tried the security check in my account and found dynamic SOQL caused security warning.



Security check link: http://security.force.com/sourcescanner

My SOQL:

public with sharing class GroupOperationController{
    public String Keyword {get; set;}
    public String FieldName {get; set;}
    public String Operator {get; set;}
    public String FieldValue {get; set;}
     
    private String getQuerySql() { 
        String fields = ' Id, Name, PCOL__Account__r.Id, PCOL__Account__r.Name, PCOL__modelS__c, PCOL__manufacturerS__c, PCOL__serialNumberS__c ';
        String strSql = 'select '+fields+' from PCOL__Device__c where Name != null ';
         
        strSql += getKeywordWhere();
        strSql += getMatchFiltersWhere();
        System.debug('xxxxxxxxxxxx ' + strSql + ' xxxxxxxxxxxxxxx');
        return strSql;
    }
    private String getKeywordWhere(){
        String sqlWhere = '';
        if(Keyword != null && !Keyword.equals('')){
            sqlWhere = ' and (';
            Integer i = 0;
            for(SelectOption so: FieldNames){
                if(i > 1){
                    sqlWhere += ' or ';
                }
                if(i > 0){
                    sqlWhere += ' ' + so.getValue() + ' like \'%' + Keyword + '%\' ';
                }
                i++;
            } 
            sqlWhere += ') '; 
        }   
        return sqlWhere;
    }
    private String getMatchFiltersWhere() { 
        String sqlWhere = '';
        if(FieldName != '' && Operator != '' && FieldValue != '' ) { // have a filter
            if(Operator == 'e'){
                sqlWhere += ' and ' + FieldName + ' = \'' + FieldValue + '\' '; 
            }else if(Operator == 'n'){
                sqlWhere += ' and ' + FieldName + ' != \'' + FieldValue + '\' '; 
            }else if(Operator == 's'){
                sqlWhere += ' and ' + FieldName + ' like \'' + FieldValue +  '%\' '; 
            }else if(Operator == 'c'){
                sqlWhere += ' and ' + FieldName + ' like \'%' + FieldValue + '%\' '; 
            }else if(Operator == 'z'){
                sqlWhere += ' and ' + FieldName + ' like \'%' + FieldValue + ' '; 
            }        
        } 
    } 
    private void BindObjList(){
        ObjList = new List<GroupOperationDevice>();
        for(PCOL__Device__c d: Database.query(getQuerySql())){  
                ObjList.add(new GroupOperationDevice(d, false, visible)); 
        } 
    }
    public PageReference submit(){
        BindObjList();
        return null;    
    }
}

 After security checking, some warning appearred. It said all the code like "sqlWhere +=" are not security.

 

Any one can help me how to use dynamic SOQL and support security check?

  • October 28, 2011
  • Like
  • 0

Hi,

 

Not sure if Salesforce would allow this (knowing all cross-domain javascript restrictions coming into play et.) but is it possible to somehow enforce a whole browser page refresh from an inline Visualforce page (i.e. an embedded VF within Standard page)?

 

This is needed since the inline VF page captures data for one of the CHILD objects (Opportunity standard page having sub-section for OpportunityLineItem data).

 

Hence whenever we add a new Opportunity Line item using this inline vF page, there are some rollup calculations happening on parent i.e. Opportunity and since those roll up fields are present on Opportunity Standard page, only way for us to show latest information on UI is to somehow cause whole page to refresh so that Opportunity shows updated roll up fields, as well as Inline VF shows new line item added. 

 

I am bit skeptical about this as we have seen issues in past where VF are rendered from a separate domain and standard pages from different, hence cross-domain JS issues may arise here if we try to refresh PARENT using  javascript within Inline VF.

 

I saw a similar post but not sure how we can do whole brower refresh -

http://community.salesforce.com/t5/Visualforce-Development/Refresh-related-list-based-on-inline-visualforce-page/m-p/186161/highlight/false#M24759

 

Any insight, help is appreciated.

 

Thanks

Satgur

We are in the process of creating a client portal based on SFDC customer portal and our own content and reports.  We needa developer familiar with customizing the look and feel, reporting and "custom" functionality we'd like to deploy in the portal - all while using SFCD user profiles to drive what clients can see and access.  We also need to integrate SFDC data and non-SFDC data together in reports, charts, etc.

 

If you have experienc with these issues please contact me and provide a summar of relevant experience.

 

Thanks

 

I am looking to talk to people that previously worked in the SalesForce.com Consulting Services group. 

 

Would you like to have a conversation about your professional experience?

 

If so, please send me a short email with your SFDC Consulting background (i.e. what did you do and for how long), what are you currently doing professionally, and where you are located.

 

Thank you!

I have a picklist field "MeetingType" in Opportunity object. It has 3 values, such as xxx, yyy, zzz.

 

I want to add or delete the picklist values in apex class.

 

Is it possible to add value "mmm" or delete "zzz" in this picklist field via apex metadata api?

 

Thanks

  • December 01, 2009
  • Like
  • 0
Skills Required:
SalesForce Developer:
- Skilled SalesForce developer
- Skilled in managing SalesForce environments and configurations.
- solid understanding and use of SalesForce applications, workflow, and triggers.
- 1+ years experience developing SalesForce API & application integrations with other application.
Experience Required:
- 3+ years experience developing SalesForce applications.
- 1+ years experienced with managing SalesForce environments and configurations.
- 1+ years experience developimg SalesForce applications, workflow, and triggers.
- 1+ years experience developing SalesForce API & application integrations with other application.
Optional Skills:
- Solid communication and documentation skills.
- Solid use of MS Office and documenting tools (Office/Visio).
  • September 10, 2009
  • Like
  • 0

We have a short-term project which requires a certified force.com developer. Experienced with visualforce, custom objects, APEX and triggers.

 

Independent contractors preferred.

 

I want to find out which Resource was added as part of an Event and then populate the same into Event.Location field.

 

Resources added are stored as EventAttendee record. EventAttendee record just contains SFDC Id of that resource i.e., EventAttendee itself holds a relationship with Resource Object. 

 

I explored the objects accesssible  via API and found that there's is nothing like Resources or PublicCalendars from where i can grab Resource Name. 

 

So my question is  Are Public Calendars and Resources accessible(atleast READ) via API?

Message Edited by Chirag Mehta on 06-26-2009 08:59 AM

Please reply with your CV, rate & availability.  Cheers!

  • June 24, 2009
  • Like
  • 0

Hi

 

I can change the normal task page Layouts in the activity -> Task Page Layouts.

But I also want to change it in the task made by workflow.

 

Anyone know how to do it?

 

Thanks

Kunlun