• kresho
  • NEWBIE
  • 204 Points
  • Member since 2011

  • Chatter
    Feed
  • 7
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 39
    Replies

I am getting an error while creating the project in eclipse kepler on Ubuntu linux machine. 

 

Error is Unable to create package manifest.

 

Exception: java.lang.ClassCastException:com.salesforce.ide.api.metadata.types.<etadata$JaxbAccessorF_fullName cannot be casr to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.

I have written following javascript function for some processing.

 

In js method have more than 15 parameters to pass to Controller using Saveaccount actionFunction.

<apex:actionFunction name="Saveaccount" action="{!createSavedSearch}" ">

<apex:param assignTo="{!text1}" value=""/>

.

.

.

.

.

.

<apex:param assignTo="{!text15}" value=""/>

 </apex:actionFunction>  

 

function save(){

 

Saveaccount($('.text1').html().replace('%',''),$('.text2').html().replace('%',''),$('.text3').html().replace(/[^\d]/g,''),$('.text4').html().replace(/[^\d]/g,''),
$('.text5').html().replace('x',''),$('.text6').html().replace('x',''), $('.text7').html(),$('.text8').html(),$('.text9').html().replace('%',''),
$('.text10').html().replace('%',''),$('.text11').html(),$('.text12').html(),$('.text13').html(),$('.text14').html(),$('#text15').val()
);

 

}

 

 

How to use  data structure - a map (hash), a JS object, or a custom class in above save method?

How  to improve this action function and it's associated JS and Apex code, calling it with one parameter?

Hi,

 

I'm a little confused about this question because I got different answers from different sources.

 

At a recent SF event, I asked the instructor if we could grandfather M-D relationships. What I meant was that a child can be a master of another object.

 

The answer was yes, with limiting factors on Roll-Up Summanries.

 

However, I tried this by creating a new object and then trying to  use it as a child of an object that already was a child of another, and the option is grayed out.

 

Also, in Jason Ouellette's excellent book "Development with the Force.com Platform", on page 41 paragraph 3:

 

"Up to four nested levels of Master-Detail relationships can be created, counting from the master object to the most deeply nested child object".

 

What's the deal?

 

Thank you in advance..

 

Frank Mamone

Certified Developer SP 13

Hi There, 

 

I'm new to APEX and I'm struggling to get some code working.  I wanted to make it nice and neat and do things right rather than swamping it all with for loops etc.  A single Slot__c record will be created and them I'm looking to insert a list of records into a child object (master detail).

 

My code below goes off and returns a list of Treatment__c records and inserts into a map.  All is well so far.  I am now struggling with the following:

 

1. The trigger fires after the creation of a Slot__c record.  For each inserted parent I would like to also insert the Slot__c.Id value into a variable within the Map so I can relate the child record to it's parent upon insertion.

 

2. My SOQL query WHERE clause has duration hard coded to <= '100'.  I would like to include the Slot__c.Duration field from the Parent Record here instead.

 

3. I then want to take my map and insert all these records into an object Available_Treatments__c.  I'm struggling to do this as well.

 

I'm pretty new to all this, so help would be appreciated.  I may well be over complicating it.

 

trigger InsertAvailableTreatments on Slots__c (after insert) {

 

Map<id,List<Treatment__c>> mapTreatmentObj = new Map<id,List<Treatment__c>>();
for(Treatment__c tr : [SELECT Id, Name, Account__c, Duration__c FROM Treatment__c WHERE Duration__c <= '100']) {
List<Treatment__c> treatmentsForKey = mapTreatmentObj.get(tr.Id);
if (treatmentsForKey == null) {
treatmentsForKey = new List<Treatment__c>();
mapTreatmentObj.put(tr.Id, treatmentsForKey);
}
treatmentsForKey.add(new Treatment__c( Id = tr.Id, Name = tr.Name, Duration__c = tr.Duration__c, Account__c = tr.Account__c ));
System.Debug('Name' + tr.Name);
}

}

 

     Hi,

 

     I have a confusion in these lines about the ApexPages 

 

      ApexPages.currentPage().getParameters().get('id') --->  wt is ApexPages in this line ?

 

     Apexpages.standardcontroller ---> wt is Apexpages here ?

 

 

   Help is greatly Appreciated.

 

 

 

 

  • June 23, 2013
  • Like
  • 0

I am having an issue researching if it is possible to do a Parent to Child SOQL Query from User to Events. I can't find a chils relationship name to use, qould anybody know if that's possible or what is the relationship name? Here is my query so far:

 

SELECT User.id, User.Name, (Select id, Description, EndDateTime, StartDateTime, Subject, WhatId from Events) FROM User

 

I know there must be a chils relationship as an Event has a ownerid field which relates to User right?

 

I get the following error when I run the query above:

 

