• Ross McLeod 3
  • NEWBIE
  • 50 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 12
    Replies
Hi

I have a requirement to create a validation rule which validates a start and end date are within the same week.

* Week is classed as Monday to Sunday
* Both dates must fall within the same week

I'm not sure how to accomplish this as I believe that Salesforce week os Sunday to Saturday.

Thanks
Hi

I've created a Custom Field on the user object and I need to update this using the rest API. I keep getting a 204 No Content Response.

The url I am using is: services/data/v51.0/sobjects/user/myUserId

I am using a Patch Request to run the update.

The body of my update contains just the custom field that I wish to update which is an encrypted text field.

Any help most appreciated.

 
Hi

Hopefully a quick and easy one. I'm trying to build a lightning component for use within a screen flow. I'm having issues getting the attributes from the component back to the flow.

This is the attribute on the component:
<aura:component access="global" implements="lightning:availableForFlowScreens">

   <aura:attribute name="responseValue" type="Boolean" />
</aura:component>

This is the Design File
<design:component label="RUK Dialog Response Buttons">
    <design:attribute name="responseValue" label="Dialog Response" />
</design:component>

In my flow form I can add the component and see the input and out put parameters.

Flow Screen

I set up a flow variable, but I can't seet that when I try and assign from the flow component.
Flow Variable

Any ideas?
Hi 

Hope to pick all your brains about how best to deploy all changes from a scratch org to sandbox and production.

We have a team of three developers each using VS Code and the Salesforce CLI to do coded development and Sys Admin configuration. The plan is for each developer to create a scratch org and a new branch per sprintthen at the end we merge sprint branches to a deployment branch and put that into the Test Environment. We would then start the next sprint by creating a new branch from the merged one so that we all have each others changes.
  • We have set up Dev, Test, UAT, and production environments*
  • We have then created scratch org and installed relevant packages
  • Any code is pushed from VS code to the scratch org
  • Any declarative dev including flows, page layouts, custom objects and fields, permissions and profiles are done in the scratch orgs, these changes are then pulled back to VS Code
  • We are then committing our changes to our Git Hub Repository
  • The branches have then been merged together to the deployment branch
  • When deploying we are using SFDX force:source:deploy command
What we have found when deploying is that there are some issues with the following not being included when pulling back from scratch org:
  •  Changes to profiles 
  • Changes to Page layouts
We have checked the Force.Ignore and Git.Ignore files and can't see anything obvious blocking this sort of change.

The really strange thing is that if we clone a profile that isn't pulling through and it will then pull through.
  • Are there limitations to what you can deploy via the CLI?
  • Can you deploy all configuration from Scratch Org to Sanbox including profiles, page layouts permissions

Any insights you might have in this would be much appreciated.

Many thanks

Ross
Hi

I'm fairly new to flow development but I'm trying to be a bit efficient when it comes to building them keeping in mind the governor limits. So what I wanted to do was build a master flow which runs when an object is saved which runs various subflows. What I want to do in the master is select the record and pass that off to the subflows which will alter the data and then pass it back out and set a "Data Changed" variable so the master know if it has to save the record. 

Problem seems to be that although I have selected the record out in the master I don't seem to be able to pass that to the input variable on my subflow.

This is my Master Flow

Master Flow
Candidate Record Variable
Candidate Record Variable


Sub Flow
Subflow


The Email action was put in so that I could check that the record selected had been populated when I ran / debugged the flow. Which it was. 

I think the issue is because the Candidate Record input variable is not being set but I'm not sure why.

Anyone that has any ideas would be a life saver.

Thanks
Hi All

I want to send an Email to a group Email address so that System Admin are alerted to errors with Flows.

1. Is there a better way of doing this?
2. Is it possible to set a global variable for the EMail address so that all flows can access that Email address?

Many thanks

Ross
Hi

I have a requirement that when a child account is saved a validation rule needs to check against a filed on the top level account. 

