• TwEEk
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 11
    Questions
  • 13
    Replies
you can use CompileAndTestRequest to check that classes compile, which is great.

 

Is there a similar thing for checking that components and other items all compile successfully?

 

Like checking their dependancies/references exist, that the xml is correct, etc.
  • March 03, 2010
  • Like
  • 0
you can use CompileAndTestRequest to check that classes compile, which is great.

 

Is there a similar thing for checking that components and other items all compile successfully?

 

Like checking their dependancies/references exist, that the xml is correct, etc.
  • March 03, 2010
  • Like
  • 0

you can use CompileAndTestRequest to check that classes compile, which is great.

 

Is there a similar thing for checking that components and other items all compile successfully?

 

Like checking their dependancies/references exist, that the xml is correct, etc.

 

  • March 03, 2010
  • Like
  • 0

I need to call the compileandtest function.

 

I use the following code to login (note the username/password are from a sandbox)

 

 

ApexWSDL wsdl = new ApexWSDL();

SforceService sforce = new SforceService();
LoginResult result = sforce.login(Username, Password);

SessionHeader sh = new SessionHeader();
sh.sessionId = result.sessionId;
wsdl.SessionHeaderValue = sessionHeader;

 

If I do NOT set the URL, it leaves it set to: https://cs1-api.salesforce.com/services/Soap/s/17.0

 

and when I make the call CompileAndTest, it throws the following error: 


INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key

 

If I set it by using the following:

 

 

wsdl.Url = result.serverUrl;
/*
* results in:

* https://tapp0-api.salesforce.com/services/Soap/u/17.0/00DT0000000Gg4n
*/

 OR

 

wsdl.Url = result.metadataServerUrl;
/*
* results in:

* https://tapp0-api.salesforce.com/services/Soap/m/17.0/00DT0000000Gg4n
*/

Then when I make the call CompilAndTest it throws the following error:

 

"No operation available for request {http://soap.sforce.com/2006/08/apex}compileAndTest"

 

can somebody help here?

 

 

 


 

 

Message Edited by TwEEk on 03-02-2010 02:49 PM
  • March 02, 2010
  • Like
  • 0

I am writing my own deployment tool and I am at a point where I need the sandbox name.

 

Is there a way you can get the sandbox name?

 

Either through the SForceService or through an object (MetaDataWebservice)

 

Thanks

  • February 15, 2010
  • Like
  • 0

I currently work for an organisation who have chosen to use SalesForce.

 

We have two sandboxes.

 

We wish to migrate the entire org from sandbox to the next on a night by night bases at midnight, so this must be a completely automated process.

 

We will be using Ant, which will load the Data Migration Tool to migrate the data, which will be scheduled at 12AM daily.

 

When migrating workflows, I get errors, because workflow objects have "User" inside them. For example, outbound messages have an "User to send as" field which stores the Username. Another example is in tasks, there is a "Assigned To" field which again stores a Username.

 

Heres where the problem lies. When trying to push workflows to the destination sandbox, it errors because the user exists in the source sandbox, and not the destination sandbox. Furthermore, the user cannot be pushed into the destination, because the users must be globally unique to the entire salesforce database.

 

The obvious answer is, touch up the xml files after the pull from source sandbox and before the push to destination sandbox. But this needs to be an automated process.

 

Does anybody have a solution for this? Or even an application that can/will touch up xml accordingly.

 

 

  • December 23, 2009
  • Like
  • 0

I am trying to migrate the user accounts from one sandbox, to the next.

 

There are several custom feilds in the  user object, one of which has external ID turned on.

 

I can extract the users just fine. Except when I am upserting them, no record gets inserted:

 

ERROR com.salesforce.dataloader.client.PartnerClient - Errors were found on item ## 

ERROR com.salesforce.dataloader.client.PartnerClient - Error message:OC_User_ID__c not specified

 

This occurs for EVERY record, and non are inserted. Details about this custom field

 

Field Label: OC User ID

Field Name: OC_User_ID

Required: False

Unique: False

