• Pratty
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 14
    Replies
Hello All,

I am trying to integrate with Siebel system, through Apex class generated from wsdl but getting below error,

System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

When I am executing service end point url in browser it's working(by placing ?wsdl at the end of url), also it is working fine in SOAPUI.
Can you please help me to resolve this?

Thanks in advance.

Regards,
Rudra
  • March 27, 2014
  • Like
  • 1

Hello All,

 

I have a written a scheduler for my project. I think it is not working properly, so I want to debug it / keep track on it.

Is there any way / tool present, so that I can track this asynchronous process.

 

Thanks in advance.

Pratty

Hi,

 

I am getting this error when I tried to update user from salesforce backend.

Error: Duplicate Username.
Another user has already selected this username.
Please select another.


but there is no user in this org with same username. I have also checked all my sandboxes but I didn't find user with same username.

 

Can anybody help me to get through this.

 

Thanks,

Pratty

  • February 11, 2013
  • Like
  • 0

Hello Friends,

 

I am using a visualforce template, in that template I am using a custom component and a controller.

 

In controller I am trying to insert a project and want to use it's Id in anchor tag of visualforce template.

 

here's the code,

 

class test

{

       public string ProjectId {get; set;}

 

        public void Init()

        {

             Project project = new Project();

             project.name = 'testProject';

             ............

             insert project;

             ProjectId = project.Id;

        }

}

 

<messaging:emailTemplate subject="Mutual Interest for" recipientType="User" relatedToType="Contact">
<messaging:htmlEmailBody >

<c: testComponent />

<a href="https://testSites.force.com?Id= here I want to use project Id" >click </a>

......................

 

Can anybody help me to get through this.

 

Thanks and Regards,

Pratty

  • December 17, 2012
  • Like
  • 0

Hi,

 

I am trying to use rendered and reRender together but it's not working. Here is the code,

 

 <apex:outputPanel id="studId">
              <apex:outputPanel rendered="{!bIsStud}">
                      <td class="column">
                           <apex:outputtext value="{!Proj.strValue}" styleClass="column" />
                      </td>
              </apex:outputPanel>

</apex:outputPanel>

 

 

<apex:selectList value="{!selectedNumber}" multiselect="false" size="1" >
                           <apex:actionSupport event="onchange" status="ajaxstaus1" action="{!InitAllProject}" rerender="studId" />
                             <apex:selectOptions value="{!lstNumberToPagination}"></apex:selectOptions>
 </apex:selectList>

 

I have also used single outputpanel containing id and rendered property but still not able to resolve issue.

Can anybody help me to get through this?

 

Thanks,

 

Pratty

  • November 22, 2012
  • Like
  • 0

Hello All,

 

I have created a site, I have a page called testLogged, which will be accessed by logged in user.

 

But when I hit http://devsitepratik-developer-edition.ap1.force.com/testLogged this url directly

in browser without login then I can see the dashboard which is wrong.

 

So I have used below code for authorization,

 

if(UserInfo.getName().contains('Guest'))
       return page.ErrorPage;

 

but I think I need a better logic for this, so can anybody help me to resolve my queries.

1. Why this is happened? Is it because of portal guest user?

 

2. Is there any Better logic available for this?

 

Thanks in advance.

 

regards,

 

Pratty

 

 

 

  • August 26, 2012
  • Like
  • 0

Hello All,

 

I have created 3 different sites and enabled login for 3 different customer portals through it.

Also I have 3 different profiles named as Portal - NPO User, Portal - Vol User and Portal - Educator User,

also I have 3 different login pages for it, NpoUserLanding for NPO, VolUserLanding for Vol and EduUserLanding for

Educator.

 

When I have tried to login seperately from these pages I can login successfully but now I want to centralise these login's

so I have created new page and created new customer portal and new site and also assigned all Profiles to it and tried to login from it but does not login properly get "Volunteer Portal Site Guest User" as a user name which is wrong.

 

So could anybody help me to get through this. Thanks in advance.

 

Pratty

 

  • August 09, 2012
  • Like
  • 0

Hi,

 

I am handling exception using try-catch but at the time of writing test class fail to cover catch block part,

this happens at the time when I am inserting any object.

 

For example,

 

try{

.........

insert contact;

}

catch(Exception e) // fail to cover this part of code

{..........}

 

Can anybody help me to solve this problem.

 

Thanks,

Pratty

Hello All,

 

