• Ashan
  • NEWBIE
  • 110 Points
  • Member since 2011

  • Chatter
    Feed
  • 4
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 45
    Replies

Hi, I am trying to create a trigger to start an approval process after insert if a certain field is checked - we are getting this save error: 'Expression cannot be assigned'

 

 

MDFSubmitForApproval on MDF__c (after insert) {

for (MDF__c a : trigger.new) {


if (MDF__c.Submitted__c = 'true') {


Approval.ProcessSubmitRequest app = new Approval.ProcessSubmitRequest();app.setObjectId(a.id);
Approval.ProcessResult result = Approval.process(app);
}
}
}

 

Not sure where we are going wrong with this?  Any help much appreciated.

  • September 01, 2011
  • Like
  • 0

Hi,

Please tell me how to create a custom table with 10 columns. 

Thanks 

Anu

  • August 24, 2011
  • Like
  • 0

 Hello,

I have an problem. I try to use data table apex function in my page, but show me empty always. The controller return good data, but something happens in "apex:dataTable". This is my code:

<apex:page controller="exampleCon" cache="false">
  <apex:dataTable value="{!contacts}" var="c" id="theTable" rowClasses="odd,even" styleClass="tableClass">

        <apex:column><apex:facet name="header">Name</apex:facet>
            <apex:outputText value="-{!c.Name}"/>
        </apex:column>

        <apex:column>
            <apex:facet name="header">Phone</apex:facet>
            <apex:outputText value="-{!c.Phone}"/>

        </apex:column>

    </apex:dataTable>

</apex:page>


And my controller:

public class exampleCon {

    List<Contact> contacts;

    public List<Contact> getcontacts() {
        contacts = [select Name, Phone from Contact limit 10];     
        return contacts;
    }
}


Thanks.

  • August 18, 2011
  • Like
  • 0

hiii.............

 

I am working on website integration with salesforce using SOAP API and converted the enterprise.wsdl file into enterprise.jar file which is having many classes..... How and where to use these classes I dont know can any one help me regarding that..........

 

 

Thanks in advance.........

Hi All,

Can we use data in the development org when writing test classes.

Deployment is done using eclipse. will the deployment fail if if we depend on data on developer org ?

Thanks

  • February 14, 2013
  • Like
  • 0

Hi All,

 Is the value of code coverage given by "Estimate your organization's code coverage" represents the complete code coverage of the org ? It seems that percentage shown is only for the classes which have at least more than 0% code coverage.

Thanks

  • February 13, 2013
  • Like
  • 0

Hi All

Is there a way to get the number of api requests for a given period, not for last 24 hours or last 7 days?

 

And what is meant by last 7 days in "API Calls Made Within Last 7 Days" standard report. ?

Is it 7 days behind current time or

7 days behind todays 12:00 am.

  • January 09, 2013
  • Like
  • 0

Hi All,

What can we achive by using cast iron for intregating salesforce.

Does it used to synchronize table in other systems with salesforce.

Or can it be used to communicate with apex web services ?

Thanks

  • October 02, 2012
  • Like
  • 0

What does it meant by "Force.com native connector" ?

Is there a such connector for SAP systems?

 

  • September 25, 2012
  • Like
  • 0

Hi All,

What is the best approach for intrgrating salesforce with SAP ?

Thanks

Amila

  • September 25, 2012
  • Like
  • 0

Hi,

When i run a security review for my app it marks classes using without sharing keyword as serious security risk.

Does this mean that we cant use without sharing classes ?

  • August 10, 2012
  • Like
  • 0

Hi,

 

what is meant by "OEM Partner Programs".

 

 Thanks

 

  • August 10, 2012
  • Like
  • 0

Hi All,

Does eclipse saves to the server counts as API usage in the salesforce org?

Thanks

  • June 01, 2012
  • Like
  • 0

Hi All,

This is regarding the force.com dev 401 certification

Do we get questions related to Opportunity, Lead, Accounts, Cases (CRM objjects) for this exam

Thanks

  • May 01, 2012
  • Like
  • 0

Hi All,

Does any one has an idea on what this message means

Element value must resolve to a String type
  • February 06, 2012
  • Like
  • 0

Hi,

Is there a limit for maximum number of classes in force.com

Thanks.

  • January 04, 2012
  • Like
  • 0

Hi All,

How can we make salesforce to send the user creation email to user when we create a user from apex code.

I could send the Reset Password mail using System.ReSetPassword method.

But when we used it Email says that

your password has been reset.

  • November 22, 2011
  • Like
  • 0

Hi,

If some one has an experience on Active Directory SSO for salesforce, please let me know the steps i should follow. I think i can use ADFS for that.

  • November 06, 2011
  • Like
  • 0

Can we make a trigger to run at a user logout,login or session end. Does the user object gets updated in above events.

  • October 24, 2011
  • Like
  • 0

Is it possible to show related lists for a object an a approval request view page ?

  • September 29, 2011
  • Like
  • 0

I'm having two custom objects Employee and Company.

Employee has a company.

