• k2sfdev
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 10
    Replies

Hi,

 

I'm making a  text file by using String and Blob, then save it as a Document.

 

My problem is that the file need to end at a special character 'EOF' . 

 

chr(26)

 

String s = 'text blar blar ' + '\r\n' + (Eof?)

 

How do I complish that?  Any comments are welcomed.

 

 

 

 Thanks

Who can explain this?

 

visual page:

 

<apex:page controller="TestBinding" >

<apex:form>

<apex:pageBlock title="Test Binding">

<apex:pageblockButtons>

<apex:commandButton value="Login"/>

</apex:pageblockButtons>

<apex:pageblockTable value="{!Accounts}" var ="a">

</apex:pageblockTable>

</apex:pageBlock>

</apex:form>

</apex:page>

 Controller

 

 

public class TestBinding {

public List<Account> getAccounts(){

List<Account> li = new List<Account>();

return li;

}

}

 Apex log:

 

 

10:20:11 DEBUG -

***Begining Page Log for /apex/TestBinding 20090901152010.938:

External entry point: returning LIST:SOBJECT:Account from method public LIST:SOBJECT:Account getAccounts() in 0 ms 20090901152010.938:

External entry point: returning LIST:SOBJECT:Account from method public LIST:SOBJECT:Account getAccounts() in 0 ms

Cumulative profiling information: No profiling information for SOQL operations.

No profiling information for SOSL operations.

No profiling information for DML operations. 1 most expensive method invocations: Class.TestBinding: line 2, column 25:

public LIST:SOBJECT:Account getAccounts(): executed 2 times in 0 ms  

***Ending Page Log for /apex/TestBinding?core.apexpages.devmode.url=1

 Any idea to avoid calling getAccounts twice?

 

 

 

 

 

Message Edited by k2sfdev on 09-01-2009 08:35 AM
  • September 01, 2009
  • Like
  • 0

 

 

I want to implement my own sObject which has similar functionality to

company profile => Holidays => Recurring Holiday

 

I was wondering if I could get the source code of Visual page and apex controller of it?

If so, it will save me tons of time.

 

thanks

 

Here is my SOQL query which is Not returning Records At all for SubQuery items (Matters).

Contact[] contacts = [Select Debits__c, Credits__c, Name,
(Select Id, Actual_Expenses__c, Contact__c, Name From Matters__r Where ID IN : mat_ids)
From Contact
Where ID IN : con_ids];
Matter__c[] ms = [Select Id, Actual_Expenses__c, Contact__c, Name From Matter__c Where ID IN : mat_ids];

 

con_ids & mat_ids are SET<ID> variable instances. And they Both hold a value each. I can see the values in debug.

 

I have 1 Contact record with 1 Matter (a Custom Object with a Lookup field Contact). And to be sure of permisisons to my understanding are all set correct Since, Owner of Contact record and Contact's Account Owner and Matter Records Owner are All Same User.

Now, in above queries:

for (Contact c : contacts) {
... c = Contact Record values are returned here.
... c.Matters__r = EMPTY. No record is returned here.
}

...
...
...

ms = Returns the Record correctly.

 

Why the record is not returned in first query ... but is returned in second query .. Anyopne got any idea of this ... ? plz ...

 

 

Both queries are Executed in a Trigger.

 

 

Record values are these:

 

mat_ids : (a008000000DRR5LAAX)

con_ids : (0038000000j0HUJAA2)

ms : (Matter__c:{Name=XXXXX, Contact__c=0038000000j0HUJAA2, Id=a008000000DRR5LAAX})

c : (Contact:{Name=YYYYY, Credits__c=0.00, Id=0038000000j0HUJAA2, Debits__c=0.00})

c.Matters__r.size() : 0

Message Edited by vchaddha on 09-04-2009 11:27 AM
  • September 04, 2009
  • Like
  • 0

<apex:commandButton onclick="return confirm('Are you sure?')" action="{!myaction}" value="Do This!" />

 

