• florianhoehn
  • NEWBIE
  • 50 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 14
    Replies

We have a formula field that pulls the value from a custom field called Account Market on the Account that a case was opened from.  That field is hard-coded with all of the markets that were considered when the field was created.  For example,

 

Case ( Account.Market__c ,
"Albania","Albania",
"Angola","Angola",
"Argentina","Argentina",
"Australia","Australia",
"Austria","Austria",
"Bangladesh","Bangladesh",
"BeLux","BeLux",
"Bosnia","Bosnia",
"Brunei","Brunei",
"Cambodia","Cambodia", "Unknown)

 

The problem is that there are new markets in our business all the time.  Is there any way to program that field to just pull in whatever the Account Market field on the Account says, rather than having to constantly update the hard-coding with new markets all the time?

  • February 22, 2012
  • Like
  • 0

Hello all,

 

Hopefully this is an easy question.

 

Is it possible to conditionally show elements based on a user's permission sets?

 

Basically, I need a way to say... "Hey visualforce page, if the current user has this permission set then they can view this section of this page. Groovy visualforce. You're actually doing it. Bangarang VisualForce. Bangarang."

 

Is there a way to do this without using a controller?

 

Any help would be greatly appreciated.

 

Thanks!

Hi everyone,

 

I have a big problem that I cannot get my head around:

 

We created a REST API that returns an object with a rich text field in it. It displays beautifully without any trouble IF you are logged in to Salesforce.com directly. If however you are only using OAUTH to authenticate it cannot access the images of this rich text field.

 

Here an example JSON for a rich text field as we get it in html format:

 

...

"article" : "<p class=\"MsoNormal\"></p>\n<p class=\"MsoNormal\" style=\"text-align: center; \"><img src=\"https://c.eu2.content.force.com/servlet/rtaImage?eid=a06b0000003Xvrq&amp;feoid=00Nb0000000yu5o&amp;refid=0EMb0000000Kyui\" alt=\"User-added image\"></img></p>"

...

 

How can it be that I can get all text and formatting ok but not access the image via OAUTH?

 

Any help would be greatly appreciated!

 

Florian

Hi everyone,

 

I have a big problem that I cannot get my head around:

 

We created a REST API that returns an object with a rich text field in it. It displays beautifully without any trouble IF you are logged in to Salesforce.com directly. If however you are only using OAUTH to authenticate it cannot access the images of this rich text field.

 

Here an example JSON for a rich text field as we get it in html format:

 

...

"article" : "<p class=\"MsoNormal\"></p>\n<p class=\"MsoNormal\" style=\"text-align: center; \"><img src=\"https://c.eu2.content.force.com/servlet/rtaImage?eid=a06b0000003Xvrq&amp;feoid=00Nb0000000yu5o&amp;refid=0EMb0000000Kyui\" alt=\"User-added image\"></img></p>"

...

 

How can it be that I can get all text and formatting ok but not access the image via OAUTH?

 

Any help would be greatly appreciated!

 

Florian

Hi 

 

I'm quite new to the triggers world, so forgive me for any mistakes...

I have a field populated with contact ID, and I want that two lookup fields will be populated accordingly ("Assigned to Partner" and "Assigned to Partner Rep")

I managed to populate the "Assigned to Partner Rep" with the "Partner Rep" contect (Id in this case). "Assigned to partner" is populated only after another edit, not right away 

(He is populated by the "Partner SF ID", which is the partner account ID)

 

trigger AssignedRep on Lead(before insert, before update) {
  for (Lead a : Trigger.new) {
   if(a.LeadSource =='Partner' && a.Partner_Rep__c != null){
    a.Assigned_to_Partner_Rep__c = a.Partner_Rep__c;  
    if(a.Assigned_to_Partner_Rep__c != null)
    a.Assigned_to_Partner__c = a.Partner_SF_ID__c;
        }
       }
}

 

Also, how do I write a test coverage to this code? I understood it's mandatory (although the code is quite simple...)

Any help is appriciated!

 

 

Thanks!

 

Itay

i have a doubt...once i submit a record for approval...can we unlock the record....i have requirement i have to add some thing once a record have been submitted for approval... is it possible that the opportunity could be submitted more than once for approval...please help...

  • February 29, 2012
  • Like
  • 0

 

Hello, I created a views named it as current view and previous view. there is a field called as Previous mnth it's value is calculated based on the current mnth field which is a picklist values(jan-dec).  i used formulea ISPICKVAL on previous mnth field. 

 

i wanto show in myview only previous mnth records in previous view. And current mnth values in current view. In the columns of previous view i included only previous mnth field so that i can see only previous mnth specific records.

 

But i am unable add a filter which can bring only those records. Can we add previous mnth contains value. 

 

Please help me on this.

 

Thanks

hi

i have 2 customs objects, job__c and applicant__c, in the applicant object is a lookup field to job object there is a relation one to many,

all of this is ok

but in the object job apear a list with all the applicants that has register on this job,here there is a button new, i want to override this button, when a click  show me a new window with the id of this job, and a lookup for search an applicant

and update the field job on applicant__c, and in the list that is show in the object job__c apear the applicant that i update

 

i need to create a visualforcepage

a class

 

i have problems to override the button, and to when i create new button, when i select  source of content in the piklist not apear my visualforcepages

 

 

can somebody helpme?

  • February 27, 2012
  • Like
  • 0

 

Background :

                           I am using command line data loader for import, upsert  and archiving the data in sandbox and production ORG.

                           The process-conf.xml is properly defined (for sandbox and Prod env )and created the .bat files for all the above mentioned operations.

                             

                           When I ran all this functionality in sandbox and production ORG from Window XP environment its working fine.However when I tried it using Window 7 environment  on production it  gives me following error ....

 

java.lang.RuntimeException: com.salesforce.dataloader.exception.ParameterLoadExc

eption: Error loading parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:136)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:74)

        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja

