• Alex Valavanis 10
  • NEWBIE
  • 65 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 27
    Questions
  • 20
    Replies
Hello,

I created a screen flow for approval process.

Flows gets the 11 fields from one custom object if they are not blank then the approval process triggers. If some fields are bank then there is a screen which shows the fields that needs to be updated.

Question: I have created an Update element for the Account object as 3 out of the 11 fields are formula fields. The other 8  fields belong to the custom object. Can i update fields to other objects as well? Is there a step by step guide anywhere?
Hello,

I created a screen flow which gets  records from a custom object, however i want to update from one object and some to another. How can i do that?
Below is the first update element.

User-added image
Hello,

I am receiving the below error and trying to figure out what's causing it. Could anyone assist?

Do i need to add the Approval Process Id as well in the "Action" element?

User-added image

How the Interview Started
Alex Valavanis (0051X000005w6AS) started the flow interview.
API Version for Running the Flow: 51
Some of this flow's variables were set when the interview started.
recordId = a2n0J000004KKNpQAO
GET RECORDS: Find_Distribution_Agreement_Info
Find all Distribution_Agreement__c records where:
Id Equals {!recordId} (a2n0J000004KKNpQAO)
Store the values of these fields in Find_Distribution_Agreement_Info: Agreement_Type__c, Regulatory_Status__c, LEI__c, Organisation__c, Name_of_Company_Register__c, Distributor_Contact_Title__c, Distributor_Contact_Phone__c, Distribution_Agreement_Business_Owner__c, Id, Status__c, Distributor_Contact_Email__c, Company_Number__c, Business_rationale__c
Result
Successfully found records.
DECISION: Do_we_have_required_fields
Outcome executed: Yes_we_have_required_Information
Outcome conditions:
1. {!Find_Distribution_Agreement_Info.Company_Number__c} (null) Does not equal
2. {!Find_Distribution_Agreement_Info.Name_of_Company_Register__c} (null) Does not equal
3. {!Find_Distribution_Agreement_Info.LEI__c} (null) Does not equal
4. {!Find_Distribution_Agreement_Info.Status__c} (Proposed) Equals Proposed
5. {!Find_Distribution_Agreement_Info.Distribution_Agreement_Business_Owner__r.Full_Name__c} (Chris Jones) Does not equal
6. {!Find_Distribution_Agreement_Info.Business_rationale__c} (Existing relationship) Does not equal
7. {!Find_Distribution_Agreement_Info.Distributor_Contact_Title__c} (Legal Counsel) Does not equal
8. {!Find_Distribution_Agreement_Info.Regulatory_Status__c} (Regulated) Does not equal
9. {!Find_Distribution_Agreement_Info.Distributor_Contact_Phone__c} (+49 5678943) Does not equal
10. {!Find_Distribution_Agreement_Info.Distributor_Contact_Email__c} (abc@acolin.com) Does not equal
11. {!Find_Distribution_Agreement_Info.Agreement_Type__c} (Distribution) Does not equal
Logic: Advanced Logic (((1 OR 2) OR 3) AND 4 AND 5 AND 6 AND 6 AND 7 AND 8 AND 9 AND 10 AND 11)
SUBMIT FOR APPROVAL: Distribution_Agreement_Approval_Process
Inputs:
objectId = {!recordId} (a2n0J000004KKNpQAO)


Error Occurred: No applicable approval process was found.

 
Hello,
I created a screen flow which basically gets and updates 3 fields from a custom objects.
Flow works ok however when i add values these values don't update.
Issue is that i want to update the those fields on the Account Object (as the fields are formula fields).
Could you please tell me how to resolve?

Also - If i wanted to  add a validation rule, where would i add this? I would like the validation to be:
- ​​​​​AND( ISBLANK(Organisation__r.LEI__c), OR( ISBLANK(Organisation__r.Company_Number__c), ISBLANK(Organisation__r.Name_of_Company_Register__c) ) )

User-added image
User-added image
Hello, I want to create a popup message alerting the users when they click on the Standard Button "Submit For Approval". I found the below link on how to do this, however i am receiving an error (Screenshot). Could you please help me? I have no experience in coding.

The Approval Process is called: "Distribution_Agreement_Onboarding"

