• shraddha kawane
  • NEWBIE
  • -2 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 19
    Replies
Hi All,

I am getting the below error on the click of javascript.
eror
Hi,

I have total 5 objects , i need to write a trigger & i am new to trigger basics ? can anyone help please:

Objects:
1. purchase order
2. Job
3. Variation
4.Job item
5.code
now the problem is:

1.Purchase order(D) is detail of Job(M)
2.Variation(D) is detail of Job(M)
3.Job item(D) is detail of Variation(M)
4. Code is Lookup to Job Item(field name is item code)

so I need to write a trigger update the field called Count on purchase order which will have the count of Job item where Item code is 12
Could anyone help me out how to achieve this using maps?
I have the following requirement :

object : Product
fields: 
1. New (checkbox)
2. Old ( checkbox)
3. Sold(checkbox)
4. Out of stock(checkbox)
5.Item (lookup to Itemsale)

object: Itemsale

1. New (checkbox)
2. Old ( checkbox)
3. Sold(checkbox)
4. Out of stock(checkbox)

how to write the trigger so that atleast one record of itemsale has "New" checked then it will update parent field "New" as checked?

Can anyone know how to share records using S2S integration by apex batch classes??
Question:
one object say Test is there having the following fields 
1. Name (auto number)
2. Status (picklist)
2. Completion date (date) 

My requirement is I want to send an email to user daily till following conditions are met??

1. Status = work in proress
2. Completion date (date) > Today()

how to achieve this by configuration only?? and how many workflows are required???

Question:
one object say Test is there having the following fields 
1. Name (auto number)
2. Status (picklist)
2. Completion date (date) 

My requirement is I want to send an email to user daily till following conditions are met??

1. Status = work in proress
2. Completion date (date) > Today()

how to achieve this by configuration only?? and how many workflows are required???

I have a SOQL Query that would execute to return results from a custom object.
The query runs successfully and resturns the desired results when executed.

In Spring 14 an issue came up in our managed package that the SOQL results are not displaying on a VF page where they did fine in Winter release.

We are using the apex:repeat to return a result set from a SOQL query.
Th VF page executes correctly but on the page I do not see any records displayed on the page.

If a look at the page source, I can see 4 Table rows are created but the data in the rows is blank.

Has anyone ran across this issue?

<apex:page showHeader="false" readOnly="true" controller="SpinController" action="{!checkGeneralAccess}">
<apex:composition template="SWPageTemplate" >
    <apex:define name="swTitle"><apex:outputLabel value="{!$Label.TItle_Homepage}"></apex:outputLabel></apex:define>
    <apex:define name="swContent">
        <p class="gv-eligible-vins-intro">You have&nbsp;<apex:outputText value="{!eligibleVINCount}" /> eligible VINs waiting for you to earn points.
            {!IF(eligibleVINCount > 0, 'Select a VIN .', 'ok!')}<br /><br /> ok!</p>
        <div class="gv-eligible-vins">
            <table>
                <thead><tr><th>VIN</th><th>Sales Date</th><th>Model </th></tr></thead>
                <tbody>
                <apex:repeat value="{!eligibleVINs}" var="retailUnit">
                    <tr>
                        <td><apex:outputLink value="{!$Page.Quiz}?vin={!retailUnit.VIN__c}"><apex:outputText value="{!retailUnit.VIN__c}" /></apex:outputLink></td>
                        <td><apex:outputText value="{0,date,MM'/'dd'/'yy}">
                                <apex:param value="{!retailUnit.OrderDate__c}" />
                            </apex:outputText>
                        </td>
                        <td><apex:outputText value="{!retailUnit.ModelDesc__c}" /></td>
                    </tr>
                </apex:repeat>
                </tbody>
            </table>
        </div>
    </apex:define>
</apex:composition>
</apex:page>

Today we’re excited to announce the new Salesforce Developers Discussion Forums. We’ve listened to your feedback on how we can improve the forums.  With Chatter Answers, built on the Salesforce1 Platform, we were able to implement an entirely new experience, integrated with the rest of the Salesforce Developers site.  By the way, it’s also mobile-friendly.

We’ve migrated all the existing data, including user accounts. You can use the same Salesforce account you’ve always used to login right away.  You’ll also have a great new user profile page that will highlight your community activity.  Kudos have been replaced by “liking” a post instead and you’ll now be able to filter solved vs unsolved posts.

This is, of course, only the beginning  and because it’s built on the Salesforce1 Platform, we’re going to be able to bring you more features faster than ever before.  Be sure to share any feedback, ideas, or questions you have on this forum post.

