• boBNunny
  • NEWBIE
  • 72 Points
  • Member since 2007

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

Hey everyone.

 

I've been using Eclipse for a while. And until today, whenever I saved my code (ctrl-s) it would save both locally and to the Server. For some reason today, ctrl-s saves only locally. I thought maybe I had a connection issue, but I'm not working offline and doing a force.com - Save to Server works...

 

I'm simply perplexed. I don't think I changed anything. Does anyone know why my ctrl-s save is now only saving locally and not to Salesforce's server? Anyone know how to fix it so it does save?

 

Please note, I am saving to a Sandbox and not production. This is not a new project or a new eclipse. I've had this open for a couple of weeks. Some of my projects for months.

 

Your help is appreciated!

 

I have a list in a page with an outputField and I notice if someone saves a long string with no spaces, most common is a URL, the string will not wrap and it breaks the page width.

 

 

If this string below was found anywhere in the field, is it possible to break that string apart at every X number of characters?

 

 

"this_is_a_long_line_with_no_line_breaks_it_should_be_split_at_every_172_characters_in_order_to_fit_into_the_page_with_out_breaking_the_page_width_repeat_this_is_a_long_line_with_no_line_breaks_it_should_be_split_at_every_172_characters_in_order_to_fit_into_the_page_with_out_breaking_the_page_width"

 

Where do I start? Would I make a string that is the X number of characters and get the size of that string then parse through the field for any strings with a length that matches my string to find what I want to break apart?

 

Then devide the found string by the length of my string for the number of times I need to loop through and split the found string with a space at every X number of characters?

In my production instance, when I updated a utility class that a number of other classes depend on, I saw that these other classes were then marked "IsValid" = unchecked, and they had no wsdl link, in Setup/Develop/Classes.

 

After performing "Run All Tests", they were marked valid. 

 

What is going on here?

 

 

I know it must be something dumb, but I have a simple VF Page to start with that won't allow me to change tabs.  Any ideas?

<apex:page controller="ManagementController" title="Management" docType="html-5.0">
    <apex:pageMessages id="PageMessages"/>
    <apex:form id="mainForm">
        <apex:tabPanel id="tabMainPanel" switchType="client" selectedTab="MasterMembers" >
            <apex:tab id="tabMasterMembers" label="Master Members" name="MasterMembers">
            </apex:tab>
            <apex:tab id="tabDetails" label="Details" name="Details">
            </apex:tab>
        </apex:tabPanel>
    </apex:form>
</apex:page>
Since the latest update to "link" your various instances, I can't access some of my past instances because I can't even remember what the username was.  It used to appear in the drop-down, but now doesn't and I need that specific sandbox because of the Security Dev requirement and I don't want to retake those challenges.  Can anyone help?
When querying Custom Metadata, is there a simple method to getting a MAP of DeveloperName to the record so it can be retrieved by a single name?  Custom Settings has this, but doing a standard MAP/SOQL gives the ID to the record instead of the DeveloperName.
Has anyone come across an APEX code Documentation method (like @Documentation) that reads the code and self-documents?  They exist for Java, but can't find one for APEX.
Does anyone know if there is a way to get the stack trace from APEX without generating an Exception  to slow things down?  I have something that might be called in a Loop and want to know precisely where it came from without having to generate a false exception.  Thanx!

I have a silly problem.  I have a StandardSetController with check boxes and 2 text boxes per line for entry.  How can I remember all 3 entered values to the Next page of results, and then retain them if I click Previous?  I've tried using a public static MAP of a wrapper, but it seems to always be NULL on the next page.

Warning to all.  Do NOT install the eclipse 28 plug-in.  First, when it tries to convert projects, it takes a Loonnnngg time.  More importantly, you can't deploy with it.  It gives an error complaining about trying to deploy Installed Packages when no installed packages are in scope.

Does anyone know if SFDC is going to continue this application?  It still has a few issues, but is a vast improvement over the original APEX explorer.  If not, I think that should be announced so that we can look for other avenues.  I've found that the Workbench tool has issues as well with complicated SOQL's, so we really need to know what the future is of this tool.

I'm looking to schedule a process to run on the 1,8,12,16 days at 1AM in the months 3,6,9,12 every year.

 

I have the following CRON string:

0 0 1 1,8,12,16 3,6,9,12 ? *

 

It works, but it doesn't reschedule itself.  It simply finds the next date in the future, runs it and then doesn't re-schedule for the next.  

 

Any ideas?