Didn't understand relationship 'Events' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.

 

Thanks in advance for your help!

I have a list of objects and I need to be able to remove a specific object from the list. I've been trying to remove it by the ID or the object itself but neither seem to be working. 

 

I've seen it suggested on here that the best practice is to just move everything to a new list and exclude the unwanted object, but this list can be changed as many times as the user changes their mind which could get ugly fast. Is there no better solution?

 

Thanks!

Phil

Apex Editor LS is a free alterantive to the Force.com IDE apex editor.

New features in version 1.2:

- Support for Force.com IDE v33.0
- Updated the grammar with the latest changes in the language
- Optimised AST caching and memory usage - should be less memory hungry
- Debounced "Mark occurrences" - when you move the cursor through the file rapidly, the feature will not respond to each cursor move, allowing a smoother experience.
- Reduced the download size

Check out all the features at http://multimodus.hr/apex-editor-ls.html

Apex Editor LS is a free alterantive to the Force.com IDE apex editor.

New features in version 1.1:

 

- Mark occurrences feature - highlight all occurrences of a symbol

- Show dialog to associate .cls and .trigger files with Apex Editor LS
- Improved speed and removed locks of pre-parser. Faster startup
- Added hover for error markers in editor
- Fixed NPE when viewing a file from history or version repository
- When typing semicolon and open brace, they will be placed after current statement
- Fixed CME when doing rapid undos
- Improved content assist

 

Check out all the features at http://multimodus.hr/apex-editor-ls.html

Apex Editor LS is a free alterantive to the Force.com IDE apex editor.

New features in version 1.0.8:

- Show declaration and documentation in tooltip when hovering over a reference.
- Improved jump to declaration and navigation back to the starting point (F3)
- Auto closing of angle brackets (parametrised types)


Check out all the features at http://multimodus.hr/apex-editor-ls.html

  • February 17, 2013
  • Like
  • 0

Apex Editor LS is a free alterantive to the Force.com IDE apex editor. 

 

New features in version 1.0.7:

- Go to declaration command (F3)
- Contextual syntax coloring - soql and sosl statements' keywords as colored as keywords only inside query statements.
- Auto closing of apostrophes, brackets, braces and parentheses.
- Auto closing comments.
- Smart auto-indent.

 

Check out all the features at http://multimodus.hr/apex-editor-ls.html

 

I'm looking for volunteers/beta testers to test in various environments and versions of eclipse, and to give feedback on features.

  • February 05, 2013
  • Like
  • 0

Apex Editor LS is an alternative eclipse editor plugin for the SalesForce.com Apex language.

 

Latest new feature: Objects and object fields support in content assist.

 

Visit plugin home page for full info.

  • February 27, 2012
  • Like
  • 0

Apex Editor LS is an alternative eclipse editor plugin. This release is quite limited in features, but demonstrates solid groundwork for future development. My goal is to bring some of the Java tools' goodness to Apex. See the plugin's home page at http://www.multimodus.hr/apex-editor-ls.html

  • December 29, 2011
  • Like
  • 0

Apex Editor LS is an alternative eclipse editor plugin. This release is quite limited in features, but demonstrates solid groundwork for future development. My goal is to bring some of the Java tools' goodness to Apex. See the plugin's home page at http://www.multimodus.hr/apex-editor-ls.html

  • December 29, 2011
  • Like
  • 0

Hi, we need to get campaigns to work with Accounts instead of contacts or leads. We need to be able to directly add accounts, and we need accounts to be able to be "campaign members" directly - not through contacts or leads. I realize this will likely involve some customization, but I have no idea what level of customization we are looking at. Can anyone suggest a way forward? The less customization the better. Thanks!

Anyone is offering Dev 501 training then let me know.

I am not going to salesforce for training. They are too expensive.

If any other option then let me know .

 

 

Thanks in Advance.

Hi

 

I have a formula which is exceeding 5000 characters when compiling.

 

I used AccountMAnager__r.Firstname+' '+AccountMAnager__r.Lastname in the formula. I see that there is Name standard field on User object. This field is not accessible in Formula field.

 

Is there any way to reduce my formula characters while compiling. Please help.

 

Thanks

 

 

 

Hi,

 

I am developing an application in which on one of the pages i am going to capture an Image/picture using the Web Camera attached to the computer. I don't know how to do this can you please help me with this.

 

Thanks,

Akash Diwan

Hi,

 

I want to implement a VF Page for all Mobile Apps.Means we are not able to see some VFs in Touch-pads(Iphone,Android etc..).

Is any code there for like HTML-5 or any etc..or is it possible to do?

Hi,

 

I want to implement a VF Page for all Mobile Apps.Means we are not able to see some VFs in Touch-pads(Iphone,Android etc..).

Is any code there for like HTML-5 or any etc..or is it possible to do?

 

