@resconet/jsbridge 18.1.0 → 18.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/JSBridge.d.ts +10 -6
- package/src/JSBridge.js +4 -8
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -2210,18 +2210,22 @@ declare module MobileCRM.UI {
|
|
|
2210
2210
|
public static openSalesEntityDetail(detail: MobileCRM.DynamicEntity, errorCallback: (err?: string) => void);
|
|
2211
2211
|
/**
|
|
2212
2212
|
* @since 18.0
|
|
2213
|
-
*
|
|
2214
|
-
* The clearance will
|
|
2215
|
-
* or 'Block save during sync and prevent sync while form is open'".
|
|
2216
|
-
*
|
|
2213
|
+
* Provides means to control concurrent access to data by form logic and background sync.
|
|
2214
|
+
* This method obtains a clearance to perform data manipulation. The clearance will be obtained when background sync is not running, or form sync behavior is configured as 'No action'.
|
|
2215
|
+
* If background sync is running and form sync behavior is configured to 'Block save during sync' or 'Block save during sync and prevent sync while form is open'", the clearance is not obtained.
|
|
2216
|
+
* Each obtained clearance must be dutifully released using leaveUiTransaction().
|
|
2217
|
+
* It is possible to call this method multiple times, but each call reserves its own internal clearance, so there must be the same number of calls to leaveUiTransaction to properly release clearance and allow background sync.
|
|
2217
2218
|
* @returns true if form can give the clearance, false if it is not possible at this time.
|
|
2218
2219
|
*/
|
|
2219
2220
|
public static tryEnterUiTransaction(): Promise<boolean>;
|
|
2220
2221
|
/**
|
|
2221
2222
|
* @since 18.0
|
|
2222
|
-
*
|
|
2223
|
+
* Provides means to control concurrent access to data by form logic and background sync.
|
|
2224
|
+
* This method releases the last clearance obtained by successful call to tryEnterUiTransaction.
|
|
2225
|
+
* Can be called even if all clearances are already released or were not obtained at all.
|
|
2226
|
+
* See tryEnterUiTransaction for more info.
|
|
2223
2227
|
*/
|
|
2224
|
-
public static leaveUiTransaction(): Promise
|
|
2228
|
+
public static leaveUiTransaction(): Promise<void>;
|
|
2225
2229
|
/**
|
|
2226
2230
|
* @since 9.3
|
|
2227
2231
|
* Binds or unbinds the handler for onSelectedViewChanged event on EntityForm.
|
package/src/JSBridge.js
CHANGED
|
@@ -5905,18 +5905,14 @@
|
|
|
5905
5905
|
/// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
|
|
5906
5906
|
MobileCRM.bridge.invokeMethodAsync("EntityForm", "ShowEntityDetailDialog", [detail.id], null, errorCallback, null);
|
|
5907
5907
|
};
|
|
5908
|
-
/// <summary>[v18.0] Obtains a clearance to perform manipulation with data.
|
|
5909
|
-
/// The clearance must be dutifully released using leaveUiTransaction() when manipulation is finished.
|
|
5910
|
-
/// The clearance will not be obtained if background sync is running and form sync behavior is configured to 'Block save during sync'
|
|
5911
|
-
/// or 'Block save during sync and prevent sync while form is open'".
|
|
5912
|
-
/// If form sync behavior is configured as 'No action', the clearance is always obtained.
|
|
5913
|
-
/// </summary>
|
|
5914
|
-
/// <returns>Returns true if form can give the clearance, false if it is not possible at this time.</returns>
|
|
5915
5908
|
MobileCRM.UI.EntityForm.tryEnterUiTransaction = function () {
|
|
5909
|
+
/// <summary>[v18.0] Provides means to control concurrent access to data by form logic and background sync. This method obtains a clearance to perform data manipulation. The clearance will be obtained when background sync is not running, or form sync behavior is configured as 'No action'. If background sync is running and form sync behavior is configured to 'Block save during sync' or 'Block save during sync and prevent sync while form is open'", the clearance is not obtained. Each obtained clearance must be dutifully released using leaveUiTransaction(). It is possible to call this method multiple times, but each call reserves its own internal clearance, so there must be the same number of calls to leaveUiTransaction to properly release clearance and allow background sync.</summary>
|
|
5910
|
+
/// <returns type="Promise<boolean>">Returns true if clearance is obtained, false if it is not possible at this time.</returns>
|
|
5916
5911
|
return MobileCRM.bridge.invokeCommandPromise("tryEnterUiTransaction");
|
|
5917
5912
|
};
|
|
5918
|
-
/// <summary>[v18.0] Notifies UI form that clearance obtained using successful call to tryEnterUiTransaction() is no longer needed, because data manipulation is complete.</summary>
|
|
5919
5913
|
MobileCRM.UI.EntityForm.leaveUiTransaction = function () {
|
|
5914
|
+
/// <summary>[v18.0] Provides means to control concurrent access to data by form logic and background sync. This method releases the last clearance obtained by successful call to tryEnterUiTransaction. Can be called even if all clearances are already released or were not obtained at all. See tryEnterUiTransaction for more info.</summary>
|
|
5915
|
+
/// <returns type="Promise<void>">Returns an awaitable promise.</returns>
|
|
5920
5916
|
return MobileCRM.bridge.invokeCommandPromise("leaveUiTransaction");
|
|
5921
5917
|
};
|
|
5922
5918
|
// MobileCRM.UI.EntityForm.DetailCollection
|