I can do this via a trigger because I can select the clients then recursively loop up to the top client. However I was looking at doing in a flow and wondered how you can raise an error out of the flow to show stop the process and show to the user there is a rule that has been hit?

I read somewhere that auto launched flow should be able to complete with no issue. So my question is really what is the recommended approach to dealing with complex business rules that can not be done using validation rules.

Thanks
Hi All

I'm hoping for some advice on how to secure our data. We're just starting out on migrating our recruitment platform to Salesforce and I'm trying to solve the business requirements for data visibility and management. We have the following requirements:

* All Clients, Contacts, and Applicants must be visible and editable to all of our end users
* On a day to day basis users must be able to quickly see their records
* They must be able to quickly see records of those members of their immeadiate team who are out of the office
* Managers should be able to see all their records and those of the people reporting to them and also view this data in reports.
* There is a requirement where we have admin teams that will need to see records belonging to a subset of users but across teams. E.g if you have teams A, B, C, D and Admin team may only see records for A & B and another teams would be C & D

At first we looked at just having an open database, but I can't see how you would be able to create lists to filter the data correctly unless I create a team structure and assign teams to the relevant objects. That way you can add filters for that field.

I looked at Role Hierarchy. This seems to work effectively for vertical management of data but wouldn't give me the admin team ability, nore would all users see all records

Shareing rules would allow me to share the data cross team, but this shows all records any user has access to. Is there a way to create a filter on a list by team? I think what it does is say I share  A & B teams, but I also have C and all are shared as well, there is no way just to show the data for A & B because they also have C!?

Account Groups seems to be more for setting up a team for an individual Account rather than multiples?

Does anyone know if what our business wants is possible using Salesforce data management or is the best solution going to be to have an open database and add team field which can then be filtered?

Many thanks in advance
Hi All

Apologies in advance for the lengthy post, but I'm looking for some advice on how best to integrate two salesforce orgs and without the requirement it might be difficult to give advice. 

We are going to be using one which was built by a 3rd party as a recruitment platform for both temp and perm roles and another which is a job scheduling tool built by a different 3rd party which we have already integrated our current front office system with.

We will need to integrate the new salesforce platform with the job scheduleing org. The basic requirement would be that an action performed in the recruitment platform will send an applicant over to the job scheduler and from then on keep them in sync. I.e. if the candidates name is changed it will automatically flow through to the job scheduler.

One other thing to consider is that there are custom objects in each system which are the same but have different names and different named fields so there is mapping to be done.

It is only required that the data flows one way from the recruitment platform to the scheduler. We do not need changes made to the applicant there to be reflected back.  

There seems to be a number of different ways orgs can be connected.

1. Salesforce Connect - seems to be a possibility but that would tightly couple the systems and I'm not sure if you can take a contact from one org and generate a contact in the other using this?

2. Can triggers be used to pick up on changes and then update the other org, but I'm not sure if API calls can be made from a trigger

3. Something like Jitterbit, or Heroku to pick up on changes?

4. We are already pulling changes from the org using triggers to populate an export table. We can piggy back off that and send using the API.

Basically I would like to know what other people have done to integrate two platforms to accomplish our needs and what thoughts are there on which way is best practive!

Any help and advice on this would be appreciated.

Kind regards

Ross
Hi All

We have a requirement at work where we need to relate multiple addresses to a custom object. I believe that the address data type is currently not available to use on custom object, however I would like to know if it is possible to access the address finding api that the address on Account uses so that I can build a web component to populate my custom address object?

Many thanks

Ross
Hi All

I am trying to create a component similar to the lighting accordion. The reason I am not using that is because I want to be able to add buttons and styling to the header which I don't believe is possible in the accordion.

I want to be able to use an aura iterator to render my accordion from a list. I blieve what I need to do is find a div element within each section which would contain the body of the accodion section. However what I'm unsure of is how I would go about this in my controller.

Any help and advice greatly appreciated.

Thanks

Ross
Hi All

I've got an issue with Visual Studio Code and using the Salesforce CLI. Up until this weekend all was working fine, I could hapily create lightning component and deploy them to my org.