Previously, it would ask if you wanted to confirm your action, and then do it. As of a day or two ago, using this exact method causes it to not perform the action. Removing the onclick causes it to work correctly again. Anyone else having this problem?
  • September 01, 2009
  • Like
  • 0

Who can explain this?

 

visual page:

 

<apex:page controller="TestBinding" >

<apex:form>

<apex:pageBlock title="Test Binding">

<apex:pageblockButtons>

<apex:commandButton value="Login"/>

</apex:pageblockButtons>

<apex:pageblockTable value="{!Accounts}" var ="a">

</apex:pageblockTable>

</apex:pageBlock>

</apex:form>

</apex:page>

 Controller

 

 

public class TestBinding {

public List<Account> getAccounts(){

List<Account> li = new List<Account>();

return li;

}

}

 Apex log:

 

 

10:20:11 DEBUG -

***Begining Page Log for /apex/TestBinding 20090901152010.938:

External entry point: returning LIST:SOBJECT:Account from method public LIST:SOBJECT:Account getAccounts() in 0 ms 20090901152010.938:

External entry point: returning LIST:SOBJECT:Account from method public LIST:SOBJECT:Account getAccounts() in 0 ms

Cumulative profiling information: No profiling information for SOQL operations.

No profiling information for SOSL operations.

No profiling information for DML operations. 1 most expensive method invocations: Class.TestBinding: line 2, column 25:

public LIST:SOBJECT:Account getAccounts(): executed 2 times in 0 ms  

***Ending Page Log for /apex/TestBinding?core.apexpages.devmode.url=1

 Any idea to avoid calling getAccounts twice?

 

 

 

 

 

Message Edited by k2sfdev on 09-01-2009 08:35 AM
  • September 01, 2009
  • Like
  • 0

Hi,

 

I tried to invoke method in the controller Extension class from <apex:actionSupport> tag. Also, pass

 

a parameter using <apex:param>.

 

I got the error saying: the method does not exist in the Standard controller.

 

Is it not possible to invoke the above way? If we can't, is there any way to achieve this.

 

Please help.  Appreciate your time reading the post.

 

Thanks!

 

Hi,

 

I want to build custom page that has a link "del and Edit" like what we have in standerd detail list section of any objects like lead.

 

If Del link is clicked than i want one confirmation dialog box and after saying yes then records should be deleted.

 

I unable to create java script dialog box can some one any IDEA..:)

 

Thanks all,

Deepak 

We have an external license key server that we use to fill in a license key field on Assets. The license key server is only able to return one license key at a time. The getLicenseKey function is called from a trigger and iterates through the Assets, returning a license key for each. However, if we run the trigger for anymore than 10 Assets we hit the 10 callouts governor limit.

 

Is there any way to avoid this governor limit by splitting the code into multiple Apex transactions somehow? 

 

 

I want to implement my own sObject which has similar functionality to

company profile => Holidays => Recurring Holiday

 

I was wondering if I could get the source code of Visual page and apex controller of it?

If so, it will save me tons of time.

 

thanks

 

I have controller method which is executed when the user selects a name from th lookup contact

on a visual force page. I want the SOQL query to get the email from the parent contact object based

on the name he selected from contact object...how should my query look like?

 

Here is how my controller class looks like but the query in test() is not doing the job. please help.

 

public class customObjectExtension {

 

private final customObject request{get; private set;}

public String employeeEmail = null;

 

 

public customObjectExtension(ApexPages.StandardController stdController) { this.request = (customObject)stdController.getRecord();

}

public String getEmployeeEmail() {

return employeeEmail;

}

public void setEmployeeEmail(String email) {

employeeEmail = email;

}

public PageReference Test(){

Contact info = [Select Email from Contact where

Contact.Name =: request.Employee_Name__r.Name] ;

employeeEmail = info.Employee_Name__r.Email;

return null;

}

}