Thanks in advance.

I am getting an error while creating the project in eclipse kepler on Ubuntu linux machine. 

 

Error is Unable to create package manifest.

 

Exception: java.lang.ClassCastException:com.salesforce.ide.api.metadata.types.<etadata$JaxbAccessorF_fullName cannot be casr to com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.

I have written following javascript function for some processing.

 

In js method have more than 15 parameters to pass to Controller using Saveaccount actionFunction.

<apex:actionFunction name="Saveaccount" action="{!createSavedSearch}" ">

<apex:param assignTo="{!text1}" value=""/>

.

.

.

.

.

.

<apex:param assignTo="{!text15}" value=""/>

 </apex:actionFunction>  

 

function save(){

 

Saveaccount($('.text1').html().replace('%',''),$('.text2').html().replace('%',''),$('.text3').html().replace(/[^\d]/g,''),$('.text4').html().replace(/[^\d]/g,''),
$('.text5').html().replace('x',''),$('.text6').html().replace('x',''), $('.text7').html(),$('.text8').html(),$('.text9').html().replace('%',''),
$('.text10').html().replace('%',''),$('.text11').html(),$('.text12').html(),$('.text13').html(),$('.text14').html(),$('#text15').val()
);

 

}

 

 

How to use  data structure - a map (hash), a JS object, or a custom class in above save method?

How  to improve this action function and it's associated JS and Apex code, calling it with one parameter?

How to fetch records more than 50000 (something around 70000) and then update it in "Update" DML statement.

SOQL can give you 50000 records and 1 DML can process 10000 records only.

Now how to overcome this situation ???

Please sugges.

 

I am trying to do sample recruitment  App for the developer certification . But the "TABS/forms" are not appearing in the web page. When I login to developer.force.com or force.com, it takes me directly to speed-momentum-5511.database.com. I am not sure what I am doing wrong. IT takes me to DB console.

I want to see the webpage which contains tabs with "home/leads/accounts/contacts/opportunities"

Can someone please help me to get to the correct web page.

 

I created a custom button that sends out an E-mail whenever it is clicked. It was working fine until I added a new  logic to not let it function when it is clicked more than once. 

 

Original code:

 

if('{!QA_Release__c.Client_Site_Type__c}'!='' && '{!QA_Release__c.Time_for_Upgrade_Update__c}'!='')

{
location.replace('/email/author/emailauthor.jsp?saveURL={!QA_Release__c.Id}&p3_lkid={!QA_Release__c.Id}&rtype=003&p2_lkid={!QA_Release__c.Assignee__c}&p24=support-sentrydevelopment@clearstructure.com&p4={!QA_Release__c.Cc__c}&template_id=00XC0000001Suga');

}

else 
alert('The "Installation Type" and "Upgrade/Update can be done" fields both need to be filled in order to complete this action.' );

}

 

I now added a custom field called Is_Mail_Sent to my custom object and the idea is to have a default value of 0 for this field whenever a record is created. When someone clicks on my custom button , it should send out an E-mail and set Is_Mail_Sent to 1.  If someone tries to send out an E-mail again , I check if Is_Mail_Sent =1 and if it is 1 , no email should be allowed to be sent.

 

if('{!QA_Release__c.Is_Mail_Sent__c}'!=1)

{

if('{!QA_Release__c.Client_Site_Type__c}'!='' && '{!QA_Release__c.Time_for_Upgrade_Update__c}'!='')

{
location.replace('/email/author/emailauthor.jsp?saveURL={!QA_Release__c.Id}&p3_lkid={!QA_Release__c.Id}&rtype=003&p2_lkid={!QA_Release__c.Assignee__c}&p24=support-sentrydevelopment@clearstructure.com&p4={!QA_Release__c.Cc__c}&template_id=00XC0000001Suga');

}

else 
alert('The "Installation Type" and "Upgrade/Update can be done" fields both need to be filled in order to complete this action.' );

}

else 
alert('Someone already sent an E-mail to support for this task. You cannot perform this action again.' );

'{!QA_Release__c.Is_Mail_Sent__c}'=1;

 

 

I get Invalid left-hand side in Assignment Error message when I click custom button even for the first time. Can someone please help me know what's wrong?

I'll try to keep this as brief as possible:

 

We are a Canadian non-profit which needs to send tax-deductible receipts to our donors once a year. Each receipt has a unique receipt number, but can have multiple donations listed on each. 

 

We have all the data set up from the Salesforce side (donation objects, automatic assignment of receipt numbers, etc.). Now we are thinking about output. The quickest way we have now to get the data on actual paper is to run a report with our donation information, receipt numbers, and donor information, export it to excel, and then set up a complicated mail merge document we created that understands how to group donations by receipt number to create pages. 

 

