• Nicky Torstensson
  • NEWBIE
  • 30 Points
  • Member since 2016
  • Business Integration Associate Manager
  • Accenture

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 3
    Questions
  • 7
    Replies
Hi,

I created a Territory2Rule in my sandbox org, then retrieved it with SFDX to my local machine, modified some content (not the <name> attribute nor file name), and tried to deploy it back to the sandbox org.

However, it throws an error saying:
Unable to derive the fully qualified name for component at location territory2Models/<rule API name>.territory2Rule.
I am not sure, what exactly that means, since I have not modified the name attribute nor the file name after I retrieved it from the org.

Any input is welcome.

BR, Nicky
Hi

How do you test the Lead Convert where you have selected the following from the UI:
  • New account should be created
  • Existing contact is selected
  • No opportunities
The documentation states, that you can use LeadConvert.setConvertedContactId, but then you have to set the ConvertedAccountId to be the same - but this contradicts what my use case is.
public static testMethod void myTest(){
        Contact existingContact = TestUtil.createContact(true);

        Lead ld = TestUtil.createLead(false);
        ld.FirstName = 'FirstName';
        ld.LastName = 'LastName';
        ld.ContactPersonFirstName__c = 'NOT FirstName';
        ld.ContactPersonLastName__c = 'NOT LastName';
        insert ld;

        Database.LeadConvert lc = new Database.LeadConvert();
        lc.setLeadId(ld.id);
        LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
        lc.setConvertedStatus(convertStatus.MasterLabel);
// This is where I chose the existing contact, but as I want a new account created, then I do not specify an account id
        lc.setContactId(existingContact.Id); 

        Test.startTest();
        Database.LeadConvertResult lcr = null;
        User testUserContext = TestUtil.getTestContextUser(true);
        System.runAs(testUserContext) {
// Here is fails
            lcr = Database.convertLead(lc); 
        }
        Test.stopTest();
I get the error: System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null: [Id]
Hi.

In short Apex displays currency as 111,222.33
I want the currency displayed as 111.222,33 (Danish currency format).
Searching the Internet yielded scarce results and no solutions.

I have tried 
                        <apex:outputText value="kr. {0, number, #.###,##}">
                        <apex:param value="{!Account.total_oms_index_sidste_aar__c}"/>              
                        </apex:outputText>

but this just gave me an error due to format pattern for the number being invalid.

Is there a solution to this problem? If so what is it?
Hi,

I created a Territory2Rule in my sandbox org, then retrieved it with SFDX to my local machine, modified some content (not the <name> attribute nor file name), and tried to deploy it back to the sandbox org.

However, it throws an error saying:
Unable to derive the fully qualified name for component at location territory2Models/<rule API name>.territory2Rule.
I am not sure, what exactly that means, since I have not modified the name attribute nor the file name after I retrieved it from the org.

Any input is welcome.

BR, Nicky
Hi

How do you test the Lead Convert where you have selected the following from the UI:
  • New account should be created
  • Existing contact is selected
  • No opportunities
The documentation states, that you can use LeadConvert.setConvertedContactId, but then you have to set the ConvertedAccountId to be the same - but this contradicts what my use case is.
public static testMethod void myTest(){
        Contact existingContact = TestUtil.createContact(true);

        Lead ld = TestUtil.createLead(false);
        ld.FirstName = 'FirstName';
        ld.LastName = 'LastName';
        ld.ContactPersonFirstName__c = 'NOT FirstName';
        ld.ContactPersonLastName__c = 'NOT LastName';
        insert ld;

        Database.LeadConvert lc = new Database.LeadConvert();
        lc.setLeadId(ld.id);
        LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true LIMIT 1];
        lc.setConvertedStatus(convertStatus.MasterLabel);
// This is where I chose the existing contact, but as I want a new account created, then I do not specify an account id
        lc.setContactId(existingContact.Id); 

        Test.startTest();
        Database.LeadConvertResult lcr = null;
        User testUserContext = TestUtil.getTestContextUser(true);
        System.runAs(testUserContext) {
// Here is fails
            lcr = Database.convertLead(lc); 
        }
        Test.stopTest();
I get the error: System.DmlException: ConvertLead failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, accountId must be specified if contactId is not null: [Id]
Hi.

In short Apex displays currency as 111,222.33
I want the currency displayed as 111.222,33 (Danish currency format).
Searching the Internet yielded scarce results and no solutions.

I have tried 
                        <apex:outputText value="kr. {0, number, #.###,##}">
                        <apex:param value="{!Account.total_oms_index_sidste_aar__c}"/>              
                        </apex:outputText>

but this just gave me an error due to format pattern for the number being invalid.

Is there a solution to this problem? If so what is it?
Hi Team,

I see the Apex mentioned below in my org,
ForgotPasswordController
LightningForgotPasswordController
LightningLoginFormController
LightningSelfRegisterController
ChangePasswordController
CommunitiesLandingController
CommunitiesLoginController
CommunitiesSelfRegConfirmController
CommunitiesSelfRegController

It has corresponding Visual force and Aura components.

It looks like they are automatically generated by sfdc.com.

I am not sure under what circumstance do they get generated? Any suggestions?
Where can I find the description for those Apex, Aura and Visual Force Lightning components?

Many Thanks in advance!