Avoid api.boundCall
Background
api.boundCall() is a super powerful function, however, try to avoid it as much as you can. Configuration full of bound calls is a bad practice for the following reasons:
It makes the code more complex and there is a high risk for the project – you never know if the bound call you design will work in future releases.
It runs in a different thread, so there may be clashes.
Bound partition must always be set up against some technical account created specifically for the bound call purpose. Never use personal accounts, since these will get removed when a person leaves the company or by the customer during regular security audit checks. The customer is the authority to maintain accounts and therefore should provide an email address for that account since pricefx.eu/com address gets automatically deactivated.
Future Vision
The long term vision is to deprecate api.boundCall() and replace it with Groovy API. Please log a Jira ticket for the function you miss and implement using api.boundCall and assign it boundCallDeprecate tag.
Product epic: https://pricefx.atlassian.net/browse/PM-2161
Customer Innovation Jira ticket: https://pricefx.atlassian.net/browse/PFCINNV-50
Bees Knees release plan: Object creation and modification
api.backendCall()
In dashboards there is a similar functionality which can execute the REST call from a button in a portlet without the need to configure the bound partition.
def payload = api.jsonEncode([
"data" : ...,
])
def ctrl = api.newController()
ctrl.addBackendCall(", "add/X", payload, "Record was created sucessfully", "Could not create record")
return ctrlThe drawback of this solution is that the REST call is not done during the logic run, but when the user clicks the button. On the other hand, the benefit is that you do not have to configure the bound partition, which is often "localhost".
Tickets
Completed Requests
Mass addOrUpdate (Hurricane 9.0) https://pricefx.atlassian.net/browse/PFUN-14440
Mass delete (Hurricane 9.0) https://pricefx.atlassian.net/browse/PFUN-14477
Mass add (Hurricane 9.x - TBD) https://pricefx.atlassian.net/browse/PFUN-14719
Mass update (Hurricane 9.x - TBD) https://pricefx.atlassian.net/browse/PFUN-14476
Open Requests
Tickets below are in order of priority. Please comment on this article with priority change requests or additions.
Make massAddOrUpdate, massEdit and massDelete: https://pricefx.atlassian.net/browse/PM-877
PGI recalculation trigger improvements: https://pricefx.atlassian.net/browse/PM-2040
Data retrieval - users, DCR, data from other partitions: https://pricefx.atlassian.net/browse/PM-2037
Automated creation of PLs and LPGs: https://pricefx.atlassian.net/browse/PM-304
Convert quote to deal: https://pricefx.atlassian.net/browse/PM-2039
CLIC module mass updates: https://pricefx.atlassian.net/browse/PM-908
Question
For what reason did you need to use api.boundCall? Please state your answers in the comments below this article.
Found an issue in documentation? Write to us.