Changes

Jump to navigation Jump to search
3,621 bytes removed ,  18:48, 27 August 2020
Line 117: Line 117:  
== Dynamic images ==
 
== Dynamic images ==
   −
When designing a custom [[view]] or [[form]], you can display images related to your record.
+
When designing a custom [[view]] or [[form]], you can display images related to your record. See [[Image examples]] for a more detailed description of a few frequent use cases.
    
* To learn more about what view and form images represent in Dynamics, please check this [http://blog.resco.net/2014/06/23/data-images-simply-explained/ blog post]. {{Badge|Blog}}
 
* To learn more about what view and form images represent in Dynamics, please check this [http://blog.resco.net/2014/06/23/data-images-simply-explained/ blog post]. {{Badge|Blog}}
Line 126: Line 126:  
You add pictures that were originally saved as Note attachments to the view and/or to an edit form. This way you can, for example, show the photo of your contact or a picture of your product in the app's forms and views.
 
You add pictures that were originally saved as Note attachments to the view and/or to an edit form. This way you can, for example, show the photo of your contact or a picture of your product in the app's forms and views.
   −
To display pictures on a view, you need to do following:
+
To display pictures on a view, you need to do the following:
    
# Edit an app project and select the entity from the '''Project''' menu.
 
# Edit an app project and select the entity from the '''Project''' menu.
Line 143: Line 143:  
If you use multiple ListNoteImage styles, you should make sure to set the correct style in the properties of the image item back in the view designer window.
 
If you use multiple ListNoteImage styles, you should make sure to set the correct style in the properties of the image item back in the view designer window.
   −
Now, you need to save these changes, publish the mobile project and synchronize the Mobile CRM application. Then open any Account record in the app, create an associated Note with Subject “ListImage” and attach/capture a picture. This picture is used in the list for this record.
+
Now, you need to save these changes, publish the mobile project, and synchronize the Mobile CRM application. Then open any Account record in the app, create an associated Note with Subject “ListImage” and attach/capture a picture. This picture is used in the list for this record.
 
  −
=== Default / editable images in views ===
  −
 
  −
If you use images in views, and there are some records that do not have any image in their Note, you can display a default (placeholder) image instead, so that there is not an empty slot in the view. The placeholder is configured in image styles.
  −
# Edit a view.
  −
# Click '''Edit Styles''' to open the [[Style editor]].
  −
# Select an image style and click the '''[[ImageQuery]]''' parameter.<br>[[File:Configure image query.png]]
  −
# In the '''Placeholder Image''' field, enter the file name of the file, including folder, separated by dots.
  −
# Click OK to close the image query. Save and close the style editor. Save the view.
  −
# Select '''Images''' from the '''Project''' menu.
  −
# Click '''Add Directory''' to create the folder ''myfolder'' from the example above.
  −
# Add the file ''mypic.png'' into the folder.
  −
# Click '''Save'''.
  −
# Publish the project and verify the behavior in the app.
  −
 
  −
Also, it is possible to set editable images in views. It does not mean that you can edit the image, but you can edit the field, that is represented by it. For example, an option set may be displayed as image, rather than its value as text. And similarly to editable fields, you can change the value with the images.
  −
 
  −
To find out how to set up these two features, please check this webinar [https://youtu.be/9vL4QRN_1dk?t=607 section]. {{Badge|Webinar}}
      
=== Use Note attachment as image in forms ===
 
=== Use Note attachment as image in forms ===
Line 178: Line 160:     
{{Note|If you set the same Note Subject for your view and form, the same image attached to a simple Note will be used for both.}}
 
{{Note|If you set the same Note Subject for your view and form, the same image attached to a simple Note will be used for both.}}
  −
=== Crop or edit images in forms ===
  −
  −
In some scenarios, you need to select only a portion of the image, highlight a part of the image, or add some text. You don't have to use an external image editor, you can do this directly in the app.
  −
  −
In Woodford, when you select an image field on a form tab, the '''Properties''' pane lists a number of actions, such as '''Resize Image''' or '''Clear''' (see [[Form#Image_Actions|full list]]).
  −
  −
The actions that you enable can then be used in the app, for example:
  −
* when you click the image placeholder to add an image
  −
* when you click an image on the form
  −
* when you view an image, from the hamburger menu
  −
* when you select the '''Edit image''' option, you can crop the image, rotate it, add lines and text.
  −
  −
<gallery mode="packed" heights=250px>
  −
File:Placeholder actions.png
  −
File:Onclick actions.png
  −
File:Onview actions.png
  −
File:Image editor.png
  −
</gallery>
  −
  −
=== Automatic image processing ===
  −
  −
In some scenarios, you need to ingest large number images from various sources, and you would like to perform some image normalization automatically, for example, decrease image dimensions or crop image to a certain aspect ratio. This option is available for images added using the '''[[Form#Add_media|Add Media]]''' button or using the photo or plus button on a related list. In the following example, we add a new media tab and write an On Load rule that performs the normalization.
  −
# Edit an [[app projects|app project]], then select an entity from the '''Project''' menu, for example, Contact.
  −
# Click '''Add Media''' to add a new tab to your form, then click '''OK'''. <br>[[File:Configure media tab.png]]
  −
# Click '''On Load''' and specify the rule that should be performed.<br>[[File:On Load rule.png]]
  −
# Select one of the enforcement modes: '''No Enforcement''' means that images are not modified; options starting with '''Auto''' perform the action autonomously; '''Crop in Image Editor''' launches an in-app editor that allows the user to crop the image manually.
  −
# Click '''Save & Close''' to return to the form designer, then save the form and publish the project.
  −
  −
{{Note|You can configure this rule for the form of the Note (Annotation) entity. This form includes a hidden media tab called ''Attachment''; i.e., the rule will point to ''Tabs.Attachment.EnforcementMode''.|Tip}}
      
=== Entity image (Dynamics) ===
 
=== Entity image (Dynamics) ===

Navigation menu