External ID: True

Default Value: [blank]

Length: 20

 

 

 

 As for the config file, The relevent stuff here:

 

<entry key="sfdc.entity" value="User"/>

<entry key="sfdc.externalIdField" value="OC_User_ID__c"/>

<entry key="process.operation" value="upsert"/>

<entry key="process.outputError" value="c:\dataloader\errorUpsertUsers.csv"/>

<entry key="process.outputSuccess" value="c:\dataloader\successUpsertUsers.csv"/>

<entry key="dataAccess.name" value="c:\dataloader\ExtractUsers.csv" />

<entry key="process.initialLastRunDate" value="2007-06-06T00:00:00.000-0800"/>

 

Inside ExtractUsers, the data is all there, The records all have an OC_User_ID__c entry.

 

Can somebody shed some light on this? Thanks

 

 

Message Edited by TwEEk on 12-20-2009 09:19 PM
  • December 21, 2009
  • Like
  • 0

How could you load up an output panel that doesnt bind at all UNTIL a button is pushed?

 

For example, I have the following

 

<apex:pageBlockButtons location="bottom">

<apex:commandButton value="Go" action="{!invokeService}" status="myStatus" rerender="myOutput" />

</apex:pageBlockButtons>

 

<apex:outputPanel id="myOutput">

<apex:actionStatus id="myStatus">

<apex:facet name="start">

Working...

  </apex:facet>

<apex:facet name="stop">

<c:myComponent />

</apex:facet>

</apex:actionStatus>

</apex:outputPanel>

 

The component "myComponent" contains a datatable. This datatable appears to render the component on load, and bind the datatable on load.

 

But I dont want this behavior. I want it to first render ONLY when the button is pressed.

 

Any ideas? 

 

 

Message Edited by TwEEk on 12-06-2009 08:50 PM
  • December 07, 2009
  • Like
  • 0
In a PageBlockSectionItem, I have two buttons:

<apex:pageBlockSection columns="1">

<apex:pageBlockSectionItem>

<apex:commandButton action="{!Submit}" value="Search" />

<apex:commandButton action="{!Submit}" value="Reset" />

</apex:pageBlockSectionItem>

</apex:pageBlockSection>

 

However the two buttons are spaced far appart and are not close side by side.


Putting them inside a "PageBlockButtons" tags will make this happen, however due to the required location of the buttons this is not an option.
 
Does anybody know how these two buttons can be pushed together?
 
 
Message Edited by TwEEk on 12-06-2009 03:46 PM
Message Edited by TwEEk on 12-06-2009 03:47 PM
  • December 06, 2009
  • Like
  • 0

Lets say I have 

 

 

<apex:component controller="myController"> <apex:attribute name="foo" type="String" /> //REST OF CODE HERE (IRRELEVENT)</apex:component

 

In the controller "myController", how do I retrieve the value of the page attribute "foo"?

 

This is a difficult topic to goole for, because a bunch of hits about different tag attributes come up. 

 

 

 

 

  • December 04, 2009
  • Like
  • 0

I am having trouble finding a simple way to take the value of an inputfield and use it to pass parameters to a custom component. For example

 

<apex:inputField id="textInput" />

<apex:commandButton value="Go" id="buttonGo" rerender="output" />

<apex:outputPanel id="output">

            <c:myCustomComponent />

</apex:outputPanel>

 

So what i'd like to be able to do, is on clicking the command button "buttonGo",  is take the value of inputfield "textinput" and pass it to the  customcomponent and then rerender it. I would also like not refresh the page - so putting it into the query string is not a solution in this case.

 

Any help would be appreciated.

  • December 03, 2009
  • Like
  • 0

I need to call the compileandtest function.

 

I use the following code to login (note the username/password are from a sandbox)

 

 

ApexWSDL wsdl = new ApexWSDL();

SforceService sforce = new SforceService();
LoginResult result = sforce.login(Username, Password);

SessionHeader sh = new SessionHeader();
sh.sessionId = result.sessionId;
wsdl.SessionHeaderValue = sessionHeader;

 