Hats off to our development team who has been working tirelessly over the past few months to bring this new experience to our community. And thanks to each of you for helping to build one of the most vibrant and collaborative developer communities ever.
 

I have some Radian 6 API keys. Please respond if you need one for your app.

 

Cheers

 

    So I am new to apex and salesforce and I have been going through a lot of apex.  I know all you experienced devs just cringed a little lol, dont wory I am not modifying anything.  Anyway, the code I am looking at is very sloppy from a styling standpoint.  There appears to be no structured way that the coders have stuck to in order to make the code easily readible.  There is no consistant use of tabbing or even consistancy in the amount of whitespace between words or blocks.  So I have also see, and this is the point of the post, a lot of lines that run on and on. All the code in the first example is shown below EXCEPT it is all one line.  So in order to see it you would have to horizontally scroll quite a bit.    

 

BusinessHours bHr = [Select b.WednesdayStartTime, b.WednesdayEndTime, b.TuesdayStartTime, b.TuesdayEndTime, b.TimeZoneSidKey, b.ThursdayStartTime, b.ThursdayEndTime, b.SystemModstamp, b.SundayStartTime, b.SundayEndTime, b.SaturdayStartTime, b.SaturdayEndTime, b.Name, b.MondayStartTime, b.MondayEndTime, b.LastModifiedDate, b.LastModifiedById, b.IsDefault, b.IsActive, b.Id, b.FridayStartTime, b.FridayEndTime, b.CreatedDate, b.CreatedById From BusinessHours b WHERE b.IsDefault=true AND b.IsActive = true LIMIT 1];

 

My question is, can a newline be entered after the comma that separates the fields in the query? I do not have the ability to test it for myself so I wanted to turn to you guys for assistance.  

what is email services?  what operations that we can perform by using email services?how we can do that.

 

please dont gove any LINKS  to read.... i  need  explanation to understand

How the formula will look like if you want to calculate the date/time difference b/w created date ?


Today() – datevalue(created date)

Now() – created date

DateValue(created date) – today()

Created date – Now()

Dynamic dashboard have schedule refresh?

a)true

b)false

how?


Custom objects in sites have which kind of permission ?
A. Read Only
B. Read, Create, Edit and Delete
C. Read and Create
D. Read, Create and Edit

explain?

Encrypted fields are editable regardless of whether the user has the “View Encrypted Data” permission.
A. True
B. False

explain?


A corresponding list view is also automatically created, When a queue is created in Salesforce.com.
A. True
B. False

explain?

Which of the following is not a correct statement ?
A. Tags can be enabled by enabling Tags permission for the Organization
B. Tags can be enabled by enabling Tags permission for the Profiles
C. Tags can be added on the Records
D. Tags can be accessed from the Sidebar component

What happens to the Secondary Relationship when the Primary Relationship is deleted in the Junction Object ?


A. Nothing Happens
B. Secondary Relationship becomes Primary Automatically
C. Secondary Relationship is made Primary manually
D. You can’t delete the primary relationship


Which of the following is not true regarding Custom Summary Formula fields ?
A. One can have 5 Custom Summary Formulas on a report
B. When fields are deleted, they are also deleted from the summary formulas that reference them
C. The summary types Sum, Largest Value, Smallest Value, and Average are not available for use with the Record Count Field
D. Summary formula can reference another summary formula


Default values can be set on the Dependent Picklist Fields ?
A. True
B. False

Hello,

 

I need some help creating a test class for the code below.  We are using Email to Case and we wanted to be able associate the Contact to the Case record.  I was able to find this code that allows us to do that using Email Services.  Please share any test class for this code. 

 

 

global class cases implements Messaging.InboundEmailHandler {

global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,
Messaging.InboundEnvelope env){

// Create an inboundEmailResult object for returning
// the result of the Force.com Email Service
Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();

String myPlainText = '';

// Initialize the Contact ID, so if no Contact is found, a case is still created
ID vconID;

// Add the email plain text into the local variable

try
{
myPlainText = email.plainTextBody.substring(0, email.plainTextBody.indexOf('<stop>'));
}
catch (System.StringException e)
{
myPlainText = email.plainTextBody;
System.debug('No <stop> in email: ' + e);
}

// new Case object to be created

Case[] newCase = new Case[0];

// Try to lookup any contacts based on the email from address
// If there is more than 1 contact with the same email address
// an exception will be thrown and the catch statement will be called
try {
Contact vCon = [Select Id, Name, Email
From Contact
Where Email = :email.fromAddress
Limit 1];

// Add a new Case to the contact record we just found above - if not Contact found, value remains null
vconID = vCon.ID;

// Insert the new Case and it will be created and appended to the contact record

System.debug('New Case Object: ' + newCase );
}
// If there is an exception with the query looking up
// the contact this QueryException will be called.
// and the exception will be written to the Apex Debug logs

catch (System.QueryException e) {
System.debug('Query Issue: ' + e);
}

newCase.add(new Case(Description = myPlainText,
Priority = 'Medium',
Status = 'New',
Subject = email.subject,
ContactId = vconID));
insert newCase;

// Set the result to true, no need to send an email back to the user
// with an error message

result.success = true;

// Return the result for the Force.com Email Service
return result;
}