However without me having changed anything I am now getting the below error when adding a new lightining component:
Starting SFDX: Create Lightning Component

07:40:42.424 sfdx force:lightning:component:create --componentname EtwCandidateRequirement --outputdir force-app\main\default\aura
(node:2068) [UnknownConfigKey Plugin: sfdx-cli] UnknownConfigKey Plugin: sfdx-cli: Unknown config key: disableTelemetry
module: @oclif/config@1.15.1
task: runHook prerun
plugin: sfdx-cli
root: C:\Program Files\Salesforce CLI\client
See more details with DEBUG=*
ERROR running force:lightning:component:create:  Command failed with exit code 1: npm root -g --prefix c:\Repository\Org Explorer\.yo-repository --loglevel error
'npm' is not recognized as an internal or external command,
operable program or batch file.
07:40:44.269 sfdx force:lightning:component:create --componentname EtwCandidateRequirement --outputdir force-app\main\default\aura
 ended with exit code 1

I have tried uninstalling and re-installing the CLI which hasn't resolved the issue. 

Has anyone else had this issue?

Thanks
 

Ross

Hi all

We're just starting out on developing a salesforce application and I've got a use case I'd like some advice on.

We have a requirement where the business would like to have a form on a community page which will allow customers to upload a document to which will then go to the user who owns the customer record.

I believe I can accomplish this in the following way:

* Create a custom object for the document (Registration Form)
* Fields on the object - Customer (Lookup, to relate to customer), Status (Picklist, with values submitted, approved, rejected)
* Allow related files and notes for the object
* Create the approval process which I'd like to be submitted from the customer and be sent to the owner on the customer record and for the approval/rejected to go back to the customer.
* Ideally I'd also like to set up a chatter notification as well
* Other icing on the cake would be to have the approval process kicked off automatically when the customer uploads the document rather than them have to click the submit for approval

First of all does this sound like I've got the right idea, there are plenty of examples for approvals coming from staff to managers but few that I've found where its from a community user?

If so how do I get to the owner of the customer record when setting up the approval process?

Is it possible to run this process automatically when the file is submitted?

Many thanks for any advice you can give?
Hi

I have a requirement to create a validation rule which validates a start and end date are within the same week.

* Week is classed as Monday to Sunday
* Both dates must fall within the same week

I'm not sure how to accomplish this as I believe that Salesforce week os Sunday to Saturday.

Thanks
Hi

I've created a Custom Field on the user object and I need to update this using the rest API. I keep getting a 204 No Content Response.

The url I am using is: services/data/v51.0/sobjects/user/myUserId

I am using a Patch Request to run the update.

The body of my update contains just the custom field that I wish to update which is an encrypted text field.

Any help most appreciated.

 
Hi

I'm fairly new to flow development but I'm trying to be a bit efficient when it comes to building them keeping in mind the governor limits. So what I wanted to do was build a master flow which runs when an object is saved which runs various subflows. What I want to do in the master is select the record and pass that off to the subflows which will alter the data and then pass it back out and set a "Data Changed" variable so the master know if it has to save the record. 

Problem seems to be that although I have selected the record out in the master I don't seem to be able to pass that to the input variable on my subflow.

This is my Master Flow

Master Flow
Candidate Record Variable
Candidate Record Variable


Sub Flow
Subflow


The Email action was put in so that I could check that the record selected had been populated when I ran / debugged the flow. Which it was. 

I think the issue is because the Candidate Record input variable is not being set but I'm not sure why.

Anyone that has any ideas would be a life saver.

Thanks
Hi

I have a requirement that when a child account is saved a validation rule needs to check against a filed on the top level account. 

I can do this via a trigger because I can select the clients then recursively loop up to the top client. However I was looking at doing in a flow and wondered how you can raise an error out of the flow to show stop the process and show to the user there is a rule that has been hit?

I read somewhere that auto launched flow should be able to complete with no issue. So my question is really what is the recommended approach to dealing with complex business rules that can not be done using validation rules.

