• cyrilver
  • NEWBIE
  • 0 Points
  • Member since 2011

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

Hi,

 

In apex whit "schema.SObjectType.Account.fields.getMap()" you can recover all information on Account Fields.

Then the getLabel() can return the label of each field.

My problem is that I can recover the label of the "OwnerId" field but I wan't to get the "Account Owner" label.

I try the method "getRelationshipName()" but it only returns the name of the relation and not the label.

Many thanks.

 

Regards,

Cyril

Hi,

 

I need to control something before saving a record.

If this control is false, I need to prompt a message to the user to ask him if he wants to continue the save operation.

 

I know that I can't do that with trigger so I have developed a VisualForce page/Apex Controller but I can't override the standard "Save" button.

 

Any idea ?

 

Regards,

Cyril

Hi, 

I have developed many years ago a Java Client to integrate/update data into SFDC using the API. This Java Client has been generated from the SFDC WSDL API. 
The treatment may takes one hour to modify many data into Salesforce during the night. 
This treatment worked very well but during 5 days issues were return : 
"javax.net.ssl.SSLHandshakeException: Received fatal alert: access_denied" 
Now since 2 days, it seems to work very well but I need to understand why during 5 days I received issues and now it's ok. 
Does Salesforce changes something regarding SSL ? 
Hope you can help me. 

Regards, 
Cyril

I would like to make a mass mail merge into a word document.

The source of my mass mail is a campaign members list.

Is there any functionnality in Salesforce to do that ?

Thanks.

 

Regards,

Cyril Verhaest

Hi,


I've a custom "Existing_Industry__c" object which is a child object of Account (master-detail).
This object has a custom field which name is "Industry__c" which is a lookup field of another object. The value available for this field are :
- Industry 1,
- Industry 2,
- Industry 3.
I've created another custom object "Existing_Industry_Equipment__c" which is a child object of "Existing_Industry__c" (master-detail).
This object has a custom field which name is "Equipment__c" which is a lookup field of another object. The value available for this field are :
- Equipment 11 for Industry 1,
- Equipment 12 for Industry 1,
- Equipment 21 for Industry 2,
- Equipment 22 for Industry 2,
- ...
This is like dependent picklist ... 
For example, I add "Industry 1" on the related list "Existing Industry" to "Account 1" .
On "Industry 1" record I would like to add Equipment on the relatd list "Existing Industry Equipment" which only display "Equipment 11" and "Equipment 12".
I try to add a filter on the lookup "Equipment__c" (Existing_Industry_Equipment__c) but I can't filter on the "Industry__c" parent field (Existing_Industry__c).

Any ideas ???

Thanks

Hi,

 

In my Org, Account can have many assets. These assets have a custom field "renewal date".

When the renewal date of an asset of an account expired an opportunity has to be created for the account with the same product

reference.

So I've created a batch apex to do that which is executed each day.

I've managed to create the opportunities but I don't know how to create the link with the good product.

Many Thanks.

Here is my execute method code :

 

 

global void execute(Database.BatchableContext BC, List<sObject> scope){

Date dCloseDate = system.now().date();

   

List<Opportunity> listOpps = new List<Opportunity>();

List<Asset> listAssets = new List<Asset>();

List<Opportunity_Asset_Link__c> listOppAssetLinks = new List<Opportunity_Asset_Link__c>();

   

   

for(sObject oObj:scope){

Asset oAsset = (Asset) oObj;

   listAssets.add(oAsset);

   

    Opportunity oOpp = new Opportunity(Name='Test Create Opp', StageName='Prospecting', CloseDate=dCloseDate,

    AccountId=oAsset.AccountId, OwnerId = oAsset.Account.OwnerId);

   

listOpps.add(oOpp);

}

// Insert Opportunity   

if(listOpps.size() > 0){

    list<Database.SaveResult> listSaveResult=database.insert(listOpps,false);

   

    // Check Results

    for (integer i=0;i<listSaveResult.size();i++){

   Database.SaveResult sr=listSaveResult[i];

 

    if(sr.isSuccess()){

// How can I be sure that I'm on the good opportunities and the good asset ???

    Opportunity_Asset_Link__c oOppAssetLink = new Opportunity_Asset_Link__c(Opportunity__c=sr.getId(), Asset__c=listAssets[i].Id);

   

   listOppAssetLinks.add(oOppAssetLink);

   }

   } 

}  

 

// Insert Opportunity Asset Link 

if(listOppAssetLinks.size() > 0){

list<Database.SaveResult> listSaveResult2=database.insert(listOppAssetLinks,false);

}

}

 

