-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Salesforce Standard Order object OpportunityID field not recognized #98
Comments
Workaround for now: If you are using Flows to Generate Orders from Opps, you can add a custom Lookup(Opp) field to Order and update the Flow to set the custom lookup field to the Opp.Id in addition to setting the standard OpportunityId field. Base your rollups on the custom field. |
Yes this field is totally not accessable via Apex, most frustrating. Another option to workaround this would be to create a Field Update Workflow i think. |
I have no problem accessing and using the Order.OpportunityId field in any of the Apex I have written. |
Hmmmm, let me look closer into this then, i did a check in Annonymous Apex in Developer Console and it didn't compile. I'll take a closer look.... |
@afawcett I was not able to do this from my org. I tried to place OpportunityId as the relationship field and it did not exist still. Could you please guide me with the steps on how to make it work? I'm trying to create a roll up summary for the field Next Activity Date that will be allocated within the Opportunity object (Parent) and the Child Object is Task. |
On task I think you want WhatId
…On Mar 22, 2017 6:39 AM, "karenhite" ***@***.***> wrote:
@afawcett <https://github.com/afawcett> I was not able to do this from my
org. I tried to place OpportunityId as the relationship field and it did
not exist still. Could you please guide me with the steps on how to make it
work? I'm trying to create a roll up summary for the field Next Activity
Date that will be allocated within the Opportunity object (Parent) and the
Child Object is Task.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqvyZC1cFT0DXv7M4V0YxE8BCfYlkks5roSSmgaJpZM4DEwJ3>
.
|
Yup
…On Mar 22, 2017 6:59 AM, "karenhite" ***@***.***> wrote:
[image: screenshot 2017-03-22 07 59 17]
<https://cloud.githubusercontent.com/assets/26600847/24201378/7cef3f32-0ed5-11e7-8bdf-944e86be3d9c.png>
Is this what you are saying?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqtQIaXjTSmnopq4FKq1YZXuDLflZks5roSlcgaJpZM4DEwJ3>
.
|
Use calculate or edit one of them. Dlrs needs edit or create or update
calls to trigger.
…On Mar 22, 2017 7:02 AM, "karenhite" ***@***.***> wrote:
Did not seemed to work. I have 2 Open activities and the Next Activity
Date field is not getting filled out.
[image: screenshot 2017-03-22 08 01 29]
<https://cloud.githubusercontent.com/assets/26600847/24201502/d4323970-0ed5-11e7-96de-e77c83536552.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqkq2PpbOgUeJXi5IFssVrMYYYDS1ks5roSncgaJpZM4DEwJ3>
.
|
Tried to do that and still the field is not being updated. Also, when the rollup summary is active, I'm not able to edit or create any tasks. |
Is the dlrs active? Have you deployed the trigger? What error do you get
when trying to create a task?
On Mar 22, 2017 7:07 AM, "karenhite" <[email protected]> wrote:
Tried to do that and still the field is not being updated. Also, when the
rollup summary is active, I'm not able to edit or create any tasks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqowKpXspsmnFssJ0Kk0gTRFRrwmTks5roSsXgaJpZM4DEwJ3>
.
|
You'll want to use the Last or First function when doing rollups on
date/time fields.
…On Mar 22, 2017 7:11 AM, "karenhite" ***@***.***> wrote:
[image: screenshot 2017-03-22 08 10 00]
<https://cloud.githubusercontent.com/assets/26600847/24201871/035d3e60-0ed7-11e7-9316-fe878b7f826a.png>
It is active and the trigger has been deployed. This is the error:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqqAvylBI-XhT-wCrZg8NKtKPo3dDks5roSwDgaJpZM4DEwJ3>
.
|
I'd like to see the min of open activities. Will First allow me to do so? |
The min so the oldest one?
…On Mar 22, 2017 7:19 AM, "karenhite" ***@***.***> wrote:
I'd like to see the min of open activities. Will First allow me to do so?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqohoQ5j67J2_-R_y1SDIgnVXD2rGks5roS4JgaJpZM4DEwJ3>
.
|
The closest of all of the open activities. If I have 3 dates:
|
The closest to what? To today's date?
…On Mar 22, 2017 7:22 AM, "karenhite" ***@***.***> wrote:
The closest of all of the open activities. If I have 3 dates:
1. March 22nd
2. March 30th
3. April 1st
I'd like to see March 22nd as the next activity date
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqiORIixS76o7uRZz1GRrfBWKcMWaks5roS6vgaJpZM4DEwJ3>
.
|
Yes, even if it's in the past (overdue) |
I forget how dlrs sorts records I think it is ascending so i think you'll
wanna use the first operator.
…On Mar 22, 2017 7:31 AM, "karenhite" ***@***.***> wrote:
Yes, even if it's in the past (overdue)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqhcVcOYMXCuUagjaFL6b5-cJZLPMks5roTC1gaJpZM4DEwJ3>
.
|
:( I tried to do it with First but now it gives me an error: Error:Master and detail fields must be the same field type (or text/Id based) for First or Last operations I checked both fields (ActivityDate) and Next Activity Date and they are both Date/Time fields. |
Activity date is a date not a date/time.
…On Mar 22, 2017 8:04 AM, "karenhite" ***@***.***> wrote:
:( I tried to do it with First but now it gives me an error: Error:Master
and detail fields must be the same field type (or text/Id based) for First
or Last operations
I checked both fields (ActivityDate) and Next Activity Date and they are
both Date/Time fields.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKqrtFNbc8j53qni7-zTBQaxde4lKQks5roTiTgaJpZM4DEwJ3>
.
|
Awesome. Ok so I was able to fix this and it is showing a date BUT it's showing the first activity date. I want it to be the first activity date of Open Activities not All Activities. How can I filter this? |
Set in the relationship criteria isClosed=false
…On Mar 22, 2017 9:13 AM, "karenhite" ***@***.***> wrote:
Awesome. Ok so I was able to fix this and it is showing a date BUT it's
showing the first activity date. I want it to be the first activity date of
Open Activities not All Activities. How can I filter this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APXKquOSWFzisE8dZxtYqzABBihHGaR8ks5roUisgaJpZM4DEwJ3>
.
|
It worked! Thank you so much! |
Now my only concern is that this trigger is affecting another workflow. I got this error below. FlowApplication [email protected] to me Add to Salesforce Tracking Follow-up
|
This is a process builder that you have that is failing. You can bring a formula down to the task that shows if an opp is closed and exclude dlrs where the opp is closed, or you can set up your flow to not fire when that dlrs field is being updated. |
Ok so I have the following things that are affecting:
How would I be able to make the exemption so this error is not applicable? |
What causes the flow to fire? |
The Stage to be marked as Closed Won |
Does it fire on every edit? Under Advanced on the Criteria in PB select the Do you want to execute the actions only when specified changes are made to the record? This will prevent it from running every time the record is edited and only when the record used to not meet the criteria and now does meet the criteria. |
This was checked already. When we got the error it was the first time the opportunity was being placed with Stage= Closed Won. |
I was reading about the Process Builder Calculation Mode. Would it help to include this action in the PB that is giving me an error? |
Not really, you are running into order of operations errors. PB is trying to make an update, and when PB makes that update it creates a Task, that triggers DLRS, that then runs into an error due to the validation rule of not able to update the opp. Need to figure out a way to let DLRS around the validation rule. |
Opportunity Validation Rule: Cannot Edit Closed Won OppsxAND( |
Tried to test it without luck. The error appeared again. |
Try turning off the VR 100% and see if the error still happens. |
Once the VR was deactivated, everything is running smooth. |
Yeah so the issue if trying to find a way to systematically have the VR allow DLRS to do its thing. The problem is DLRS will run as whatever user triggers it. |
Hello, I´m facing this same problem and I was not able to find the solution. the case seems to be closed. Can someone help ? Thanks, |
Trying to define a rollup from Order onto Opportunity using the standard Lookup(Opp) field gets Field does not exist on OpportunityId.
The text was updated successfully, but these errors were encountered: