Posts
Conditional Loops
- Get link
- X
- Other Apps
if (condition) {} else {} ------------------------------------------------------------------ If needed to give another condition to the else, has to use ELSE IF: if(condition) {} else if(condition) {} ------------------------------------------------------------------------ if {} 1 if{} 2 else{} 2 else{} 1 --------------------------------------------------------------------------------------- IF , ESLE IF, ELSE: ---------------------------------------------------------------- Switch: ---------------------------------------------------------------------------------------------------- Function Expression: Function Self Invoke: Accessing Objects
Cascade Variables
- Get link
- X
- Other Apps
Cascade Variables: Cascade Variables (once you click on tick the box) allow the functionality of using the same value in different catalog items by pulling from the initial form. Cascading allows values entered for variables in the initial order form to be passed to the equivalent variables in the ordered catalog items. For example, a variable on the initial order form prompts the customer to enter a delivery location value. If you enable cascading, the value for this variable then populates delivery location fields on each of the ordered items. It works like this- select the Cascade variables check box when creating the order guide. Then, create variables on the catalog items that match the names of the corresponding variables in the order guide. When a customer places an order, the variables on the ordered items inherit the values of the identically named variables in the order guide.
Call a servicenow workflow thorough business rule script
- Get link
- X
- Other Apps
Error's in Coding
- Get link
- X
- Other Apps
Unterminated String Literal : Missed quotes Variable is not declared: The variable is not declared in the CODE Undefined If a variable is declared but not defined. Ex: var students; var students = abc gs.info(students); EX: 'ga' is not defined, using noncommon variable names EX: ga.info(" Hello " ); Why are two 'while' loops that can't be executed within one GlideRecord query? probably because when the 1st while loop ends the Gliderecord object refers to the last record for that query and thereafter it won't iterate over again as no records exist for this query
REST Integration
- Get link
- X
- Other Apps
REST - REpresentational State Transfer. It can accommodate - XML, JSON, HTM, Plain Text. Rest uses HTTP methods to interact with the remote system. These include GET - To read a resource. POST - To create a resource. PATCH - Update the specific value in the record. (Can send only the data needed to be updated, no need for full data) PUT - Update an existing resource or create a new one if needed. (Need to send all info) DELETE - To remove a resource. These deal with how data is passed to the REST API : Query parameters: Path parameters: Headers: Request Body: We have the inbound API's in the REST API Explorer. We can create the custom API's in the Scripted REST API. Scripted REST API: A Good plan 1. Purpose. 2. Inputs. (Path Parameters, Query Parameters, Request Body(Used input, post, and patch)) 3. Outputs. 4. Security for API. Requires Authentication, Requires snc_internal Role, ACL ( type = Endpoint). 5. Versioning: M...