• Manoj kumar.ax391
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Hi -

Anyone have experience writing a Twitter to SFDC bot that users can query for information? Any ideas on where I might start with that?

Regards,

barl0w

Hi,

 

I am developing a webservice method that needs to be accessed through the WSDL file from an external .net program. Here is the sample code (rather a very simple one)

 

global class CustomerInterface{

  Webservice static String createCustomer(String customerName){
//perform some logic here

  return 'Successfull';
 
}
Now when I generate a WSDL file for this it only contains this method. If an external .net service needs to access this webservice I should do the following steps
1. Consume a partner wsdl and then call the login method
2. Take the sessionid from the previous call
3. Consume my CustomerInterface WSDL and then add the sessionid from step 2 into the header of the createCustomer call
This means my client should consume 2 WSDL files. Is there any way where I can reduce this to one. Say add a login method in the CustomerInterface.wsdl?
Thanks,
Manoj Ganapathy

 

I have a visualforce page that takes inputs from the user

 

Input 1 goes into Account object

Input 2 goes into Contact object

 

I need to call a webservice passing on input 2 (from contact) that initiates a series of steps in the webservice. One suce step verifies back in salesforce if the Account has Input 1 populated. So this makes it necessary for me to do the following steps

 

Update Account so that Input 1 is updated

Then call the webservice passing Input 2 from contact, so that when salesforce is queried again through the api Input 1 will be present in account

 

But the above approach fails with the error

You have uncommitted work pending. Please commit or rollback before calling out

 

Can you help me resolve this. I know a callout cannot be called after an update. But I am looking for a workaround.

 

Thanks

I have a visualforce page with 2 pageblocks. I have a commandbutton that calls a custom controller action and then rerenders both the pageblocks. Now i wanted to include a confirm window for the user to click yes or no. The functionality doesnt seem to work all of a sudden. With a little debugging I found out that 'return confirm' doesnt work with rerender. So when I removed the rerender from the commandbutton the functionality works fine and the whole page refreshes after the controller action.

 

Please find below the code snippet

 

<apex:page controller="ContactListController" tabStyle="Contact">
    <apex:form >
        <apex:pageBlock title="Contacts to be approved">
            <apex:outputPanel id="listPanel" layout="block">
                <apex:pageBlockTable value="{!approveList}" var="contact">
                    <apex:column headerValue="Name">
                        <apex:commandLink action="{!populateApproveWindow}" value="{!contact.name}" rerender="resultPanel">
                            <apex:param name="ContactId" value="{!contact.id}" />
                        </apex:commandLink>
                    </apex:column>
                    <apex:column value="{!contact.AccountId}" />
                </apex:pageBlockTable>
            </apex:outputPanel>
        </apex:pageBlock>
        <apex:pageBlock title="Contact Details">
            <apex:outputPanel id="resultPanel">
                <apex:panelGrid columns="4" id="theGrid" styleClass="list">
                    <apex:outputText value="Field Name" style="font-weight: bolder" />
                    <apex:outputText value="Old Values" style="font-weight: bolder" />
                    <apex:outputText value="New Values" style="font-weight: bolder" />
                    <apex:outputText value="" />
                    <apex:outputText value="Street Address 1" />
                    <apex:outputText value="{!myCustomContact.Contact.Contact_Street_Address_1__c}" />
                    <apex:inputField id="NewStreetAddress1" value="{!myCustomContact.Contact.New_Street_Address_1__c}" />
                    <apex:inputCheckbox value="{!myCustomContact.isStreetAddress1Checked}"/>
........many similar fields included here........                   
                  </apex:panelGrid>
            </apex:outputPanel>
              <apex:commandButton value="Approve Checked Fields" onclick="return confirm('Are you sure you want to approve the checked values and reject the rest?')" action="{!approve}"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

Is there any way to make return confirm and rerender to work with commandbutton.

 

Thanks,

Manoj

I downloaded quickstart.jar for java and installed it as a java project in eclipse to connect to sfdc. The connection and all calls to standard objects work just fine.

 

Now I need to write an api application that reads data from my custom objects in sfdc. I tried downloading enterprise.wsdl from my salesforce environment and created java classes using axis2 code generator in eclipse. Now this compiles properly as a new project. But this is not compatible with the quickstart java files. Is the an apparent version difference between the both a reason?

 

My enterprise wsdl is version 15.0 while the quickstart.jar is version 9.0

 

How do i connect to sfdc in version 15.0?

 

I am a newbie to api dev work and help needed please.

 

--Manoj

I have a visualforce page with 2 pageblocks. I have a commandbutton that calls a custom controller action and then rerenders both the pageblocks. Now i wanted to include a confirm window for the user to click yes or no. The functionality doesnt seem to work all of a sudden. With a little debugging I found out that 'return confirm' doesnt work with rerender. So when I removed the rerender from the commandbutton the functionality works fine and the whole page refreshes after the controller action.

 

Please find below the code snippet

 

<apex:page controller="ContactListController" tabStyle="Contact">
    <apex:form >
        <apex:pageBlock title="Contacts to be approved">
            <apex:outputPanel id="listPanel" layout="block">
                <apex:pageBlockTable value="{!approveList}" var="contact">
                    <apex:column headerValue="Name">
                        <apex:commandLink action="{!populateApproveWindow}" value="{!contact.name}" rerender="resultPanel">
                            <apex:param name="ContactId" value="{!contact.id}" />
                        </apex:commandLink>
                    </apex:column>
                    <apex:column value="{!contact.AccountId}" />
                </apex:pageBlockTable>
            </apex:outputPanel>
        </apex:pageBlock>
        <apex:pageBlock title="Contact Details">
            <apex:outputPanel id="resultPanel">
                <apex:panelGrid columns="4" id="theGrid" styleClass="list">
                    <apex:outputText value="Field Name" style="font-weight: bolder" />
                    <apex:outputText value="Old Values" style="font-weight: bolder" />
                    <apex:outputText value="New Values" style="font-weight: bolder" />
                    <apex:outputText value="" />
                    <apex:outputText value="Street Address 1" />
                    <apex:outputText value="{!myCustomContact.Contact.Contact_Street_Address_1__c}" />
                    <apex:inputField id="NewStreetAddress1" value="{!myCustomContact.Contact.New_Street_Address_1__c}" />
                    <apex:inputCheckbox value="{!myCustomContact.isStreetAddress1Checked}"/>
........many similar fields included here........                   
                  </apex:panelGrid>
            </apex:outputPanel>
              <apex:commandButton value="Approve Checked Fields" onclick="return confirm('Are you sure you want to approve the checked values and reject the rest?')" action="{!approve}"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

 

Is there any way to make return confirm and rerender to work with commandbutton.

 

Thanks,

Manoj

Hi:

I am having an issue with the ant tool kit and hope you can help.

I ran the test just fine, but when I got to replace my class with the sample class I get this error.

"An object 'MyClassName' of type ApexClass was named in manifest but was not found in zipped directory"

I updated the package.xml file with my class name, I can login just fine, and the test worked fine.

Thank you.

  • May 27, 2008
  • Like
  • 0
Hi -

Anyone have experience writing a Twitter to SFDC bot that users can query for information? Any ideas on where I might start with that?

Regards,

barl0w
Hi,
 
I am trying to get dabatable with a column with checkboxes which should decide which row to pick from the data table; but I am always running in problems, because the checkboxes are created for each row, so i couldnt manage to get the value of  the checkbox which is selected:
 

<apex:dataTable value="{!ent}" var="contact" cellPadding="4" border="1" align="center">

<apex:column>

<apex:selectRadio value="{!which}">

<apex:facet name="header">Ent_ID</apex:facet>

<apex:selectOption itemValue="{!contact.name}">{!contact.name}</apex:selectOption>

</apex:selectRadio>

</apex:column>

 

Is there a way to create one checkbox in a column. If I put the the selectRadio tags out of the column tags nothing is displayed in the column.

 

Thanks in advance.

  • January 07, 2008
  • Like
  • 0