SaaS News Hubb
Advertisement
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us
No Result
View All Result
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us
No Result
View All Result
SaaS News Hubb
Home SAAS Applications

Client-side: Need to check the file name & extension of Field Type = Field

by admin
May 29, 2022
in SAAS Applications
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


Hello Everyone,

Thanks for reading my question.

I’ve created a Field of type File and place it on the form. I need to do basic validation of the file such as File extension and File content. Now, with the help of Dataverse REST Builder I’ve the code to find the file name/extension & file content but the challenge is if I run the code on the fieldOnChange then the needed information doesn’t exist in the database by the time. So, I need to find some other event on which I can trigger the code.

this.fileToProcessOnChange = function(executionContext){ 
    prg_DataTransfer.checkFileExtension(executionContext);
}

this.checkFileExtension = function (executionContext){
    $.ajax({
        type: "GET",
        url: Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.2/prg_temporarydatas(cfb732f7-7acd-4193-9bfc-d4b352669f1c)?$select=prg_filetoprocess_name",
        headers: {
            "OData-MaxVersion": "4.0",
            "OData-Version": "4.0",
            "Content-Type": "application/json; charset=utf-8",
            "Accept": "application/json",
            "Prefer": "odata.include-annotations=*"
        },
        async: true,
        success: function (data, textStatus, xhr) {
            var result = data;
            //console.log(result);
            // Columns
            var prg_temporarydataid = result["prg_temporarydataid"]; // Guid
            var prg_filetoprocess_name = result["prg_filetoprocess_name"]; // Text
            console.log("File Name: " + prg_filetoprocess_name);
        },
        error: function (xhr, textStatus, errorThrown) {
            console.log(xhr);
        }
    });
}



Source link

Previous Post

Games are good, mods are immortal (ep 446)

Next Post

Day of Shecurity Conference 2022 recap

Related Posts

SAAS Applications

Mail & Calendar Integrations in Sell Premier

July 1, 2022
SAAS Applications

Export Customer Service Schedule (Business Hours) within a Solution

July 1, 2022
SAAS Applications

Exploring Gorilla Expense’s Microsoft Dynamics Integration

July 1, 2022
SAAS Applications

Customer Spotlight: Cornell Cooperative Extension, Acumatica’s 2022 Impact Customer of the Year

July 1, 2022
SAAS Applications

Communication is the Key to Quality Management Success

July 1, 2022
SAAS Applications

Sales Automation Comparison: Your Best CRM Fit

June 30, 2022

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Popular

News

How Customer Loyalty Can Drive B2B SaaS Business Growth

July 1, 2022
What is Gross Revenue? [+ How to Calculate & Record It]
News

What is Gross Revenue? [+ How to Calculate & Record It]

July 1, 2022
Software Engineering

Write Better Commits, Build Better Projects

July 1, 2022
Software Engineering

The Overflow #132: The 2022 Dev Survey results!

July 1, 2022
Software Engineering

A Guide to Animating Mobile Data Visualizations

July 1, 2022
Software Engineering

Earthly Builds with Adam Gordon Bell

July 1, 2022
Software Development

Pluralsight LIVE 2021 Week 1 recap: Stronger together

July 1, 2022
Software Development

Weekly News for Designers № 650

July 1, 2022
Software Development

What is Web 3.0 and Why it Matters for Your Business?

July 1, 2022

© 2022 Sass News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy

Navigate Site

  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us

Newsletter Sign Up

No Result
View All Result
  • Home
  • News
  • Software Engineering
  • Software Development
  • SAAS Applications
  • Contact Us