Company has address and email fields.

Can i get the Company.address and Company.email of a employee to a Mail Merge Template which is generated for a Employee ?

  • September 26, 2011
  • Like
  • 0

Is there a way to validate my check box field , in order to keep only one of all objectes should have the field ticked?

  • September 22, 2011
  • Like
  • 0

When I try to call PageReference.getContent() from a trigger, I get the following error.

 

Getting content from within triggers is currently not supported.

 

Do anyone have a solution for this?

  • September 21, 2011
  • Like
  • 0

Is there a possibillity of assigning page layouts to record types through meta data api?

  • September 15, 2011
  • Like
  • 0

Hi All,

 Is the value of code coverage given by "Estimate your organization's code coverage" represents the complete code coverage of the org ? It seems that percentage shown is only for the classes which have at least more than 0% code coverage.

Thanks

  • February 13, 2013
  • Like
  • 0

Hi All,

This is regarding the force.com dev 401 certification

Do we get questions related to Opportunity, Lead, Accounts, Cases (CRM objjects) for this exam

Thanks

  • May 01, 2012
  • Like
  • 0

Hi All,

Does any one has an idea on what this message means

Element value must resolve to a String type
  • February 06, 2012
  • Like
  • 0

Hi All,

How can we make salesforce to send the user creation email to user when we create a user from apex code.

I could send the Reset Password mail using System.ReSetPassword method.

But when we used it Email says that

your password has been reset.

  • November 22, 2011
  • Like
  • 0

Can we make a trigger to run at a user logout,login or session end. Does the user object gets updated in above events.

  • October 24, 2011
  • Like
  • 0

Is there a way to validate my check box field , in order to keep only one of all objectes should have the field ticked?

  • September 22, 2011
  • Like
  • 0

When I try to call PageReference.getContent() from a trigger, I get the following error.

 

Getting content from within triggers is currently not supported.

 

Do anyone have a solution for this?

  • September 21, 2011
  • Like
  • 0

im getting a http response in the form of JSON array,, is there any support for parsing it in apex class.

I have a some apex classes which i want to install as a package to a another org.

And there are some custom fields which are reffered by these classes.

They already exist in the org which i'm going to install the package.

So when i try to install it gives a duplicate error.

Is there any way to remove these custom fields from the package or overwrite the existing fileds.

  • September 05, 2011
  • Like
  • 0

What would the syntax be for the following requirement in SOQL?

 

I have threee fields:

1. First Name

2. Last Name

3. Description (Long Text Area)

 

I need to get all names which have the word 'Developer' (or any keyword) in the 'Description' Long Text area. I have hit the wall trying to use the keywords 'contains' or 'includes' without success. Doesn anyone know how to build a SOQL using these both keywords?

 

Any help much appreciated.

Hi, I am trying to create a trigger to start an approval process after insert if a certain field is checked - we are getting this save error: 'Expression cannot be assigned'

 

 

MDFSubmitForApproval on MDF__c (after insert) {

for (MDF__c a : trigger.new) {


if (MDF__c.Submitted__c = 'true') {


Approval.ProcessSubmitRequest app = new Approval.ProcessSubmitRequest();app.setObjectId(a.id);
Approval.ProcessResult result = Approval.process(app);
}
}
}

 

Not sure where we are going wrong with this?  Any help much appreciated.

  • September 01, 2011
  • Like
  • 0

So here's the thing, I realize that salesforce does not support the running of getContentAsPDF from a trigger -- which consiquently, is a royal pain. That said, I decided to embark on a journey to accomplish the task anyway. I've gone a bit into it, and had some success, but wanted to share with some other apex coders that are more versed than I the result, hoping to see if anyone can lend some extra ideas/insight to accomplish this.

 

Thus far, I've been able to actually run the getcontentasPDF as the reslt of a trigger, however, I've been stonewalled in that the returned document is blank (it's a PDF with nothing in it). I've tried it two different ways, and have gotten the same result (blank PDF). So my question is, any ideas on how to make it so the returned PDF is not blank (when you view the VF page normally, it shows properly) or am I stuck?

 

The two ways I am able to run getContentAsPDF:

 

1) When the trigger runs, I have a class that has a function that runs the getContentAsPDF function as a @future method. This works but has the issue of returning a blank pdf.

 

2) Thinking that was their systems way of blocking it, I decided to do a more convoluted and tricky route. The second method is from the trigger I call a visualforce page that has an autorun function that calls getContentAsPDF. This also works successfully, but again, the returned PDF is blank.

 

Any one have any ideas as to why the PDF may be turning up blank?

 

Thanks for any input!

When I render a vf page normally with Chinese characters on it, everything works fine.  If I attempt to render it as a PDF however, the Chinese characters are skipped.
 
The challenge here is that we are rolled out globally, with hundreds of users in China.  A number of accounts and contacts are entered in Chinese. 
 
page rendered as HTML:
 
 
 
page rendered as PDF, missing the Account Name:
 
 
 
 
Is there any way to support multi-character sets when rendering to a PDF?
 
Jon Keener