static testMethod void testCases() {

// Create a new email and envelope object
Messaging.InboundEmail email = new Messaging.InboundEmail();
Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();

// Create the plainTextBody and fromAddres for the test
email.plainTextBody = 'Here is my plainText body of the email';
email.fromAddress ='shillyer@salesforce.com';

Cases caseObj = new Cases();
caseObj.handleInboundEmail(email, env);
}

}

  • September 18, 2012
  • Like
  • 0

Hi All,

 

I have posted some of the sample questions for 401 certification exam. Also how you can prepare for the exam.

Will soon post some more interesting topics related to certification exam.

 

Click for Smaple Questions

And How To Prepare

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

First question: What forum would be apropos for asking this.  I'm new here....

 

Actual problem:

I exported the Enterprise WSDL and tried to import it into an existing Serena Mashups (2009R2) application.  Mashups gave me an error "The Web Service cannot be used by the Application Engine because it contains a recursive type definition" and refused to complete the import.  No other diagnostics.

 

TIA

 

 

Hi All,

 

Does the Developer certification exam consist of multiple answer questions?

 

And can anyone suggest me what study material i have to go through for taking this test?

 

Thanks,

Sandeep

I have a chunk of code that works perfectly when querying the database once.  But, when I throw in a second query, I don't get any results.

 


$sfConnection = new SforcePartnerClient(); $mySoapClient = $sfConnection->createConnection(SALESFORCE_WSDL); $login = $sfConnection->login(SALESFORCE_USER, SALESFORCE_PASS);//$_POST['intUser'], $_POST['intPass']); $result = $login->userInfo; // Get account listing $qstr = "select Name,Industry,Id,Phone from Account where Name!='false'"; // Check for where filters by the length of the variable if(strlen($_POST['Userkey']) > 0) $qstr .= " and Name = '" . $_POST['Userkey'] . "'"; if(strlen($_POST['Password']) > 0) $qstr .= " and Site = '" . $_POST['Password'] . "'"; if(strlen($_POST['Status']) > 0) $qstr .= " and Industry = '" . $_POST['Status'] . "'"; if(strlen($_POST['FirstName']) > 0) $qstr .= " and FirstName = '" . $_POST['FirstName'] . "'"; if(strlen($_POST['LastName']) > 0) $qstr .= " and LastName = '" . $_POST['LastName'] . "'"; if(strlen($_POST['AccountID']) > 0) $qstr .= " and Type = '" . $_POST['AccountID'] . "'"; if(strlen($_POST['SecondaryPhone']) > 0) $qstr .= " and Rating = '" . $_POST['SecondaryPhone'] . "'"; if(strlen($_POST['PrimaryPhone']) > 0) $qstr .= " and Phone = '" . $_POST['PrimaryPhone'] . "'"; if(strlen($_POST['Fax']) > 0) $qstr .= " and Fax = '" . $_POST['Fax'] . "'"; if(strlen($_POST['Address1']) > 0) $qstr .= " and ShippingStreet = '" . $_POST['Address1'] . "'"; if(strlen($_POST['City']) > 0) $qstr .= " and ShippingCity = '" . $_POST['City'] . "'"; if(strlen($_POST['Region']) > 0) $qstr .= " and ShippingState = '" . $_POST['Region'] . "'"; if(strlen($_POST['PostalCode']) > 0) $qstr .= " and ShippingPostalCode = '" . $_POST['PostalCode'] . "'"; if(strlen($_POST['Country']) > 0) $qstr .= " and ShippingCountry = '" . $_POST['Country'] . "'"; // Query $accounts = $sfConnection->query($qstr); $records = $accounts->records; $qstr = "select Contact.Account.Name,Contact.Account.Industry,AccountId,Phone from Contact where Contact.FirstName!='false'"; // Check for where filters by the length of the variable if(strlen($_POST['Userkey']) > 0) $qstr .= " and Contact.Account.Name = '" . $_POST['Userkey'] . "'"; if(strlen($_POST['Password']) > 0) $qstr .= " and Site = '" . $_POST['Password'] . "'"; if(strlen($_POST['Status']) > 0) $qstr .= " and Industry = '" . $_POST['Status'] . "'"; if(strlen($_POST['FirstName']) > 0) $qstr .= " and FirstName = '" . $_POST['FirstName'] . "'"; if(strlen($_POST['LastName']) > 0) $qstr .= " and LastName = '" . $_POST['LastName'] . "'"; if(strlen($_POST['AccountID']) > 0) $qstr .= " and Type = '" . $_POST['AccountID'] . "'"; if(strlen($_POST['SecondaryPhone']) > 0) $qstr .= " and Rating = '" . $_POST['SecondaryPhone'] . "'"; if(strlen($_POST['PrimaryPhone']) > 0) $qstr .= " and Phone = '" . $_POST['PrimaryPhone'] . "'"; if(strlen($_POST['Fax']) > 0) $qstr .= " and Fax = '" . $_POST['Fax'] . "'"; if(strlen($_POST['Address1']) > 0) $qstr .= " and ShippingStreet = '" . $_POST['Address1'] . "'"; if(strlen($_POST['City']) > 0) $qstr .= " and ShippingCity = '" . $_POST['City'] . "'"; if(strlen($_POST['Region']) > 0) $qstr .= " and ShippingState = '" . $_POST['Region'] . "'"; if(strlen($_POST['PostalCode']) > 0) $qstr .= " and ShippingPostalCode = '" . $_POST['PostalCode'] . "'"; if(strlen($_POST['Country']) > 0) $qstr .= " and ShippingCountry = '" . $_POST['Country'] . "'"; // Query $accounts = $sfConnection->queryall($qstr); $records .= $accounts->records;

 