(https://sfdcfanboy.com/2017/07/24/a-tip-a-day-2-display-custom-popup-message-while-submitting-for-approval/)

User-added image
public class ApprovalProcessor {

    webservice void submitAndProcessApprovalRequest() {

        // Create an approval request for the account
        Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
        
        req1.setComments('Submitting request for approval.');
        req1.setObjectId(a.id);
        
        // Submit on behalf of a specific submitter
        req1.setSubmitterId(user1.Id);
        
        // Submit the record to specific process and skip the criteria evaluation
        req1.setProcessDefinitionNameOrId('Distribution_Agreement_Onboarding');

        req1.setSkipEntryCriteria(true);

        // Submit the approval request for the account
        Approval.ProcessResult result = Approval.process(req1);

        // Verify the result
        System.assert(result.isSuccess());

        System.assertEquals(
            'Pending', result.getInstanceStatus(),
            'Instance Status'+result.getInstanceStatus());
         )

 
Hello I recently installed a Managed Package called "Marketing Calendar Free" and i want to add it either to the Home Page as a component or to the Campaign Object (or even to a campaign record). 
What i don't want want is to have it as another object as it will involve a lot of clicks for the user.

When i click on "Edit Page" to the Home Page i do not see "Marketing Calendar". How can i add it to a page layout?

Also - Can i also create a Quick Action to open the Calendar (managed package)
Hello,

Is possible to hide a lookup field if another field is flagged?

We have 2 fields

Fund (Lookup field)
Flag (checkbox)

Scenario is that if field "Flag" is ticked then Fund needs to be hidden. Can this be done within a page layout ? If not can it be done in a component?
Hello,

I created a visual force page and a custom button which allows to change the Ownership of Accounts from a custom list view. When i use it it works great. However if i log in as another user and i click the button i receive the insufficient privileges message. Could you please what i need to cross check?

User-added image
Hello,

I created a visualforce and a custom button which allows the users to change their account ownership from one user to another user. What i would like to add to this code is allow them to change the contact owner as well. Could you please assist me? The Contact Owner Field name is "OwnerId" as you would expect.

Below is my current visual force code and a screenshot of what i want to accomplish.
 
<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true">
    <apex:form >
        <apex:pageBlock title="Edit Accounts" mode="edit">
            <apex:pageMessages />
            <apex:pageblockButtons location="top">
                <apex:commandButton value="Save" action="{!Save}" id="saveButton"/>
                <apex:commandButton value="Cancel" action="{!cancel}" id="cancelButton"/>
            </apex:pageBlockButtons>
        <apex:pageBlockTable value="{!accounts}" var="A">
            <apex:column headerValue="Name">
                <apex:inputField value="{!A.name}"/>
            </apex:column> 
            <apex:column headerValue="Owner">
                <apex:inputField value="{!A.OwnerId}"/>
            </apex:column>
            <apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton" />
       </apex:pageBlockTable>         
    </apex:pageBlock>
  </apex:form>
</apex:page>

User-added image
Hello,
I am looking for a solution to help our users to select reports from the report tab. I was thinking a kind of "search bar" on their homepage where they would type some words and the report names would appear for them to select and open(?) - Any other solutions please do share.

Thanks
Hello,

I created a custom Lightning Component as i wanted to implement a Client Side Search functionality.
However, when i click "Preview" in Developer Console to test it i receive a white blank page. (code is correct and i have also have myDomain deployed.

Any ideas?

User-added image
Hello,

I created a visual force page which the user has the ability to update the Account Owner (Lookup field) by clicking a custom button, however my aim is to minimize the number of clicks.

How is it possible to enable a pop up window where the user can tick a box is order to update the selected records? Could someone assist me?

My visualforce code is below and I am adding a sceenshot of what i would like to accomplish.

<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true">
<apex:form >
<apex:pageBlock title="Edit Accounts" mode="edit">
<apex:pageMessages />
<apex:pageblockButtons location="top">
<apex:commandButton value="Save" action="{!Save}" />
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockTable value="{!selected}" var="A">
<apex:column headerValue="Name">
<apex:outputField value="{!A.name}"/>
</apex:column>
<apex:column headerValue="Owner">
<apex:inputField value="{!A.OwnerId}"/>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

User-added image
Hello,

I created a visual force page (and a custom button) which updates the account ownership from a list view. I would like to add inline editing to the below. Could you please assist me?

<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true">
    <apex:form >
        <apex:pageBlock title="Edit Accounts" mode="edit">
            <apex:pageMessages />
            <apex:pageblockButtons location="top">
                <apex:commandButton value="Save" action="{!Save}" />
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>
        <apex:pageBlockTable value="{!selected}" var="A">
            <apex:column headerValue="Name">
                <apex:outputField value="{!A.name}"/>
            </apex:column> 
            <apex:column headerValue="Owner">
                <apex:inputField value="{!A.OwnerId}"/>
            </apex:column>
       </apex:pageBlockTable>         
    </apex:pageBlock>
  </apex:form>
</apex:page>
Hello,

I recently created a visual force page on the Account object (And a custom button) which basically helps the user to update mass Accounts form a list view. Solution works great, however if I add a formula type field (text or number) to the page this cannot be updated by the user (screenshot provided). Is this because it is a formula field? Is there a way which we can solution this?

User-added image
Visual Force code shoud you require is:

<apex:page standardController="Account" recordSetVar="accounts" tabStyle="Account" sidebar="false" lightningStylesheets="true"> <apex:form > <apex:pageBlock title="Edit Accounts" mode="edit"> <apex:pageMessages /> <apex:pageblockButtons location="top"> <apex:commandButton value="Save" action="{!Save}" /> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!selected}" var="A"> <apex:column headerValue="Name"> <apex:outputField value="{!A.name}"/> </apex:column> <apex:column headerValue="Owner"> <apex:inputField value="{!A.OwnerId}"/> </apex:column> <apex:column headerValue="Record Type"> <apex:inputField value="{!A.RecordtypeId}"/> </apex:column> <apex:column headerValue="Client Type"> <apex:inputField value="{!A.Client_Type__c}"/> </apex:column> <apex:column headerValue="Country"> <apex:inputField value="{!A.Country__c}"/> </apex:column> <apex:column headerValue="Client Status"> <apex:inputField value="{!A.Client_Status__c}"/> </apex:column> <apex:column headerValue="First Funded"> <apex:inputField value="{!A.First_Funded__c}"/> </apex:column> <apex:column headerValue="Industry"> <apex:inputField value="{!A.Industry}"/> </apex:column> <apex:column headerValue="Last Contact"> <apex:inputField value="{!A.Last_Contact__c}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
Hello,

I am trying to find the name of user ID "00520000004FxxP" and can't find it (i created a user report and exported all users both active and inactive).

I received an Appex Application error saying the below and trying to investigate. Any ideas?

Apex script unhandled trigger exception by user 00520000004FxxP

Opportunity:execution of BeforeUpdate
caused by:System.QueryException:sObject type 'Product_c' is not supported.

Class.OpportunityTriggerHandler.populateFields: Line 59, Column 1
Trigger.Opportunity:line 17, column 1
Hello,
I need to create a custom controller since i my VF page shows only 20 records.

Can you please tell me how to do it?

The VF page created is the following.

<apex:page standardController="TaskTest__c" recordSetVar="records">  
    <apex:form >
        <apex:pageBlock title="Task Summary" mode="inlineEdit">      
            <apex:pageBlockTable value="{! records}" var="rec">   
                <apex:column headerValue="Name" >
                    <apex:outputField value="{! rec.Name}" />
                </apex:column>
                <apex:column headerValue="Discription " >
                    <apex:outputField value="{! rec.Discription__c}" />
                </apex:column>
                <apex:column headerValue="Estimated Date for Task" >
                    <apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
                </apex:column>
                <apex:column headerValue="Owner" >
                    <apex:outputField value="{! rec.Owner__c}" />
                </apex:column>
                <apex:column headerValue="Status " >
                    <apex:outputField value="{! rec.Status__c}" />
                </apex:column>
                <apex:column headerValue="User Story " >
                    <apex:outputField value="{! rec.User_Story__c}" />
                </apex:column>
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" 
                                        hideOnEdit="editButton" event="ondblclick" 
                                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:pageBlockTable>
            <apex:pageBlockButtons>
                <apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
 
Hello,

I've been given the following Apex code as i want to mass edit on a custom object "Task".
As i am new to Apex code i don't know wjat the steps are and how to use it. Could you please guide me?

So far i included it in VisualForce pages. What is my next step?


<apex:page standardController="Task__c" recordSetVar="records">  
    <apex:form >
        <apex:pageBlock title="Task Summary" mode="inlineEdit">      
            <apex:pageBlockTable value="{! records}" var="rec">   
                <apex:column headerValue="Name" >
                    <apex:outputField value="{! rec.Name}" />
                </apex:column>
                <apex:column headerValue="Description " >
                    <apex:outputField value="{! rec.Description__c}" />
                </apex:column>
                <apex:column headerValue="Estimated Date for Task" >
                    <apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
                </apex:column>
                <apex:column headerValue="Owner" >
                    <apex:outputField value="{! rec.Owner__c}" />
                </apex:column>
                <apex:column headerValue="Status " >
                    <apex:outputField value="{! rec.Status__c}" />
                </apex:column>
                <apex:column headerValue="User Story " >
                    <apex:outputField value="{! rec.User_Story__c}" />
                </apex:column>
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" 
                                        hideOnEdit="editButton" event="ondblclick" 
                                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:pageBlockTable>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Hello, 
I want to create a way of mass uploadin fields on custom object "task". I installed mass edit/update but the instructions for custom objects are very old and they have not updated them. Anyway...
Is there a way of doing this (have no visual force / apex experience) - please see my screenshots

User-added image

User-added image
Hello, I'm doing the following exercise but Debug LOg tells me i have a problem.

Traihead says to do the following:

User-added image

I replace my email address and the following comes up:

User-added image
Hi,

I've created a flow (custom clone button) in which whenever the end user clicks on a closed won opportunity a new opportunity is created with stage prospecting. For testing reasons i created a formula which names the opportunity "renewal testing". How can i use a formula which will take the year of the closed date and put it in the opportunity name? (in other words rename the opportunity "Renewal 2017" .

User-added image
Hello,

I created a screen flow which gets  records from a custom object, however i want to update from one object and some to another. How can i do that?
Below is the first update element.

User-added image
Hello, I want to create a popup message alerting the users when they click on the Standard Button "Submit For Approval". I found the below link on how to do this, however i am receiving an error (Screenshot). Could you please help me? I have no experience in coding.

The Approval Process is called: "Distribution_Agreement_Onboarding"

(https://sfdcfanboy.com/2017/07/24/a-tip-a-day-2-display-custom-popup-message-while-submitting-for-approval/)

User-added image
public class ApprovalProcessor {

    webservice void submitAndProcessApprovalRequest() {

        // Create an approval request for the account
        Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
        
        req1.setComments('Submitting request for approval.');
        req1.setObjectId(a.id);
        
        // Submit on behalf of a specific submitter
        req1.setSubmitterId(user1.Id);
        
        // Submit the record to specific process and skip the criteria evaluation
        req1.setProcessDefinitionNameOrId('Distribution_Agreement_Onboarding');

        req1.setSkipEntryCriteria(true);

        // Submit the approval request for the account
        Approval.ProcessResult result = Approval.process(req1);

        // Verify the result
        System.assert(result.isSuccess());

        System.assertEquals(
            'Pending', result.getInstanceStatus(),
            'Instance Status'+result.getInstanceStatus());
         )

 
Hello,

Is possible to hide a lookup field if another field is flagged?

We have 2 fields

Fund (Lookup field)
Flag (checkbox)

Scenario is that if field "Flag" is ticked then Fund needs to be hidden. Can this be done within a page layout ? If not can it be done in a component?
Hello,

I created a custom Lightning Component as i wanted to implement a Client Side Search functionality.
However, when i click "Preview" in Developer Console to test it i receive a white blank page. (code is correct and i have also have myDomain deployed.

Any ideas?

User-added image
Hello,

I am trying to find the name of user ID "00520000004FxxP" and can't find it (i created a user report and exported all users both active and inactive).

I received an Appex Application error saying the below and trying to investigate. Any ideas?

Apex script unhandled trigger exception by user 00520000004FxxP

Opportunity:execution of BeforeUpdate
caused by:System.QueryException:sObject type 'Product_c' is not supported.

Class.OpportunityTriggerHandler.populateFields: Line 59, Column 1
Trigger.Opportunity:line 17, column 1
Hi there,

I got following error on this Maintenance Cert Badge.

Challenge not yet complete... here's what's wrong:
Couldn’t find 'Find Contacts' with the correct information. Please double check the instructions.


Did you pass it?
What's wrong with my flow.
User-added image

Thanks in advance
Regards,
LinThaw
Hello,

I've been given the following Apex code as i want to mass edit on a custom object "Task".
As i am new to Apex code i don't know wjat the steps are and how to use it. Could you please guide me?

So far i included it in VisualForce pages. What is my next step?


<apex:page standardController="Task__c" recordSetVar="records">  
    <apex:form >
        <apex:pageBlock title="Task Summary" mode="inlineEdit">      
            <apex:pageBlockTable value="{! records}" var="rec">   
                <apex:column headerValue="Name" >
                    <apex:outputField value="{! rec.Name}" />
                </apex:column>
                <apex:column headerValue="Description " >
                    <apex:outputField value="{! rec.Description__c}" />
                </apex:column>
                <apex:column headerValue="Estimated Date for Task" >
                    <apex:outputField value="{! rec.Estimated_Date_for_Task__c}" />
                </apex:column>
                <apex:column headerValue="Owner" >
                    <apex:outputField value="{! rec.Owner__c}" />
                </apex:column>
                <apex:column headerValue="Status " >
                    <apex:outputField value="{! rec.Status__c}" />
                </apex:column>
                <apex:column headerValue="User Story " >
                    <apex:outputField value="{! rec.User_Story__c}" />
                </apex:column>
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" 
                                        hideOnEdit="editButton" event="ondblclick" 
                                        changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
            </apex:pageBlockTable>
            <apex:pageBlockButtons >
                <apex:commandButton action="{!quicksave}" id="saveButton" value="Save" rendered="true"/>
                <apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" rendered="true"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
</apex:page>
Hello, 
I want to create a way of mass uploadin fields on custom object "task". I installed mass edit/update but the instructions for custom objects are very old and they have not updated them. Anyway...
Is there a way of doing this (have no visual force / apex experience) - please see my screenshots

User-added image

User-added image
Hello, I'm doing the following exercise but Debug LOg tells me i have a problem.

Traihead says to do the following:

User-added image

I replace my email address and the following comes up:

User-added image
Hi,

I am unable to finish the dashborad.
"The 'LEAD Trend by Source' dashboard component does not have the wedges set to 'Lead Source'."

Wedges are set to "Lead Source"

Any clues?
 

Hey community,

I'm struggling with the logic of the task...

To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.

A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be inserted.

The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANK function for this check)

Here is what I got so far:

AND(
 NOT(ISBLANK(MailingPostalCode)),
 MailingPostalCode  <>  Account.ShippingPostalCode )

I THINK I know how to see if the contact mailing zip is not the same as the account shipping zip, and only if the is not blank.

The part I am stuck on is if the "Contact records with no associated parent account can be added with any MaiilingPostalCode value"...

I don't know what to do with that.

Also, I am now getting the error message when I recheck challenge:

Challenge not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contact_must_be_in_Account_ZIP_Code: [] 


Double help, please.

Hello developer heroes!

I'm working through the Apex modules on Trailhead and can't seem to get past this one: https://developer.salesforce.com/en/trailhead/force_com_programmatic_beginner/apex_triggers/apex_triggers_bulk.

Hopefully this doesn't read like a 'please complete the course for me' kinda post, but I have written a trigger that I believe meets the criteria but it isn't passing the check, so I wanted to seek the guidance of the experts.

The challenge is to do this:

Create an Apex trigger for Opportunity that adds a task to any opportunity set to 'Closed Won'.

To complete this challenge, you need to add a trigger for Opportunity. The trigger will add a task to any opportunity inserted or updated with the stage of 'Closed Won'. The task's subject must be 'Follow Up Test Task'.The Apex trigger must be called 'ClosedOpportunityTrigger'

- With 'ClosedOpportunityTrigger' active, if an opportunity is inserted or updated with a stage of 'Closed Won', it will have a task created with the subject 'Follow Up Test Task'.
- To associate the task with the opportunity, fill the 'WhatId' field with the opportunity ID.
- This challenge specifically tests 200 records in one operation.


And here is the trigger I have come up with, which compiles OK and stands up to a manual (though admittedly unbulkified) test:
trigger ClosedOpportunityTrigger on Opportunity (after insert, after update) {

    List<Task> taskList = new List<Task>();
    
    for (Opportunity opp : [SELECT Id, StageName FROM Opportunity WHERE StageName = 'Closed Won' AND Id IN :Trigger.new]){
                    
            taskList.add(new Task(Subject = 'Follow Up Test Task',
                                  WhatId = opp.Id));
       
    }

    if(taskList.size()>0){
        
        insert taskList;
        
    }
    
}
I have tried replacing the SOQL with a straightforward 'for (Opportunity opp : Trigger.new)' and having the taskList.add inside an IF that checks for Closed Won - no luck. I also thought about checking to see if the stage was being changed to Closed Won, rather than the trigger firing on every edit, but I don't think this is what the module is asking for.

Where do you think I'm going wrong?

Huge thanks in advance!