I want to write a test method for a class but fail to cover some part because of BodyLength of Attachment object.

 

Here is some part of code,

.....................

if(objAttachment.BodyLength > 0)

{...................}

 

So could you help me how to set value for this BodyLength field.

 

Thanks,

Pratty

 

Hello All,

 

I have created a PDF page which contains more than 18 columns but it is not displaying all columns

instead of it is displaying first 7 columns. But it's working fine for Xls page,

so could you help me to get through this.

 

Thanks & Regards,

Pratty

Hello All,

 

I have a page which opens a popup after every refresh i.e. at the time of loading,

at the time of displaying errors.

 

I want that it shows popup only for the first time when it loads and not for second time when it shows error message.

 

Here's short code,

 

<body class="Secondary" onload="clickme();" >

 

function clickme()
{

$( "#dialog-form" ).dialog( "open" );

}


***************************************************************************************************************************

 

public class demo
{

public PageReference gotonext()
{

if(all is ok)
{
return Page.nextpage;
}
else
{

System.debug('Error has been occured');
return null;
}

}

}

 

can anybody help me to solve above issue.

 

Thanks in advance.

 

Regards,

Pratty

Hello All,

 

I want to verify the status of canadian npo,

whether they are valid or not using their BN / Registration number,

means after successful registration of Canada NPO in sandbox there will be a button (may be a lookup)

named verify status after clicking on this it will give Information about that nonprofit if it exists.

 

Can anybody help me to get through this

 

Thanks Pratty

 

Hello,

 

I have used autocomplete plugin for  country field in my VF page. It's not working.

 

Here's code,

 

//  controller

public class test extends abc

{

@RemoteAction
public static User[] getCityValue()
{
return [Select Id,City From User];
}

}

 

//  VF Page

 

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>

<script>
var availableTags = new Array();


$(document).ready(function() {
NPORegistration.getCityValue(getCityNames);
});

 

function getCityNames(result,event)
{
for( var iIndex = 0; iIndex < result.length; iIndex++)
{
var strCity =result[iIndex].City;
if( strCity != null && strCity.length > 0)
availableTags[iIndex] = strCity;   //   data is getting
}
var elemClientName = $('input[id$=txtCityId]');  //  Id is getting

$(elemClientName).autocomplete({source: availableTags , delay: 10});
}
</script>

 

<td>
<apex:inputText value="{!Reg.BillingCity}" id="txtCityId" />
</td>

 

Could anybody help me to get through this.

 

Regards,

 

Pratty

  • April 26, 2012
  • Like
  • 0

Hello,

 

I want to access controller getter-setter variable inside javascript. How could I do this.

 

Thanks in advance.

 

 

 

Regards,

 

Pratty

  • April 24, 2012
  • Like
  • 1

 

Hi,

 

I have inputText component for accepting input.

 

If user not fills any value I want to display error message to right side of this field.

 

I made required = true but it displays error message on top of page.

 

Here is code,

 

<apex:inputText id="username" value="{!username}" styleClass="textSmall" required="true"/>

 

Could you please help me to get through this.

 

Regards,

 

Pratty

  • April 17, 2012
  • Like
  • 0

Hello all,

 

I have to used param tag inside commandLink under repeat tag but fail to get param value.

 

Here's code,

 

   <apex:repeat value="{!lstNumbers}" var="num">
                <apex:commandLink value="{!num}"     action="{!nextPage}"  >
                <apex:param      name="selectedPage"       value="{!num}"      assignTo="{!selectedPage}"/>
                 <apex:actionSupport        event="onclick"        action="{!nextPage}"      reRender="frm,projtable" />
                </apex:commandlink>
  </apex:repeat>

 

 

// Controller Code

 

public string selectedPage {get; set;}

public void nextPage()
    {
        Error.LogError('In nextPage' + selectedPage); // this only prints In nextPage.
        lstContactForRegisteredVol.Clear();
        lstContactForRegisteredVol = mapContactsForPagination.get(selectedPage);
    }

 

can anybody help me to get through this.

 

Regards,

 

Pratty

  • March 23, 2012
  • Like
  • 0

Hello all,

 

I am using a controller to update contact details. It's saved successfully but My Error Message was not printed.

 

Here's code,

 