Regards,

Cyril

Hi,

 

I have written a trigger (on before insert) which control duplicate account when a user create a new account.

The first time the user save the record, I display the list of duplicate account with the addError function.

I would like when the user uses the "Save" button another time to create the account and not display error message.

The idea is to alert the user an not to block him.

 

I try to do this with :

- variable custom settings but when addError is used, my variable is not updated,

- cookies,

- ...

 

Is there any solution ? Thanks.

 

Regards.

 

Hi,

 

In apex whit "schema.SObjectType.Account.fields.getMap()" you can recover all information on Account Fields.

Then the getLabel() can return the label of each field.

My problem is that I can recover the label of the "OwnerId" field but I wan't to get the "Account Owner" label.

I try the method "getRelationshipName()" but it only returns the name of the relation and not the label.

Many thanks.

 

Regards,

Cyril

Hi,

 

I need to control something before saving a record.

If this control is false, I need to prompt a message to the user to ask him if he wants to continue the save operation.

 

I know that I can't do that with trigger so I have developed a VisualForce page/Apex Controller but I can't override the standard "Save" button.

 

Any idea ?

 

Regards,

Cyril

Hi,


I've a custom "Existing_Industry__c" object which is a child object of Account (master-detail).
This object has a custom field which name is "Industry__c" which is a lookup field of another object. The value available for this field are :
- Industry 1,
- Industry 2,
- Industry 3.
I've created another custom object "Existing_Industry_Equipment__c" which is a child object of "Existing_Industry__c" (master-detail).
This object has a custom field which name is "Equipment__c" which is a lookup field of another object. The value available for this field are :
- Equipment 11 for Industry 1,
- Equipment 12 for Industry 1,
- Equipment 21 for Industry 2,
- Equipment 22 for Industry 2,
- ...
This is like dependent picklist ... 
For example, I add "Industry 1" on the related list "Existing Industry" to "Account 1" .
On "Industry 1" record I would like to add Equipment on the relatd list "Existing Industry Equipment" which only display "Equipment 11" and "Equipment 12".
I try to add a filter on the lookup "Equipment__c" (Existing_Industry_Equipment__c) but I can't filter on the "Industry__c" parent field (Existing_Industry__c).

Any ideas ???

Thanks

I am trying to access a Visualforce page on an iPad.  When I view this page on a PC, I am able to only see about 80% of the page on the screen...I must scroll down to see the remaining 20 percent.  Unfortunately, when I view this same page with my iPad, I do not have this ability to scroll down to see the bottom of the page.  I am not able to scroll down at all past what is initially displayed on the screen.

 

Has anyone else seen this problem?  Is there a workaround for it?

 

 

Thanks

Hi,

 

I have written a trigger (on before insert) which control duplicate account when a user create a new account.

The first time the user save the record, I display the list of duplicate account with the addError function.

I would like when the user uses the "Save" button another time to create the account and not display error message.

The idea is to alert the user an not to block him.

 

I try to do this with :

- variable custom settings but when addError is used, my variable is not updated,

- cookies,

- ...

 

Is there any solution ? Thanks.

 

Regards.

 

Can I use batch apex to select say 5.000 company records then create a unique opportunity with unique products?

5,000 opportunities are created and each one has products based on what each company currently owns.