Any help would be appreciated.  Thanks.

 

Hi,

 

If you have to take an interview of any salesforce position, what all question could you ask ?

 

Salesforce Developer - Skills -Apex , Force.com API , AppExchange, S-Control .

 

 

Please feel free to ask any questions ?

 

Thanks

Message Edited by ronir on 02-04-2009 11:51 AM
Message Edited by ronir on 02-04-2009 11:55 AM
  • February 04, 2009
  • Like
  • 0
Hi,
 
I worte below apext triiger but have no idea how to write test case for this tigger. I tried to search around but didn't get idea..
 
Code:
trigger createRateIncreaseChange on Account (before update) {

    List<Rate_Increase_Tracker__c> rateIncrease = new List<Rate_Increase_Tracker__c>();
    
    for (Integer i = 0; i < Trigger.new.size(); i++) {
     
     if ( (Trigger.old[i].Ad_Package_Order_Activated_Date__c != Trigger.new[i].Ad_Package_Order_Activated_Date__c)) {

            rateIncrease.add(new Rate_Increase_Tracker__c(New_Contract_Term__c = '1', Account__c = Trigger.old[i].id));
           
        }
   
     }
     
     insert rateIncrease;
     
}

 
Thanks,
  • September 22, 2008
  • Like
  • 0
I have 2 objects 1 is Trig1__c,second one s Trig2__c......in Trig1__C i have a numberfield called No_of_Trig2__c(Numberfield)....so here what i need is if i enter the 10 in No_of_Trig2__c then 10 records should be created autometically in Trig2__c,......so here is my trrigger

trigger Cretaingrecontrig2 on Trig1__c (after insert) {
  List<Trig2__c>Listtri=New List<Trig2__C>();

  for(Trig1__c tr:Trigger.new){
        if(Trig1__c.No_of_Trig2__c!=null){
        for(integer i=0;i<Trig1__C.No_of_Trig2__c;i++){
            Trig2__c tri=New List Trig2__c();
            tri.id=tr.id;
            tri.Name=tr.Name;
        Listtri.add(tri);
  }
  if(!Listtri.Isempty()){
  insert Listtri;
  }
  }
  }
  }



so here the trigger is saved fine ...but the problem is while saving the record am getting below error

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Cretaingrecontrig2 caused an unexpected exception, contact your administrator: Cretaingrecontrig2: execution of AfterInsert caused by: System.TypeException: Invalid integer: common.apex.runtime.impl.ApexFieldToken@7bce7881: Trigger.Cretaingrecontrig2: line 6, column 1



what may be the problem