public pageReference SubmitUserDetails()
{

Contact contact = [Select  .....all query.......];

contact.phone = '123';

update contact;

 

ApexPages.Message apexMessage = new ApexPages.Message(ApexPages.Severity.Error, 'Your changes saved  successfully');

ApexPages.addMessage(apexMessage);

 

PageReference pageReference = new PageReference('/ContactPage?VolId='+VolSelected);

//  VolSelected is a contact Id.
return pageReference;

}

 

Here's is page tag,

 

<apex:Messages  />  &  <apex:pageMessages />.

 

I have used both one by one but its not working. Could anybody help me to get through this.

 

Thanks in advance.

 

Pratty

  • March 15, 2012
  • Like
  • 0

Hello friends,

 

I want to fetch more than 50000 contacts and want to process them, but I am not able to do that.

 

How can I use batch apex for this or is there any way other than batch apex?

 

Could you please help me to get through this.

 

Thanks in advance.

 

Pratty

  • March 10, 2012
  • Like
  • 0

 

Hello,

 

I have created a popup to update the contact's information on contact's info page. Here is the code.

 

<script>

function popup(page)
{
window.open(page,'items','scrollbars=1,width=1000,height=500,resizable=1');
}
</script>

<apex:commandLink onclick="javascript&colon;popup('apex/ContactPage?Id={!Contact.Id}')" value="{!Contact.Name}">

 

1. After updating information on this "ContactPage" when I click the "Submit" button that popup remains open with my new redirected url. I want to close that popup after submit and redirect to my site.

 

2.Also I want to lock the original site when popup is open i.e. no one able to open new popup or click on another link.

 

Can anyone help me to get rid of it.

 

Thanks in advance.

 

Pratty

  • February 15, 2012
  • Like
  • 0

Hi,

 

I have to find the browser type which I am using. 

 

Is there is any method in apex to do this.

 

Thanks in advance.

 

Regards,

 

Pratty

  • January 20, 2012
  • Like
  • 0
Hello All,

I am trying to integrate with Siebel system, through Apex class generated from wsdl but getting below error,

System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

When I am executing service end point url in browser it's working(by placing ?wsdl at the end of url), also it is working fine in SOAPUI.
Can you please help me to resolve this?

Thanks in advance.

Regards,
Rudra
  • March 27, 2014
  • Like
  • 1

Hello,

 

I want to access controller getter-setter variable inside javascript. How could I do this.

 

Thanks in advance.

 

 

 

Regards,

 

Pratty

  • April 24, 2012
  • Like
  • 1
Hello All,

I am trying to integrate with Siebel system, through Apex class generated from wsdl but getting below error,

System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'

When I am executing service end point url in browser it's working(by placing ?wsdl at the end of url), also it is working fine in SOAPUI.
Can you please help me to resolve this?

Thanks in advance.

Regards,
Rudra
  • March 27, 2014
  • Like
  • 1

Hi,

 

I am getting this error when I tried to update user from salesforce backend.

Error: Duplicate Username.
Another user has already selected this username.
Please select another.


but there is no user in this org with same username. I have also checked all my sandboxes but I didn't find user with same username.

 

Can anybody help me to get through this.

 

Thanks,

Pratty

  • February 11, 2013
  • Like
  • 0

Hi,

 

I am trying to use rendered and reRender together but it's not working. Here is the code,

 

 <apex:outputPanel id="studId">
              <apex:outputPanel rendered="{!bIsStud}">
                      <td class="column">
                           <apex:outputtext value="{!Proj.strValue}" styleClass="column" />
                      </td>
              </apex:outputPanel>

</apex:outputPanel>

 

 

<apex:selectList value="{!selectedNumber}" multiselect="false" size="1" >
                           <apex:actionSupport event="onchange" status="ajaxstaus1" action="{!InitAllProject}" rerender="studId" />
                             <apex:selectOptions value="{!lstNumberToPagination}"></apex:selectOptions>
 </apex:selectList>

 

I have also used single outputpanel containing id and rendered property but still not able to resolve issue.

Can anybody help me to get through this?

 

Thanks,

 

Pratty

  • November 22, 2012
  • Like
  • 0

Hello All,

 

I have created a site, I have a page called testLogged, which will be accessed by logged in user.

 

But when I hit http://devsitepratik-developer-edition.ap1.force.com/testLogged this url directly

in browser without login then I can see the dashboard which is wrong.

 

So I have used below code for authorization,

 

if(UserInfo.getName().contains('Guest'))
       return page.ErrorPage;

 

but I think I need a better logic for this, so can anybody help me to resolve my queries.

1. Why this is happened? Is it because of portal guest user?

 