va:226)

Caused by: com.salesforce.dataloader.exception.ParameterLoadException: Error loa

ding parameter: sfdc.password of type: java.lang.String

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

75)

        at com.salesforce.dataloader.config.Config.postLoad(Config.java:620)

        at com.salesforce.dataloader.config.Config.loadParameterOverrides(Config

.java:646)

        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav

a:94)

        ... 2 more

Caused by: javax.crypto.BadPaddingException: Given final block not properly padd

ed

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)

        at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275)

        at javax.crypto.Cipher.doFinal(DashoA12275)

        at com.salesforce.dataloader.security.EncryptionUtil.decryptString(Encry

ptionUtil.java:197)

        at com.salesforce.dataloader.config.Config.decryptProperty(Config.java:6

68)

        ... 5 more

 

 

Any help on this would be helpful.

 

-Thanks

 

 

Can anyone help me with this frustrating issue. I am developing an application where I want to relate a number of opportunities with a contract and have the abilitiy to total sum the opportunity amounts and count the opportunities against this contract. I can't believe this can't be done. Am I the first person that's tried to do something like this?

I have hte following code, which works, when a product is added to a opportunityl ine item, it copies the data + some other data as free text to a hiddel field. I want to deploy this from my sandbox to our production instance, but can not since it does not have a test method and I am lost on building one for this, any help is apprciated.

 

trigger OpportunityProuctCopytoHiddenField on Opportunity (before insert, before update) {
for(Opportunity t:trigger.new)
      {
        List<String> NewList= new List<String>();

        if (t.HasOpportunityLineItem == true) 
        {
             for(OpportunityLineItem OpLine: [SELECT CreatedBy.Name, Quantity, TotalPrice, LastModifiedDate, PriceBookEntry.Name, UnitPrice, ID FROM OpportunityLineItem WHERE OpportunityId =:t.Id] ) 
            {
                NewList.add(OpLine.PriceBookEntry.Name);
                NewList.add(' serving ');
                String str = '' + opLine.Quantity;
                NewList.add(str);
                NewList.add(' units passed has been authorized by ');
                NewList.add(OpLine.CreatedBy.Name);
                NewList.add('and the transation has been logged into the record id: ');
                NewList.add(OpLine.ID);
                NewList.add(' on');
                String str1 = '' + opLine.lastModifiedDate;
                NewList.add(str1);
                NewList.add(' GMT 0');
                            }
            for(String c : NewList){
                //t.Hidden_Products__c = t.Hidden_Products__c + c + '<br>';
                t.Hidden_Products__c = t.Hidden_Products__c + c ;
                system.debug('********' +  t.Hidden_Products__c);
            }
        }
    }
}

We have a formula field that pulls the value from a custom field called Account Market on the Account that a case was opened from.  That field is hard-coded with all of the markets that were considered when the field was created.  For example,

 

Case ( Account.Market__c ,
"Albania","Albania",
"Angola","Angola",
"Argentina","Argentina",
"Australia","Australia",
"Austria","Austria",
"Bangladesh","Bangladesh",
"BeLux","BeLux",
"Bosnia","Bosnia",
"Brunei","Brunei",
"Cambodia","Cambodia", "Unknown)

 

The problem is that there are new markets in our business all the time.  Is there any way to program that field to just pull in whatever the Account Market field on the Account says, rather than having to constantly update the hard-coding with new markets all the time?

  • February 22, 2012
  • Like
  • 0

Hello all,

 

Hopefully this is an easy question.

 

Is it possible to conditionally show elements based on a user's permission sets?

 

Basically, I need a way to say... "Hey visualforce page, if the current user has this permission set then they can view this section of this page. Groovy visualforce. You're actually doing it. Bangarang VisualForce. Bangarang."

 

Is there a way to do this without using a controller?

 

Any help would be greatly appreciated.

 

Thanks!

After successfully merging Accounts, Contacts, and Opportunities from one org to another via upserting them with external IDs in the Data Loader, I went to do the same with the Leads object.  I quickly noticed that when attempting to Upsert the Leads, it did not give me the option to select the External ID field on my Users so that I could map "OwnerID".

 

Why can't I map the external ID field on my User records to reflect lead ownership upon importing them via the Data Loader?  Do I need to simply insert them and then Mass Transfer the Leads to the appropriate owner, or is there a better way?

 

Thanks!

Anyone knows how to invoke a visualforce page in Apex code without using callout (which requires you to setup the remote site)? Essentially I just want to make a 'local' http request.