All of a sudden this afternoon, I am getting this message (as are 2 other developers) trying to save an APEX Class in Eclipse.  Has anyone encountered this before?  Any work-around?

Silly question - what changes do we have to make to make a profile allowed to edit the Record TYpe?  Thanx!

All, I have a new service to call a vendor (in Hong Kong) with a simple request of 2 fields and a simple response of a boolean.  Upon submittal, I am receiving, "System.CalloutException: Web service callout failed: Unexpected element. Parser was expecting element 'urn:postfilewsdl:postFileResponse' but found ':parameters'".  

 

We generated the WSDL (Response Type below) via the GUI as always, but it sounds like we are receiving back something different than the WSDL expects.  Does that sound right?  Any suggestions?

 

public class postFileResponseType {

        public Boolean return_x;

        private String[] return_x_type_info = new String[]{'return','http://www.w3.org/2001/XMLSchema','boolean','1','1','false'};

        private String[] apex_schema_type_info = new String[]{'urn:postfilewsdl','true','false'};

        private String[] field_order_type_info = new String[]{'return_x'};

}

Does anyone have a link that shows the objects that have replaced FeedPost?  We have an extract that we do of FeedPost and we'd like to start pulling those objects so that when FeedPost is turned off, we still have all the required data.

 

Thanx!

Does anyone have any links or tips on consuming the QueryResult object in .NET and then how to parse it?  It's easy to use for straight queries, but when dealing with Parent relationships and/or sub-queries that may or may not have data, it's not very straight-forward.  For example, I figured out how to tell if it is a Parent or Sub-query using Has Attributes, and Attribute(0), but then when I access it via the ChildNodes, if it doesn't have data, I can't tell which columns I'm dealing with so that I can marry them up to the actual expected column (subqueries and parent relationships always return the ID column).  Thanx!

