• Ventzi Iankoulov
  • NEWBIE
  • 20 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

Hi guys,


please can somebody help to figure out the cause of the below described issue,
We have a screen flow.
On the last screen we offer users an option to be re-directed to the Asset record created in the course of flow execution. The redirection is done via Aura component-based action.


Originally the flow had to be launched from a component on user’s Home Page. If launched from there, the final re-direction to the Asset records works without problems!
Recently there was a requirement to enable the users to launch the flow also from an Object’s list view.
To accommodate this requirement I have implemented a List Button, which launches the flow via Link URL (e.g. {!$Site.BaseUrl}/flow/mdr_new_asset_flow).
Unfortunately, when the flow is launched via the list button the redirection button does not work!


In summary:
The same flow (mdr_new_asset_flow ) with the same redirection action behaves differently depending on place from where it is launched:
• The redirection to the asset works, if the flow is launched from the Home Page;
• The redirection to the asset do NOT function, if the flow is launched from the list button.

Please could you help us to find an explanation of the faced behavioral.
Thank you in advance!
Ventzi

 

Hello guys,
I’m working on my first ever apex class and currently facing the following issue.
In the class, which I wrote I use getInstance() method as follow:

Id mdrQueueId = (Id)User_Id__c.getInstance().get('mdr_queue_id__c');

to query Custom Settings and get the Id of a queue, which I use later on to update a Case Owner.

When I test the relevant functionality via GUI (as SysAdmin & regular user), everything is working perfect. The query returns the correct queue Id and the Case owner gets updated.

But, if I run the relevant test class, it fails!
I saw that the reason for this is that in case of test class execution the same query returns null instead of the actual Id.
I ran the test both as SysAdmin and as regular user. In both cases I get mdrQueueId = null.
I get the same result (null) if I use the query directly in (another) test class.

Please can you help me understand what causes such different behaviour?
Is there any principle difference by the use of getInstance() method in regular apex classes and test classes?

Thank you in advance!

Ventzi
 

Hi guys,

Please can you help me understand platform behavior in the following situation.
I’m testing a change of relationship between standard Case object and a custom object, let’s call it simply “customObject”.
In the course of the testing (on a sandbox) I have notice that when I change the relationship from the current Lookup to  Master-Detail  previously existing customObject__Share disappears. I think this is Ok and expected, but if I revert the relationship from Master-Detail back to Lookup no new customObject__Share get created. 
I have observed this on two different instances.

Is this normal behavior?
I would have expected that when I convert a relationship from Master-Detail to Lookup a new customObject__Share will be automatically created!?

If this is normal, I'm wondering how the platform is handling the sharing of a custom object, which originally was on a Detail side of a Master-Detail relationship, but at some point of time the relationship was change to Lookup?


Thank you very much in advance!
Ventzi

Hello guys,
I’m working on my first ever apex class and currently facing the following issue.
In the class, which I wrote I use getInstance() method as follow:

Id mdrQueueId = (Id)User_Id__c.getInstance().get('mdr_queue_id__c');

to query Custom Settings and get the Id of a queue, which I use later on to update a Case Owner.

When I test the relevant functionality via GUI (as SysAdmin & regular user), everything is working perfect. The query returns the correct queue Id and the Case owner gets updated.

But, if I run the relevant test class, it fails!
I saw that the reason for this is that in case of test class execution the same query returns null instead of the actual Id.
I ran the test both as SysAdmin and as regular user. In both cases I get mdrQueueId = null.
I get the same result (null) if I use the query directly in (another) test class.

Please can you help me understand what causes such different behaviour?
Is there any principle difference by the use of getInstance() method in regular apex classes and test classes?

Thank you in advance!

Ventzi
 

Hi guys,

Please can you help me understand platform behavior in the following situation.
I’m testing a change of relationship between standard Case object and a custom object, let’s call it simply “customObject”.
In the course of the testing (on a sandbox) I have notice that when I change the relationship from the current Lookup to  Master-Detail  previously existing customObject__Share disappears. I think this is Ok and expected, but if I revert the relationship from Master-Detail back to Lookup no new customObject__Share get created. 
I have observed this on two different instances.

Is this normal behavior?
I would have expected that when I convert a relationship from Master-Detail to Lookup a new customObject__Share will be automatically created!?

If this is normal, I'm wondering how the platform is handling the sharing of a custom object, which originally was on a Detail side of a Master-Detail relationship, but at some point of time the relationship was change to Lookup?


Thank you very much in advance!
Ventzi