Thanks
Hi All

I'm hoping for some advice on how to secure our data. We're just starting out on migrating our recruitment platform to Salesforce and I'm trying to solve the business requirements for data visibility and management. We have the following requirements:

* All Clients, Contacts, and Applicants must be visible and editable to all of our end users
* On a day to day basis users must be able to quickly see their records
* They must be able to quickly see records of those members of their immeadiate team who are out of the office
* Managers should be able to see all their records and those of the people reporting to them and also view this data in reports.
* There is a requirement where we have admin teams that will need to see records belonging to a subset of users but across teams. E.g if you have teams A, B, C, D and Admin team may only see records for A & B and another teams would be C & D

At first we looked at just having an open database, but I can't see how you would be able to create lists to filter the data correctly unless I create a team structure and assign teams to the relevant objects. That way you can add filters for that field.

I looked at Role Hierarchy. This seems to work effectively for vertical management of data but wouldn't give me the admin team ability, nore would all users see all records

Shareing rules would allow me to share the data cross team, but this shows all records any user has access to. Is there a way to create a filter on a list by team? I think what it does is say I share  A & B teams, but I also have C and all are shared as well, there is no way just to show the data for A & B because they also have C!?

Account Groups seems to be more for setting up a team for an individual Account rather than multiples?

Does anyone know if what our business wants is possible using Salesforce data management or is the best solution going to be to have an open database and add team field which can then be filtered?

Many thanks in advance
Hi All

We have a requirement at work where we need to relate multiple addresses to a custom object. I believe that the address data type is currently not available to use on custom object, however I would like to know if it is possible to access the address finding api that the address on Account uses so that I can build a web component to populate my custom address object?

Many thanks

Ross
Hi All

I've got an issue with Visual Studio Code and using the Salesforce CLI. Up until this weekend all was working fine, I could hapily create lightning component and deploy them to my org.

However without me having changed anything I am now getting the below error when adding a new lightining component:
Starting SFDX: Create Lightning Component

07:40:42.424 sfdx force:lightning:component:create --componentname EtwCandidateRequirement --outputdir force-app\main\default\aura
(node:2068) [UnknownConfigKey Plugin: sfdx-cli] UnknownConfigKey Plugin: sfdx-cli: Unknown config key: disableTelemetry
module: @oclif/config@1.15.1
task: runHook prerun
plugin: sfdx-cli
root: C:\Program Files\Salesforce CLI\client
See more details with DEBUG=*
ERROR running force:lightning:component:create:  Command failed with exit code 1: npm root -g --prefix c:\Repository\Org Explorer\.yo-repository --loglevel error
'npm' is not recognized as an internal or external command,
operable program or batch file.
07:40:44.269 sfdx force:lightning:component:create --componentname EtwCandidateRequirement --outputdir force-app\main\default\aura
 ended with exit code 1

I have tried uninstalling and re-installing the CLI which hasn't resolved the issue. 

Has anyone else had this issue?

Thanks
 

Ross

Hi all

We're just starting out on developing a salesforce application and I've got a use case I'd like some advice on.

We have a requirement where the business would like to have a form on a community page which will allow customers to upload a document to which will then go to the user who owns the customer record.

I believe I can accomplish this in the following way:

* Create a custom object for the document (Registration Form)
* Fields on the object - Customer (Lookup, to relate to customer), Status (Picklist, with values submitted, approved, rejected)
* Allow related files and notes for the object
* Create the approval process which I'd like to be submitted from the customer and be sent to the owner on the customer record and for the approval/rejected to go back to the customer.
* Ideally I'd also like to set up a chatter notification as well
* Other icing on the cake would be to have the approval process kicked off automatically when the customer uploads the document rather than them have to click the submit for approval

First of all does this sound like I've got the right idea, there are plenty of examples for approvals coming from staff to managers but few that I've found where its from a community user?

If so how do I get to the owner of the customer record when setting up the approval process?

Is it possible to run this process automatically when the file is submitted?

Many thanks for any advice you can give?