If I do NOT set the URL, it leaves it set to: https://cs1-api.salesforce.com/services/Soap/s/17.0

 

and when I make the call CompileAndTest, it throws the following error: 


INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing session key

 

If I set it by using the following:

 

 

wsdl.Url = result.serverUrl;
/*
* results in:

* https://tapp0-api.salesforce.com/services/Soap/u/17.0/00DT0000000Gg4n
*/

 OR

 

wsdl.Url = result.metadataServerUrl;
/*
* results in:

* https://tapp0-api.salesforce.com/services/Soap/m/17.0/00DT0000000Gg4n
*/

Then when I make the call CompilAndTest it throws the following error:

 

"No operation available for request {http://soap.sforce.com/2006/08/apex}compileAndTest"

 

can somebody help here?

 

 

 


 

 

Message Edited by TwEEk on 03-02-2010 02:49 PM
  • March 02, 2010
  • Like
  • 0

I am trying to migrate the user accounts from one sandbox, to the next.

 

There are several custom feilds in the  user object, one of which has external ID turned on.

 

I can extract the users just fine. Except when I am upserting them, no record gets inserted:

 

ERROR com.salesforce.dataloader.client.PartnerClient - Errors were found on item ## 

ERROR com.salesforce.dataloader.client.PartnerClient - Error message:OC_User_ID__c not specified

 

This occurs for EVERY record, and non are inserted. Details about this custom field

 

Field Label: OC User ID

Field Name: OC_User_ID

Required: False

Unique: False

External ID: True

Default Value: [blank]

Length: 20

 

 

 

 As for the config file, The relevent stuff here:

 

<entry key="sfdc.entity" value="User"/>

<entry key="sfdc.externalIdField" value="OC_User_ID__c"/>

<entry key="process.operation" value="upsert"/>

<entry key="process.outputError" value="c:\dataloader\errorUpsertUsers.csv"/>

<entry key="process.outputSuccess" value="c:\dataloader\successUpsertUsers.csv"/>

<entry key="dataAccess.name" value="c:\dataloader\ExtractUsers.csv" />

<entry key="process.initialLastRunDate" value="2007-06-06T00:00:00.000-0800"/>

 

Inside ExtractUsers, the data is all there, The records all have an OC_User_ID__c entry.

 

Can somebody shed some light on this? Thanks

 

 

Message Edited by TwEEk on 12-20-2009 09:19 PM
  • December 21, 2009
  • Like
  • 0

How could you load up an output panel that doesnt bind at all UNTIL a button is pushed?

 

For example, I have the following

 

<apex:pageBlockButtons location="bottom">

<apex:commandButton value="Go" action="{!invokeService}" status="myStatus" rerender="myOutput" />

</apex:pageBlockButtons>

 

<apex:outputPanel id="myOutput">

<apex:actionStatus id="myStatus">

<apex:facet name="start">

Working...

  </apex:facet>

<apex:facet name="stop">

<c:myComponent />

</apex:facet>

</apex:actionStatus>

</apex:outputPanel>

 

The component "myComponent" contains a datatable. This datatable appears to render the component on load, and bind the datatable on load.

 

But I dont want this behavior. I want it to first render ONLY when the button is pressed.

 

Any ideas? 

 

 

Message Edited by TwEEk on 12-06-2009 08:50 PM
  • December 07, 2009
  • Like
  • 0

I am having trouble finding a simple way to take the value of an inputfield and use it to pass parameters to a custom component. For example

 

<apex:inputField id="textInput" />

<apex:commandButton value="Go" id="buttonGo" rerender="output" />

<apex:outputPanel id="output">

            <c:myCustomComponent />

</apex:outputPanel>

 

So what i'd like to be able to do, is on clicking the command button "buttonGo",  is take the value of inputfield "textinput" and pass it to the  customcomponent and then rerender it. I would also like not refresh the page - so putting it into the query string is not a solution in this case.

 

Any help would be appreciated.

  • December 03, 2009
  • Like
  • 0