• Dilyan Dimitrov
  • NEWBIE
  • 25 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 41
    Questions
  • 47
    Replies
Hello,

I would like to display message with particular information in Salesforce.

I have created a custom field of type text and made it read only but it does not allow me to display the message I want.

Please see the screenshot

User-added image

could you please advise how this can be achieved in Salesforce?

Regards,

Dilyan
Hello,

I have a standard field called currency but I need to change its data type from picklist to multi-select picklist.

The problem is that it is not possible to change the data type of standard fields in Salesforce.

Therefore I'm trying to recreate the standard currency field but instead of removing the standard currency field is it possible to hide it in the layout?

What I would like to achieve is to hide the standard currency field and copy its data into the new field.

Could you please advise how this can be achieved?

Could you please advise how to copy the data from the standard currency field into the new recreated field.

Regards,

Dilyan
Hello,

I'm trying to execute the code in the following test class:
static testMethod void testLeadStatusExistingDeal() {
    Test.startTest();

    Lead record = new Lead(LastName = 'Dimitrov', Company ='emp1', Monthly_Volume__c= '1234', Phone='1423542452', Website='www.google.com');
    insert record;
    System.debug('record ' + record);

    Contact contact = new Contact(Company_Name__c = record.id, email = 'dylan@dylan.com');
    Contact contact1 = new Contact(Company_Name__c = record.id, email = 'dilyan@dilyan.com');
    insert contact;
    insert contact1;

    Account account = new Account(name = 'acc1');
    insert account;
    Merchant_To_Contact__c merchantToAccount = new Merchant_To_Contact__c(Merchant_Name__c = account.id, email__c = 'dylan@dylan.com');
    Merchant_To_Contact__c merchantToAccount1 = new Merchant_To_Contact__c(Merchant_Name__c = account.id, email__c = 'dilyan@dilyan.com'); 

    insert merchantToAccount;
    insert merchantToAccount1;

    ApexPages.StandardController c = new ApexPages.StandardController(record);
    LeadToMerchantController ltmc = new LeadToMerchantController(c);
    String leadStatusExistingDeal = ltmc.leadStatusExistingDeal(record);
    System.debug('leadStatusExistingDeal ' + leadStatusExistingDeal);
    Test.stopTest();
}
Instead I get the following error Field is not writeable: Merchant_To_Contact__c.Email__c

Could you please advise what am I doing wrong and how to execute this test class without such error?

Regards,

Dilyan
 

Hello,

There is the following custom field called Url__c of type Account and the data added to the field is mainly urls and websites.
The problem is that the field is rich text and the data entered in the field Url__c is not the proper format. What I mean by not a proper format is: <span style="color: #5f604b;"><span style="font: signacondcolumn-book;"><span style="font-size: 8.0pt;">https://www.merchant.com/store</span></span></span><br><a href'="www.account.com">Account</a>.
Could you please advise what can be done in order to be able to get the urls in the proper format. I'll only need to use the urls for instance www.merchant.com or www.account.com. I was wondering if I can use a parser but I can't find an appropriate one in Salesforce. Could you please advise if you came across to such problem and how it can be resolved?
Hello,

I need an advice regaring the following implementation. I need to normalize large set of user generated company names for instance 'Derby International LLC', and I need the company name without its extension. In this case the extension is 'LLC'. I use an algorithm which I wrote myself in order to remove the extensions from the name of the company which is working ok. However, in order to get the extesnsions I used a list to store each company extension. Here is the code:List<String> companyExtensionsList = new List<String>(); private static void initCompanyExtensions() { companyExtensionsList.add('ltd'); companyExtensionsList.add('inc'); companyExtensionsList.add('group'); companyExtensionsList.add('corp'); companyExtensionsList.add('llc'); companyExtensionsList.add('llp'); companyExtensionsList.add('lp'); }The company extensions are actually a list of constants.

What I need to know is whether there is a better approach to store the extensions instead of storing the them into a list strings?

Regards,

Dilyan
Hello,


I would like to know how to be able to display a warning message in a page.

I have created my own custom visual force page:





and in the LeadToMerchConvertController I added the following piece of code.

ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.WARNING,'There is an existing Merchant: ' + buildAccountTemplate() + ' for this Lead: ' + buildLeadTemplate()); ApexPages.addMessage(myMsg);

The problem is that the above code is placed inside the constructor:

public LeadToMerchConvertController(ApexPages.StandardController controller) {
objLead = (Lead)controller.getRecord(); // System.debug('objLead ' + objLead.Id); ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.WARNING,'There is an existing Merchant: ' + buildAccountTemplate() + ' for this Lead: ' + buildLeadTemplate()); ApexPages.addMessage(myMsg);
}

and if I move the code outside the constructor the warning message disappear from the page.

What I would like to know is it possible to move and use the code outside the constructor and how to make the warning message visible again when the code is outside the constructor?

I will strongly appreciate if you can also, give additional examples/code of how to display warning message in salesforce.

Regards,

Dilyan
Hi,

I would like to know How to stop converting Lead to Account in before insert trigger without addError() method?

To be more precise what I need to acheve:
1. Stop the process of converting Lead to Account.
2. Display message in the convert Lead to Account page that the respective Lead is not converted.
3. Set and Update the Lead.Status__c field to 'Existing Deal'.

I've tried to achieve the above in before insert trigger and I used addError() method in order to stop the process of converting Lead to Account as well as to dispaly message that the Lead is not converted but the problem is that the addError() method is making a rollback of my changes and I can neither save nor update my changes and records into the Lead database table.
I used @future method as well as a savepoint because I thought it will help me to set and update my changes but that did not help at all. Therefore I decided to start investigating and searching for a feasible way to achive what I want via VF by using controller.

Could you please advise how achive what I want either by using trigger or controller?

Regards,

Dilyan
Hi,

Because I'm new to VF could you please give an example how to create custom Convert Lead VF page and Lead Conversion Process and to integrate it in Salesforce?

To be more precise what I need to acheve:
1. Stop the process of converting Lead to Account.
2. Display message in the convert Lead to Account page that the respective Lead is not converted.
3. Set and Update the Lead.Status__c field to 'Existing Deal'.

Could you please advise how this can be achieved using VF?

Hi,

I still can't find solution to the following issue https://developer.salesforce.com/forums/ForumsMain?id=906F00000005JXnIAM. 

Could someone please help. It is really urgent.

PS: I don't know how and why pcon https://developer.salesforce.com/forums/ForumsProfile?communityId=09aF00000004HMGIA2&userId=005F0000003Fg0aIAC has decided that the issue is 'SOLVED' because it is far from being SOLVED.