• Apex_Learner
  • NEWBIE
  • 25 Points
  • Member since 2011

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 11
    Replies
We recently changed the Domain setting to prevent logins from "login.salesforce.com".  Now ANT isn't working for us (neither retrieve or deploy)

Are the only possible values of SF.SERVERURL in an SF ANT scenario either "login.salesforce.com" or "test.salesforce.com" ?

How do you deploy to a production org if "my domain" is used and logins from "login.salesforce.com" are prevented?  

Entering "my domain" for the SF.SERVERURL value results in the error:  "....ID found in SessionHeader: Illegal Session"

(this was working fine on the same server before logins from login.salesforce.com were prevented)

I need to generate thousands of individual PDFs from multiple custom objects and download them to the user's computer.

 

I was thinking of using VF's RenderAs=PDF, saving the result as an Attachment, and then downloading the attachments via a webservice integration.

 

Is this a workable approach?  Will I run into a lot of limits with this?  The PDFs themselves should be small by the way, but they need to be individual files (this is a hard requirement that I can't change). 

 

Would creating new pdf Pages from Apex in a big loop without visually rendering the pages get past some of the SF limits on VF pages (file size, request duration, page etc) (?)

 

I also considered streaming the data (records)  to the user's PC from a webservice and then creating the PDFs on the user's computer - but was hoping to use SF for the PDF creation if at all possible.  I am using PDF creation software already for other portions of this project, but am again hoping to use SF as much as possible for the effort.

 

Any advice is most welcome....

I'm sure this is a beginner HTML question - I'm a novice at this anyway...

 

I'm using an actionstatus component to display an animated GIF when a long-running process is invoked by a button click.

 

But the GIF, when displayed, shifts other items in the same row (it's in a <table>) to the left, and when the animation is complete the other items in the row shift back.

 

I've played with the stop facet to try and size it to the same size as the GIF, but the only way I can seem to almost align the GIF version of the row with the non-GIF version is to use non-breaking spaces - and it's still not quite right -

 

What's the correct way to handle something like this?

 

Here's the relevant markup:

 

    <td>
        <apex:commandButton value="Search" action="{!doSearch}" reRender="results,msg" id="butSearch"
                            onclick="hideList();" oncomplete="showList();" status="pleasewait" />
    </td>
    <td>
        <apex:actionStatus id="pleasewait">
            <apex:facet name="start">
                &nbsp;<img src="{!$Resource.AjaxAnimation}" />
            </apex:facet>
            <apex:facet name="stop">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </apex:facet>
        </apex:actionstatus> 
    </td>      

 

 

Our users need to download multiple ContentDocument files, based on queries of related metadata (custom object) and/or file content (ContentVersion). 

 

And there could be 100s of such files that they want to download to their local computer based on one query....

 

We're replacing a  legacy system with SF, and that legacy system allows users to build such queries resulting in hundreds of files.  The legacy system then combines the files (along with a few standard report pages of the associated metadata) into a single (BIG) .PDF file which they then download to their local computer and print (or not) - so clicking hundreds of individual download links, giving a location/name for each file, would be quite tedious.  Users generally burn CDs with the PDF file - they don't normally print this much paper.

 

Any suggestions on how to do this, or something reasonably equivalent, in SF / VF?  

 

By the way, the users have Adobe Professional on their local computer, so if we could just get the files from SF into a single folder (or combine the file(s) into a single file or two) the users could then use Adobe to build their own PDF locally - I'm really interested in automating the download of ContentDocument file(s)  if at all possible...

I"m not 100% sure, but I think the change from Summer 12 to Winter 13 has broken something in one of our sandboxes.

 

Previously, a user's call to a "without sharing" class was successfully inserting rows into ContentDocumentLink, sharing a Chatter File with various Collaboration/Chatter Groups to which the user may or may not have belonged.  Presumably "without sharing" made this possible - it definitely was working in Summer '12.

 

The Winter '13 upgrade occured last week, and I just noticed that the class now only works for System Admins.  I'm not 100% sure this is a W'13 problem, because we're in developement mode and a lot of thigs are changing and I hadn't tested that code for a few days before the switchover.

 

Now with Winter 13, when  a non-Admin user (who used this class successfully in Summer '12) gets a message stating "Invalid ID Field.  You dont have permission to do this".  The error is thrown at the insert into ContentDocumentLink.

 

I don't see anything specific to ContentDocumentLink in the release notes that might explain this..

 

Any help would be most welcome...

In a trigger, a custom Datetime field is getting set to Datetime.now()

 

In the test class for the trigger, the logic is trying to ensure that this field gets set properly.

 

My approach was to create a Datetime object at the start of the test method, then insert the rows, gather the records inserted, and compare the Datetime field values to the object to ensure that they are on (or after) the object...

 

Logic somthing like this:       system.assert(DatetimeFieldValue >= DatetimeObjectValue);

 

This sometimes passes the test, and sometimes fails (it fails about 1/2 the time).

 

Woudl setting a Datetime object value in an Apex test method use a differnt "clock" than the Datetime field retrieved from a SOQL query? 

 

Is there a better way to set a starting date/time at the beginning of the test, and then ensuring that all rows modified by the test have DateTime values > = the starting date time (?)

When a content item is shared as "No Access", "Collaborator" or "Viewer" (as displayed on the platform's Sharing Settings dialog) - Are the object(s) recording this sharing accessible via API?

 

I need to bulk upload content  files, attach them to records, and "share" them when loaded to select users/groups based upon fields in the attached record.....Is this possible?

What object is used to store the results of users sharing files (associated with custom records) in the Chatter interface? 

 

I've reviewed the schema I can see from Eclipse, and I think I comprehend the FeedItem and *_Share objects, but I don't see how Force.com is storing whether a particular Content item is shared as "No Access", "Collaborator" or "Viewer" as displayed on the platform's Sharing Settings dialog

 

I have a fairly unusual business case involving large files attached to custom object records.  The Record itself should be visible to all, but the attached File should only be visible to some...I'm not sure this is even possible...

 

any guidance (or a  suggested approach)  is most welcome....

Using Eclipse Helios version 1.3, Java 1.6, and the Force.com IDE plugin (eclipse is also used for java development)

 

In my development environment, I can't seem to upgrade to API version 24, only version 23.  I've tried both updating from Eclipse and from the Force.com start page.

 

I'm sure i'm missing something obvious - any help is appreciated....

 

 

How do you join a  "recursive" object (returning values from two records in one row) using SOQL?

 

In UserRole for example, I'd like to show the Id, Name, and Name of the parent of the role (if any)

 

In SQL, it would be something like:

 

select Id, Name, (select Name from UserRole Y  where Y. Id=X.ParentRoleId) as TheParentRolesName

from UserRole X

 

Is there a SOQL equivalent?  Also, would the syntax vary between Standard and Custom objects?

I'm a beginner at this - so pardon me if I'm not stating this correctly, or if this isn't the correct board for this topic, but any help would be greatly appreciated.

 

I'm attempting to add records to the FeedItem object in a sandbox, using Java, the WSC-22 JAR and an enterprise WSDL.

 

After the first 2000 rows are inserted, the following exception gets thrown:

 

[UnexpectedErrorFault [ApiFault exceptionCode='REQUEST_LIMIT_EXCEEDED'

exceptionMessage='ContentPublication Limit exceeded.'

 

I've checked the "limits" in Administrative Reports and admin screens, and I am nowhere near the API call limit per day.

 

An excerpt of the Java code causing the error follows:

 

///////

FeedItem post=newFeedItem();

post.setParentId(sID);

post.setBody(sBody);

post.setContentFileName(sFName);

post.setContentData(byteFileContents);

try{

SaveResult[] result=conn.create(new SObject[] {post});

//the line above is throwing the exception after 2000 inserts

/////////

 

I see there's a 2000 "job" limit in the Bulk API, but accoridng to the status page, I haven't used any of the "jobs" at all.

 

We are considering a SAML SSO SF solution, because we already use an identity provider for other (non-SF)  applications.

 

But we also have a need for Web Service API calls for a few custom applications that we have built, one of which launches when the user clicks a custom button on a SF page.

 

1)  Is it generally good practice to set SF user account passwords to Never Expire when using SAML/SSO?

 

2)  I have a need to deploy WS API code to clients using our SF pages through SAML.  The code needs to run in the client browser (after they click a custom button using javascript).  If passwords are set to never expire, then I guess this policy would also apply to the general service/user account(s) designated as Web Service API only logins - and I would need to embed the account/password in the code?  If I read the docs correctly, WS API calls cannot use SSO/SAML, so a id / password (token) is required?

 

I guess I'm not sure if embedding a never-expiring password in that deployed code so it can seamlessly hit SF is a good idea (?) 

 

If the password is embedded, and it does expire, I'd like to avoid having to re-deploy that code again if at all possible...

 

Any general advice?

 

thanks

 

 

Is there a way for users to seamlessly edit content stored as chatter items without going through the "download/edit/upload" steps manually? 

 

For example, if a MS Word document is attached to a custom object's feed, is it possible that, with a single button click, the document is downloaded to the client (without prompting the user "where") and then immediately opened using the MS Word installed on the client?   If this is possible, I would like to provide features in MS Word to post the new version of the document back to SF. 

 

In essence, the user should be able to edit and save the document without worrying about where on their local drive it is stored as long as the session is still active.

 

If such a thing is possible, any guidance would be much appreciated.

 

What's the best way to create a table that is self-referencing.

 

If for example Record #1 is the parent of Records 2, 3 and 4, and Record #4 is the parent of Record #5, what's the best practice for representing this in SF (?)

 

Is it possible to store the SF "Id" field in the structure so that the children records can point back to their parent (?)  (one parent per child) (?)

 

Is there a better way to represent this in a SF custom object? 

 

Thanks...

Just starting out in VF, and I'm sure I'm doing something wrong, but I have 2 questions about global merges...

 

1)  The following code:

 

<apex:page >
<apex:outputText value="{!$Label.site.under_construction}"> 
    <apex:param value="MyWebSite" /> 
</apex:outputText>
</apex:page>

 

Renders as follows:

 

<i>MyWebSite</i> is under construction

 

Why are the <i></i> tags not being processed?

 

2)  Adding <script></script> tags seems to fix the problem:

 

<apex:page >

<script></script>
<apex:outputText value="{!$Label.site.under_construction}"> 
    <apex:param value="MyWebSite" /> 
</apex:outputText>
</apex:page>       

 

Renders as expected:

 

MyWebSite is under construction

 

Why do the script tags fix this?  Is the context changing when they are added?

 

I'm using the development mode if that matters... 

We recently changed the Domain setting to prevent logins from "login.salesforce.com".  Now ANT isn't working for us (neither retrieve or deploy)

Are the only possible values of SF.SERVERURL in an SF ANT scenario either "login.salesforce.com" or "test.salesforce.com" ?

How do you deploy to a production org if "my domain" is used and logins from "login.salesforce.com" are prevented?  

Entering "my domain" for the SF.SERVERURL value results in the error:  "....ID found in SessionHeader: Illegal Session"

(this was working fine on the same server before logins from login.salesforce.com were prevented)

Our users need to download multiple ContentDocument files, based on queries of related metadata (custom object) and/or file content (ContentVersion). 

 

And there could be 100s of such files that they want to download to their local computer based on one query....

 

We're replacing a  legacy system with SF, and that legacy system allows users to build such queries resulting in hundreds of files.  The legacy system then combines the files (along with a few standard report pages of the associated metadata) into a single (BIG) .PDF file which they then download to their local computer and print (or not) - so clicking hundreds of individual download links, giving a location/name for each file, would be quite tedious.  Users generally burn CDs with the PDF file - they don't normally print this much paper.

 

Any suggestions on how to do this, or something reasonably equivalent, in SF / VF?  

 

By the way, the users have Adobe Professional on their local computer, so if we could just get the files from SF into a single folder (or combine the file(s) into a single file or two) the users could then use Adobe to build their own PDF locally - I'm really interested in automating the download of ContentDocument file(s)  if at all possible...

I"m not 100% sure, but I think the change from Summer 12 to Winter 13 has broken something in one of our sandboxes.

 

Previously, a user's call to a "without sharing" class was successfully inserting rows into ContentDocumentLink, sharing a Chatter File with various Collaboration/Chatter Groups to which the user may or may not have belonged.  Presumably "without sharing" made this possible - it definitely was working in Summer '12.

 

The Winter '13 upgrade occured last week, and I just noticed that the class now only works for System Admins.  I'm not 100% sure this is a W'13 problem, because we're in developement mode and a lot of thigs are changing and I hadn't tested that code for a few days before the switchover.

 

Now with Winter 13, when  a non-Admin user (who used this class successfully in Summer '12) gets a message stating "Invalid ID Field.  You dont have permission to do this".  The error is thrown at the insert into ContentDocumentLink.

 

I don't see anything specific to ContentDocumentLink in the release notes that might explain this..

 

Any help would be most welcome...

In a trigger, a custom Datetime field is getting set to Datetime.now()

 

In the test class for the trigger, the logic is trying to ensure that this field gets set properly.

 

My approach was to create a Datetime object at the start of the test method, then insert the rows, gather the records inserted, and compare the Datetime field values to the object to ensure that they are on (or after) the object...

 

Logic somthing like this:       system.assert(DatetimeFieldValue >= DatetimeObjectValue);

 

This sometimes passes the test, and sometimes fails (it fails about 1/2 the time).

 

Woudl setting a Datetime object value in an Apex test method use a differnt "clock" than the Datetime field retrieved from a SOQL query? 

 

Is there a better way to set a starting date/time at the beginning of the test, and then ensuring that all rows modified by the test have DateTime values > = the starting date time (?)

Hey! :)

 

I added a ContentDocument trigger via Force.com IDE und wanted to include this trigger in my managed package.

I create a test method that should fire my trigger, which then calls a trigger handler class.

 

Now the problem:

 

Whe I run the test class, I see as a result, that 80-ish% of my trigger handler code has been covered. This means, the trigger did definitely fire!! But I can't see this trigger in the result list.

But the biggest problem is, that the packaging process aborts everytime with the reason, that the ContentDocument trigger has 0% test coverage.

 

I don't know what to do, it just appears to me, that the ContentDocument trigger has not been fully integrated by SFDC?

 

Any help is appreciated!

 

Best Regards,

 

Nisse

Using Eclipse Helios version 1.3, Java 1.6, and the Force.com IDE plugin (eclipse is also used for java development)

 

In my development environment, I can't seem to upgrade to API version 24, only version 23.  I've tried both updating from Eclipse and from the Force.com start page.

 

I'm sure i'm missing something obvious - any help is appreciated....

 

 

How do you join a  "recursive" object (returning values from two records in one row) using SOQL?

 

In UserRole for example, I'd like to show the Id, Name, and Name of the parent of the role (if any)

 

In SQL, it would be something like:

 

select Id, Name, (select Name from UserRole Y  where Y. Id=X.ParentRoleId) as TheParentRolesName

from UserRole X

 

Is there a SOQL equivalent?  Also, would the syntax vary between Standard and Custom objects?

I'm a beginner at this - so pardon me if I'm not stating this correctly, or if this isn't the correct board for this topic, but any help would be greatly appreciated.

 

I'm attempting to add records to the FeedItem object in a sandbox, using Java, the WSC-22 JAR and an enterprise WSDL.

 

After the first 2000 rows are inserted, the following exception gets thrown:

 

[UnexpectedErrorFault [ApiFault exceptionCode='REQUEST_LIMIT_EXCEEDED'

exceptionMessage='ContentPublication Limit exceeded.'

 

I've checked the "limits" in Administrative Reports and admin screens, and I am nowhere near the API call limit per day.

 

An excerpt of the Java code causing the error follows:

 

///////

FeedItem post=newFeedItem();

post.setParentId(sID);

post.setBody(sBody);

post.setContentFileName(sFName);

post.setContentData(byteFileContents);

try{

SaveResult[] result=conn.create(new SObject[] {post});

//the line above is throwing the exception after 2000 inserts

/////////

 

I see there's a 2000 "job" limit in the Bulk API, but accoridng to the status page, I haven't used any of the "jobs" at all.

 

Hello,

I am newbie to salesforce.com.

From a client app, I am trying to login into SFDC using SFDC10API.jar WITHOUT salesforce.com username/password.

Instead, my client application have {!$Api.Session_ID} and {!$Api.Partner_Server_URL}

 

Is there a way, I can login into SFDC just using {!$Api.Session_ID} and {!$Api.Partner_Server_URL} from client app.

 

Thanks

Viippy!!

  • November 11, 2010
  • Like
  • 0