Auto Action Parameters

8 years 2 months ago - 7 years 11 months ago #278294 by edmundcheong
Auto Action Parameters was created by edmundcheong
What is the reload function for? Any documentation i can read on this?



What does the reference do? Can't seem to find the documents on this..

Thanks in advance..
Attachments:

Please Log in to join the conversation.

8 years 2 months ago - 8 years 2 months ago #278296 by krileon
Replied by krileon on topic Auto Action Parameters

What is the reload function for? Any documentation i can read on this?

If you chain multiple actions that alter the user object you need to reload the user object with each action as they won't have the changes made from the previous action.

To expand on this further CB Auto Actions, when possible, will use the user object sent by the trigger (if one exists) and pass it to its actions. This is typically the behavior you want except in the case of chaining user object changes in which case you need to reload the user object.

What does the reference do? Can't seem to find the documents on this..

CB Auto Actions can work with reference variables, but it has to be told in advance which variables of the trigger are references. For an explanation of references in PHP please see the below.

php.net/manual/en/language.references.php

This can be useful to counter the above chain-ability. For example if you are using a single trigger and know what variable you need as a reference (e.g. user object) then you don't need to reload the user as the reference will be modified. This requires knowing what the exact variables of a trigger are though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: edmundcheong

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.347 seconds

Facebook Twitter LinkedIn