Has anyone had any luck (language doesn't matter) on how to access the MetaData API to retrieve Profile Permissions?  I know the object within the MetaData API that will return the data, but I can't find how to REQUEST that data for a specific Profile.  Thanx!

Has anyone had any luck with the usage of this new BETA tool?  I installed the Adobe AIR and Flash Player as required and then unzipped the file provided.  But there is nothing in the file that is an executable or web page.  There is an SWF file, but that is not associated with any program and I don't think you can simply "execute" an SWF anyway.  Any ideas?

We have a webservice that sometimes gets inundated with requests from an APEX trigger we have.  So, we wrote a .NET batch program to do the requests via API through SFDC with a 45 second delay between requests.  We'd like to make that a Batch APEX, however, I can't find any way to make the APEX code pause between submittals.  I tried a loop checking on the time, but that causes 200K worth of script statements which exceeds governor limits too.

 

Does anyone have any ideas?

 

Thanx!

I'm looking for either confirmation, or possibly alternative solutions to a requirement here.

 

Our requirement is for an edit Save on a custom object to invoke a web service to send the information to it, consume the answer, and then update the custom object only if a valid answer was received back.  If not, do not save and provide an error. 

 

Since calling webservices is Asynchronous, my solution was to create a VisualForce page (I would prefer the standard page, but...) which would await the answer and then do a PageReference to the updated object View page if successful.  If not, we would present the Error Message at the top of the page.

 

Can anyone see an alternative or issue with this solution?

I have a problem where I Synchronize, but all of the items shown for Synch come right back a little later and state they are still unsynched.  I upgraded to Eclipse 3.5, and now when it completes a Synchronization, the tree remains the same.  Has anyone else experience this?  Any solutions?

I saw in the Spring '10 re-certification videos that the Force IDE for Spring '10 would be ready by Feb 10 with support for Eclipse 3.5 (and the install would be both Eclipse 3.5 AND the IDE), but it's a month later and it's still not out there.  Anyone have an update on when to expect this?
I know it must be something dumb, but I have a simple VF Page to start with that won't allow me to change tabs.  Any ideas?

<apex:page controller="ManagementController" title="Management" docType="html-5.0">
    <apex:pageMessages id="PageMessages"/>
    <apex:form id="mainForm">
        <apex:tabPanel id="tabMainPanel" switchType="client" selectedTab="MasterMembers" >
            <apex:tab id="tabMasterMembers" label="Master Members" name="MasterMembers">
            </apex:tab>
            <apex:tab id="tabDetails" label="Details" name="Details">
            </apex:tab>
        </apex:tabPanel>
    </apex:form>
</apex:page>
When querying Custom Metadata, is there a simple method to getting a MAP of DeveloperName to the record so it can be retrieved by a single name?  Custom Settings has this, but doing a standard MAP/SOQL gives the ID to the record instead of the DeveloperName.
Hi all,

I don't want to display special character in a field.
suppose i have one field in that field values are : A & B
But I need output  A and B like this.
I created a class but it's not working Please help me.

public class CommonFunctions {
    public void RemovingSpecialCharacters(){
        List<case> listcase = new  List<case>();
        String specialCharacters = '&';
        if(listcase.Notes__c.Contains('/&')){
            listcase.Notes__c = 'And';
            }        
    }
}
Does anyone know if there is a way to get the stack trace from APEX without generating an Exception  to slow things down?  I have something that might be called in a Loop and want to know precisely where it came from without having to generate a false exception.  Thanx!

I have a silly problem.  I have a StandardSetController with check boxes and 2 text boxes per line for entry.  How can I remember all 3 entered values to the Next page of results, and then retain them if I click Previous?  I've tried using a public static MAP of a wrapper, but it seems to always be NULL on the next page.

Hi All,

 

how to get only  Custom profile name in soql query....  whic field am i use in where condition

 

Select p.UserType, p.UserLicenseId, p.PermissionsViewSetup, p.PermissionsManageUsers, p.PermissionsManageDataCategories, p.PermissionsManageDashboards, p.PermissionsManageCustomReportTypes, p.PermissionsManageChatterMessages,

 

 

 

p.Id,p.name, p.Description, p.CreatedDate, p.CreatedById From Profile p where p.PermissionsViewSetup = true

 

 

 

 

I have a InputText object with an embedded ActionSupport that activates with the OnChange event to call a method from the Controller Extension. In reduced form here:

 

<apex:pageBlockSection showHeader="True" columns="2" title="Pricing" id="pricingBlock”>
   <apex:pageBlockSectionItem >
      <apex:outputLabel value="Discount" for="discProxy"/><apex:inputText value="{!discountText}" id="discProxy”>
         <apex:actionSupport event="onchange" 
                             action="{!afterDiscChange}" 
                             rerender="pricingBlock" />
      </apex:inputText>
   </apex:pageBlockSectionItem>
</apex:pageBlockSection>

 

It works perfectly except when someone changes the value in the text field and then immediately clicks on the Save button (or hits return which invokes the Save button). ie Does not click (or tab) elsewhere first. In this case, the code in afterDiscChange() is not executed and since it is meant to change a field value that we subsequently want saved it leads to an unwanted/unexpected result.

 

I tried replacing onchange with onblur but got the same (non)result.

 

Anyone come across this problem? Got any ideas on what I can do here? The simpler the better but I am not shy on doing coding if that's what it takes.

 

Further Information: I actually have more than one ActionSupport enabled InputText in this PageBlockSection, each with its own individual method attached. All work fine but are likewise not called if the Save button is immediately pressed. The methods are mutually destructive so I can't simply call them all as part of the save process. I could have the save method call the correct one if I had a way of determining which specific InputText was the one that was edited (assuming, of course, the just changed value of discountText is actually passed back to the Extension—might go System.Debug that to have a look).

 

 

Does anyone know if SFDC is going to continue this application?  It still has a few issues, but is a vast improvement over the original APEX explorer.  If not, I think that should be announced so that we can look for other avenues.  I've found that the Workbench tool has issues as well with complicated SOQL's, so we really need to know what the future is of this tool.

Hi,

 

   Here is the scenario. The opportunity stage in SFDC org1 goes to closed won. Then the opp stage in SFDC org2 should go to closed won as well. Is there a way we can accomplish this with an Apex trigger? If so any one has the sample code for this.

 

Please advise.

 

Thanks!!!

I have a trigger that runs on the User object that updates many Cases in bulk depending on if the User exists in one of several fields on the Case. I run into issues when trying to run this on multiple User records at once, if the # of Cases exceeds 10,000 (due to SF governor limits). I'd like to break this out and use batch Apex - but I'm not sure how I convert this trigger into Batch Apex.

 

Here is the trigger code. I just need some help getting started on breaking this out into Batch. thanks!

 

trigger UpdatePTOonCase on User (after update) {

// this trigger updates the NSR PTO fields on Enterprise Cases based on changes to the NSR flag on the User record.

Set userIds = new Set();

List users = Trigger.new;

 

//list to hold cases that will need to be updated

 List casesToUpdate = new List();

 

 //gather all user ids in the update in a set

for (User u : users) {

userids.add(u.id); }

 

 // grab all open cases where this users is one of the related nsr's and place in map

Map cMap = new Map([SELECT id, nsr_lookup__c, BI_nsr_lookup__c, Tech_nsr_lookup__c, Time_nsr_lookup__c, Talent_nsr_lookup__c FROM Case WHERE isClosed = false AND (nsr_lookup__c in: userids OR BI_NSR_Lookup__c in: userids OR Tech_nsr_lookup__c in: userids OR Talent_nsr_lookup__c in: userids OR Time_nsr_lookup__c in: userids)]);

 

//create list of cases List cases

List = cmap.values();

 

//create set of case id's

Set caseids = cMap.keyset();

 

for (User u : users) {

User old = trigger.oldMap.get(u.id);

 

 if (old.PTO__c != u.PTO__c) {

 

 //loop through Case list and add case id's

for (Case c :casesList) {

 

 if (c.nsr_lookup__c == u.id) {

//set NSR PTO Field on Case

c.nsr_pto__c = u.PTO__c; }

 

 if (c.BI_nsr_lookup__c == u.id) {

//set NSR PTO Field on Case

c.BI_nsr_pto__c = u.PTO__c; }

 

if (c.Tech_nsr_lookup__c == u.id) {

//set NSR PTO Field on Case

 c.Tech_nsr_pto__c = u.PTO__c; }

 

 if (c.Time_nsr_lookup__c == u.id) {

 //set NSR PTO Field on Case

c.Time_nsr_pto__c = u.PTO__c; }

 

 if (c.Talent_nsr_lookup__c == u.id) {

 //set NSR PTO Field on Case

c.Talent_nsr_pto__c = u.PTO__c; }

 

casesToUpdate.add(c); } } }

 

//call method to prevent case triggers from firing

 PreventRecursive.setUpdatedFromUser ();

 

update casesToUpdate ; }

I wanted to make something that reported how many days a user has left before their password expires.  I found the LastPasswordChangeDate field on the User table.  Now I was just wondering if there was anywhere I could pull down the org's policy on "User passwords expire in" programatically? 

Silly question - what changes do we have to make to make a profile allowed to edit the Record TYpe?  Thanx!

How can I READ an existing profile's "ProfileObjectPermission" using the metadata api?

 

I can see that I can UPDATE it with code something like that shown below, but it's very hard to update a profile if I can't read it in the first place.

 

Do I really have to get it file the file-based api and parse the XML myself?

 

Thanks

Kerry 

 

PS: Here's the code to update a profile -- but what does the code to read it look like?

 

// Set permissions for a table

ProfileObjectPermissions pop = new ProfileObjectPermissions();

pop.setAllowCreate(true);

...

pop.setTable("Sometable__c");

 

// Connect the permissions to a profile

 

Profile profile = new Profile();
profile.setFullName("Standard");
profile.setObjectPermissions(new ProfileObjectPermissions[]{pop});
// Update the profile
UpdateMetadata[] metadata = new UpdateMetadata[1];
metadata[0].setMetadata(profile);
metadataConnection.update(metadata);

 

 

Hi,

 

  I want to create a restful web service in salesforce. Is it possible because i have check the options in setup(Trigger class), but not see any option for restful service.

 

Thanx

Has anyone had any luck with the usage of this new BETA tool?  I installed the Adobe AIR and Flash Player as required and then unzipped the file provided.  But there is nothing in the file that is an executable or web page.  There is an SWF file, but that is not associated with any program and I don't think you can simply "execute" an SWF anyway.  Any ideas?

We have a webservice that sometimes gets inundated with requests from an APEX trigger we have.  So, we wrote a .NET batch program to do the requests via API through SFDC with a 45 second delay between requests.  We'd like to make that a Batch APEX, however, I can't find any way to make the APEX code pause between submittals.  I tried a loop checking on the time, but that causes 200K worth of script statements which exceeds governor limits too.

 

Does anyone have any ideas?

 

Thanx!

Hey everyone.

 

I've been using Eclipse for a while. And until today, whenever I saved my code (ctrl-s) it would save both locally and to the Server. For some reason today, ctrl-s saves only locally. I thought maybe I had a connection issue, but I'm not working offline and doing a force.com - Save to Server works...

 

I'm simply perplexed. I don't think I changed anything. Does anyone know why my ctrl-s save is now only saving locally and not to Salesforce's server? Anyone know how to fix it so it does save?

 

Please note, I am saving to a Sandbox and not production. This is not a new project or a new eclipse. I've had this open for a couple of weeks. Some of my projects for months.

 

Your help is appreciated!