This topic contains 3 replies, has 0 voices, and was last updated by Olivier Gagnon NC 7 years, 3 months ago.
-
AuthorPosts
-
david.mendoza- Contributions: 0
- Level 1
- ☆
Good Morning Team.
When using nlapiLoadRecord in a script and do not use nlapiSubmitRecord, does this have any negative impact on the record?
Thanks.
This is a cached copy. Click here to see the original post. -
david.smith- Contributions: 0
- Level 1
- ☆
No. Unless you want to count the time to execute the load feature. nlapiLoadRecord is one of the most time consuming commands in the API.
-
david.mendoza- Contributions: 0
- Level 1
- ☆
Can you elaborate why its one of the most time consuming commands in the API?
Thanks.
david.smith replied on 05/24/2017, 11:41 AM: Because it has to load the entire record.If you do an nlapiLookupField or nlapiSearchRecord it will be faster because you’re only pulling the data you need, not everything. If you’re not modifying the record, don’t load it unless you need the entire record.
I had to optimize a very large sales order script (not written by me) once because it was timing out. During this optimization I was able to investigate best methods for retrieving data used. Replacing the load feature with searches significantly improved the scripts response time.
-
Olivier Gagnon NC- Contributions: 0
- Level 1
- ☆
Super edge case: if you’re using LoadRecord in a script type that triggers other scripts (ex: scheduled script), and the record loaded as a script deployed on the BeforeLoad trigger point, you could cause something to happen.
Otherwise, yeah. Like David said, it’s a costly thing to do, performance-wise.
-
AuthorPosts
You must be logged in to reply to this topic.