2. Is there any Better logic available for this?

 

Thanks in advance.

 

regards,

 

Pratty

 

 

 

  • August 26, 2012
  • Like
  • 0

Hello All,

 

I have created a PDF page which contains more than 18 columns but it is not displaying all columns

instead of it is displaying first 7 columns. But it's working fine for Xls page,

so could you help me to get through this.

 

Thanks & Regards,

Pratty

Hello All,

 

I have a page which opens a popup after every refresh i.e. at the time of loading,

at the time of displaying errors.

 

I want that it shows popup only for the first time when it loads and not for second time when it shows error message.

 

Here's short code,

 

<body class="Secondary" onload="clickme();" >

 

function clickme()
{

$( "#dialog-form" ).dialog( "open" );

}


***************************************************************************************************************************

 

public class demo
{

public PageReference gotonext()
{

if(all is ok)
{
return Page.nextpage;
}
else
{

System.debug('Error has been occured');
return null;
}

}

}

 

can anybody help me to solve above issue.

 

Thanks in advance.

 

Regards,

Pratty

Hello,

 

I want to access controller getter-setter variable inside javascript. How could I do this.

 

Thanks in advance.

 

 

 

Regards,

 

Pratty

  • April 24, 2012
  • Like
  • 1

 

Hi,

 

I have inputText component for accepting input.

 

If user not fills any value I want to display error message to right side of this field.

 

I made required = true but it displays error message on top of page.

 

Here is code,

 

<apex:inputText id="username" value="{!username}" styleClass="textSmall" required="true"/>

 

Could you please help me to get through this.

 

Regards,

 

Pratty

  • April 17, 2012
  • Like
  • 0

Hello all,

 

I have to used param tag inside commandLink under repeat tag but fail to get param value.

 

Here's code,

 

   <apex:repeat value="{!lstNumbers}" var="num">
                <apex:commandLink value="{!num}"     action="{!nextPage}"  >
                <apex:param      name="selectedPage"       value="{!num}"      assignTo="{!selectedPage}"/>
                 <apex:actionSupport        event="onclick"        action="{!nextPage}"      reRender="frm,projtable" />
                </apex:commandlink>
  </apex:repeat>

 

 

// Controller Code

 

public string selectedPage {get; set;}

public void nextPage()
    {
        Error.LogError('In nextPage' + selectedPage); // this only prints In nextPage.
        lstContactForRegisteredVol.Clear();
        lstContactForRegisteredVol = mapContactsForPagination.get(selectedPage);
    }

 

can anybody help me to get through this.

 

Regards,

 

Pratty

  • March 23, 2012
  • Like
  • 0

Hello all,

 

I am using a controller to update contact details. It's saved successfully but My Error Message was not printed.

 

Here's code,

 

public pageReference SubmitUserDetails()
{

Contact contact = [Select  .....all query.......];

contact.phone = '123';

update contact;

 

ApexPages.Message apexMessage = new ApexPages.Message(ApexPages.Severity.Error, 'Your changes saved  successfully');

ApexPages.addMessage(apexMessage);

 

PageReference pageReference = new PageReference('/ContactPage?VolId='+VolSelected);

//  VolSelected is a contact Id.
return pageReference;

}

 

Here's is page tag,

 

<apex:Messages  />  &  <apex:pageMessages />.

 

I have used both one by one but its not working. Could anybody help me to get through this.

 

Thanks in advance.

 

Pratty

  • March 15, 2012
  • Like
  • 0

 

Hello,

 

I have created a popup to update the contact's information on contact's info page. Here is the code.

 

<script>

function popup(page)
{
window.open(page,'items','scrollbars=1,width=1000,height=500,resizable=1');
}
</script>

<apex:commandLink onclick="javascript&colon;popup('apex/ContactPage?Id={!Contact.Id}')" value="{!Contact.Name}">

 

1. After updating information on this "ContactPage" when I click the "Submit" button that popup remains open with my new redirected url. I want to close that popup after submit and redirect to my site.

 

2.Also I want to lock the original site when popup is open i.e. no one able to open new popup or click on another link.

 

Can anyone help me to get rid of it.

 

Thanks in advance.

 

Pratty

  • February 15, 2012
  • Like
  • 0

Hi,

 

I have to call visualforce page through javascript code. Can anybody help me to solve this problem?

 

thanks in advance.

 

Regards,

 

Pratty

  • January 20, 2012
  • Like
  • 0