This is obviously not ideal. We would like to do all the document creation within Salesforce. I think this is too customized for the doc creation apps, and anyways we don't like monthly subscriptions. 

 

We are wiling to invest in creating something to ease this process, but we don't have an idea about wha tthat would look like. Does anyone have any idea what would be involved in doing this all in Salesforce? Are we talking about VF pages? If so, what would the procedure be?

 

 

Hi,

 

I'm a little confused about this question because I got different answers from different sources.

 

At a recent SF event, I asked the instructor if we could grandfather M-D relationships. What I meant was that a child can be a master of another object.

 

The answer was yes, with limiting factors on Roll-Up Summanries.

 

However, I tried this by creating a new object and then trying to  use it as a child of an object that already was a child of another, and the option is grayed out.

 

Also, in Jason Ouellette's excellent book "Development with the Force.com Platform", on page 41 paragraph 3:

 

"Up to four nested levels of Master-Detail relationships can be created, counting from the master object to the most deeply nested child object".

 

What's the deal?

 

Thank you in advance..

 

Frank Mamone

Certified Developer SP 13

Hi There, 

 

I'm new to APEX and I'm struggling to get some code working.  I wanted to make it nice and neat and do things right rather than swamping it all with for loops etc.  A single Slot__c record will be created and them I'm looking to insert a list of records into a child object (master detail).

 

My code below goes off and returns a list of Treatment__c records and inserts into a map.  All is well so far.  I am now struggling with the following:

 

1. The trigger fires after the creation of a Slot__c record.  For each inserted parent I would like to also insert the Slot__c.Id value into a variable within the Map so I can relate the child record to it's parent upon insertion.

 

2. My SOQL query WHERE clause has duration hard coded to <= '100'.  I would like to include the Slot__c.Duration field from the Parent Record here instead.

 

3. I then want to take my map and insert all these records into an object Available_Treatments__c.  I'm struggling to do this as well.

 

I'm pretty new to all this, so help would be appreciated.  I may well be over complicating it.

 

trigger InsertAvailableTreatments on Slots__c (after insert) {

 

Map<id,List<Treatment__c>> mapTreatmentObj = new Map<id,List<Treatment__c>>();
for(Treatment__c tr : [SELECT Id, Name, Account__c, Duration__c FROM Treatment__c WHERE Duration__c <= '100']) {
List<Treatment__c> treatmentsForKey = mapTreatmentObj.get(tr.Id);
if (treatmentsForKey == null) {
treatmentsForKey = new List<Treatment__c>();
mapTreatmentObj.put(tr.Id, treatmentsForKey);
}
treatmentsForKey.add(new Treatment__c( Id = tr.Id, Name = tr.Name, Duration__c = tr.Duration__c, Account__c = tr.Account__c ));
System.Debug('Name' + tr.Name);
}

}

 

Apex Editor LS is a free alterantive to the Force.com IDE apex editor.

New features in version 1.1:

 

- Mark occurrences feature - highlight all occurrences of a symbol

- Show dialog to associate .cls and .trigger files with Apex Editor LS
- Improved speed and removed locks of pre-parser. Faster startup
- Added hover for error markers in editor
- Fixed NPE when viewing a file from history or version repository
- When typing semicolon and open brace, they will be placed after current statement
- Fixed CME when doing rapid undos
- Improved content assist

 

Check out all the features at http://multimodus.hr/apex-editor-ls.html

if you have an adderror method in a before trigger, will it exist the entire batch if 1 record calls the adderror? if so, how can you partially process those records with an explicit database.update method

I'm creating a new record in a custom controller of a visualforce page.This getting the field values from a visual force page where the user insert only the values of 3 fields.

After pressing the button save i open the new record in edit mode and the user can insert the values of other 7 fields for the same records.

 

 

My question is about:

insert record;

 

 this instruction in the custom controller runs the triggers and workflow rules of the object?

 

I have an insert when the user press the save button on the first page (3 fields), i think that i will have problems because on first save i haven't all the fields populated.

Thanks in advantage for any advice.

Br.

  • June 22, 2013
  • Like
  • 0

I am trying to Disable Triggers using Change Sets. It is resulting in these errors which is coming from the Test Class

 

 Failure Message: "System.DmlException: Insert failed. First exception on
row 0; first error: STANDARD_PRICE_NOT_DEFINED, No standard price
defined for this product: []", Failure Stack Trace:
"Class.ActivateQuote.updateForecast: line 222, column 1
Class.AddKittTest.AddKittTestMethod: line 79, column 1"

 

 

How can I resolve this? How can I disable the Test Class too.

Apex Editor LS is an alternative eclipse editor plugin for the SalesForce.com Apex language.

 

Latest new feature: Objects and object fields support in content assist.

 

Visit plugin home page for full info.

  • February 27, 2012
  • Like
  • 0